Skip to content

XAttrIndexer: Ignore dirs to fix assert

Dāvis Mosāns requested to merge davism/baloo:assert into master

Directories can also be watched and their xattrs changed.

I was hitting this assert:

(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f8a116a0953 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f8a11651ea8 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f8a124f376e in KCrash::defaultCrashHandler (sig=6) at /usr/src/debug/kcrash-git/kcrash/src/kcrash.cpp:597
#4  <signal handler called>
#5  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007f8a116a0953 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#7  0x00007f8a11651ea8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007f8a1163b53d in __GI_abort () at abort.c:79
#9  0x00007f8a11ca41c7 in qAbort () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.2/src/corelib/global/qglobal.cpp:3369
#10 0x00007f8a11ca449a in qt_message_fatal (message=<synthetic pointer>..., context=...)
at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.2/src/corelib/global/qlogging.cpp:1916
#11 QMessageLogger::fatal (this=this@entry=0x7f8a077fd7a8, msg=msg@entry=0x7f8a11fbad30 "ASSERT: \"%s\" in file %s, line %d")
at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.2/src/corelib/global/qlogging.cpp:850
#12 0x00007f8a11ca44f8 in qt_assert (assertion=<optimized out>, file=<optimized out>, line=<optimized out>)
at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.2/src/corelib/global/qglobal.cpp:3276
#13 0x0000561bf1af30c0 in Baloo::XAttrIndexer::run (this=0x7f49f800a380) at /mnt/KDE/baloo/src/file/xattrindexer.cpp:37
#14 0x00007f8a11e86665 in QThreadPoolThread::run (this=0x561bf1e54830)
at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.2/src/corelib/thread/qthreadpool.cpp:66
#15 0x00007f8a11e85a21 in operator() (__closure=<optimized out>)
at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.2/src/corelib/thread/qthread_unix.cpp:321
#16 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=...)
at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.2/src/corelib/thread/qthread_unix.cpp:257
#17 QThreadPrivate::start (arg=0x561bf1e54830)
at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.2/src/corelib/thread/qthread_unix.cpp:280
#18 0x00007f8a1169ebb5 in start_thread (arg=<optimized out>) at pthread_create.c:444
#19 0x00007f8a11720d90 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) frame 13
#13 0x0000561bf1af30c0 in Baloo::XAttrIndexer::run (this=0x7f49f800a380) at /mnt/KDE/baloo/src/file/xattrindexer.cpp:37
37              Q_ASSERT(!filePath.endsWith(QLatin1Char('/')));
(gdb) p filePath
$2 = (const QString &) @0x561bf1e59560: {
d = {
d = 0x561bf1e64fc0,
ptr = 0x561bf1e64fd0 u"/home/Dāvis/Desktop/",
size = 20
}
}

Merge request reports