Bug 359672

Summary: baloo constantly crashing
Product: [Unmaintained] Baloo Reporter: nicholas <ndcunliffe>
Component: GeneralAssignee: Vishesh Handa <me>
Status: RESOLVED WORKSFORME    
Severity: crash CC: pinak.ahuja
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description nicholas 2016-02-22 15:32:42 UTC
Application: baloo_file (5.16.0)

Qt Version: 5.5.1
Operating System: Linux 4.1.15-8-default x86_64
Distribution: "openSUSE Leap 42.1 (x86_64)"

-- Information about the crash:
if i delete a file, rename, sometimes download baloo crashes

-- Backtrace:
Application: Baloo File Indexing Daemon (baloo_file), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f3d6a711780 (LWP 1458))]

Thread 2 (Thread 0x7f3c1f72e700 (LWP 1521)):
#0  0x00007fff848f49a2 in clock_gettime ()
#1  0x00007f3d6825fc3d in clock_gettime () from /lib64/libc.so.6
#2  0x00007f3d68cf57d6 in qt_clock_gettime (ts=0x7f3c1f72d9e0, clock=<optimized out>) at tools/qelapsedtimer_unix.cpp:105
#3  do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:156
#4  qt_gettime () at tools/qelapsedtimer_unix.cpp:165
#5  0x00007f3d68e753b9 in QTimerInfoList::updateCurrentTime (this=this@entry=0x7f3c180030d0) at kernel/qtimerinfo_unix.cpp:84
#6  0x00007f3d68e75945 in QTimerInfoList::timerWait (this=0x7f3c180030d0, tm=...) at kernel/qtimerinfo_unix.cpp:381
#7  0x00007f3d68e76b5e in timerSourcePrepareHelper (timeout=0x7f3c1f72da94, src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:127
#8  timerSourcePrepare (source=<optimized out>, timeout=0x7f3c1f72da94) at kernel/qeventdispatcher_glib.cpp:160
#9  0x00007f3d64c8a4ad in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#10 0x00007f3d64c8ad80 in ?? () from /usr/lib64/libglib-2.0.so.0
#11 0x00007f3d64c8af7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#12 0x00007f3d68e76d8b in QEventDispatcherGlib::processEvents (this=0x7f3c180008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#13 0x00007f3d68e1dd53 in QEventLoop::exec (this=this@entry=0x7f3c1f72dd20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#14 0x0000000000422845 in Baloo::FileContentIndexer::run (this=0x13d3370) at /usr/src/debug/baloo-5.16.0/src/file/filecontentindexer.cpp:71
#15 0x00007f3d68c41382 in QThreadPoolThread::run (this=0x142a260) at thread/qthreadpool.cpp:93
#16 0x00007f3d68c4432f in QThreadPrivate::start (arg=0x142a260) at thread/qthread_unix.cpp:331
#17 0x00007f3d672850a4 in start_thread () from /lib64/libpthread.so.0
#18 0x00007f3d68252fed in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f3d6a711780 (LWP 1458)):
[KCrash Handler]
#6  0x00007f3d65f7625c in mdb_get (txn=0x7f3d68e76ab0 <idleTimerSourceDispatch(GSource*, GSourceFunc, gpointer)>, dbi=7, key=0x7fff8482fdf0, data=0x7fff8482fe00) at mdb.c:5286
#7  0x00007f3d6950f92d in Baloo::IdTreeDB::get (this=this@entry=0x7fff8482fe70, docId=docId@entry=0) at /usr/src/debug/baloo-5.16.0/src/engine/idtreedb.cpp:82
#8  0x00007f3d6950cca0 in Baloo::DocumentUrlDB::getId (this=this@entry=0x7fff8482fee0, docId=0, fileName=...) at /usr/src/debug/baloo-5.16.0/src/engine/documenturldb.cpp:186
#9  0x00007f3d6951e3e9 in Baloo::Transaction::documentId (this=this@entry=0x7fff8482ff60, path=...) at /usr/src/debug/baloo-5.16.0/src/engine/transaction.cpp:121
#10 0x000000000042a923 in Baloo::MetadataMover::removeMetadata (this=this@entry=0x138b800, tr=tr@entry=0x7fff8482ff60, url=...) at /usr/src/debug/baloo-5.16.0/src/file/metadatamover.cpp:74
#11 0x000000000042a9dd in Baloo::MetadataMover::removeFileMetadata (this=0x138b800, file=...) at /usr/src/debug/baloo-5.16.0/src/file/metadatamover.cpp:66
#12 0x00007f3d68e4f73f in call (a=0x7fff848300c0, r=0x138b800, this=0x136e100) at ../../src/corelib/kernel/qobject_impl.h:124
#13 QMetaObject::activate (sender=sender@entry=0x1370490, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff848300c0) at kernel/qobject.cpp:3698
#14 0x00007f3d68e502e7 in QMetaObject::activate (sender=sender@entry=0x1370490, m=m@entry=0x646860 <Baloo::PendingFileQueue::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff848300c0) at kernel/qobject.cpp:3578
#15 0x0000000000434405 in Baloo::PendingFileQueue::removeFileIndex (this=this@entry=0x1370490, _t1=...) at /usr/src/debug/baloo-5.16.0/build/src/file/moc_pendingfilequeue.cpp:217
#16 0x0000000000428bc6 in Baloo::PendingFileQueue::processCache (this=0x1370490) at /usr/src/debug/baloo-5.16.0/src/file/pendingfilequeue.cpp:89
#17 0x00007f3d68e4f73f in call (a=0x7fff84830200, r=0x1370490, this=0x1394480) at ../../src/corelib/kernel/qobject_impl.h:124
#18 QMetaObject::activate (sender=sender@entry=0x13704a8, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3698
#19 0x00007f3d68e502e7 in QMetaObject::activate (sender=sender@entry=0x13704a8, m=m@entry=0x7f3d6926e860 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3578
#20 0x00007f3d68ed1a90 in QTimer::timeout (this=this@entry=0x13704a8) at .moc/moc_qtimer.cpp:197
#21 0x00007f3d68e5cf22 in QTimer::timerEvent (this=0x13704a8, e=<optimized out>) at kernel/qtimer.cpp:247
#22 0x00007f3d68e508bc in QObject::event (this=0x13704a8, e=<optimized out>) at kernel/qobject.cpp:1220
#23 0x00007f3d68e2018d in QCoreApplication::notify (this=<optimized out>, receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1038
#24 0x00007f3d68e1fe95 in QCoreApplication::notifyInternal (this=0x7fff84830770, receiver=0x13704a8, event=event@entry=0x7fff848304a0) at kernel/qcoreapplication.cpp:965
#25 0x00007f3d68e7677d in sendEvent (event=0x7fff848304a0, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:224
#26 QTimerInfoList::activateTimers (this=0x13613f0) at kernel/qtimerinfo_unix.cpp:637
#27 0x00007f3d68e76ad9 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:177
#28 idleTimerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:224
#29 0x00007f3d64c8ac84 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#30 0x00007f3d64c8aed8 in ?? () from /usr/lib64/libglib-2.0.so.0
#31 0x00007f3d64c8af7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f3d68e76d6c in QEventDispatcherGlib::processEvents (this=0x13616c0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#33 0x00007f3d68e1dd53 in QEventLoop::exec (this=this@entry=0x7fff848306e0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#34 0x00007f3d68e258f6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#35 0x0000000000417d92 in main (argc=1, argv=<optimized out>) at /usr/src/debug/baloo-5.16.0/src/file/main.cpp:88

Possible duplicates by query: bug 359325, bug 359292, bug 359276, bug 359239, bug 358962.

Reported using DrKonqi
Comment 1 nicholas 2016-02-23 14:47:24 UTC
I believe the problem is fixed. I suspect the use of 'chrome>tools>add to desktop' was the root cause (it created a file with a very garbled name)

The fix was to simply flush the baloo database:
[completely remove the bad file first]
balooctl status (check baloo responds, reboot if not)
balooctl disable
balooctl enable
balooctl status (to check it is indeed rebuilding)