| Summary: | Gracefully handle Xapian DB Corruption | ||
|---|---|---|---|
| Product: | [Unmaintained] Baloo | Reporter: | Matt Scheirer <matt.scheirer> |
| Component: | Baloo File Daemon | Assignee: | Vishesh Handa <me> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | frank78ac, ivan.cukic |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | 4.13 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 5.4 | |
| Sentry Crash Report: | |||
|
Description
Matt Scheirer
2014-04-26 18:10:54 UTC
Probably Baloo crashing because missing exception handling. If this is reproducible, could you please try to get a backtrace of the uncaught exception? For more information, please see http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_when_an_uncaught_exception_is_causing_a_crash I did some more research and testing and it is always due to the same issue reported here: https://bugs.kde.org/show_bug.cgi?id=333772 Basically, the baloo database files in ~/.local/share/baloo/ get in incomplete states during power loss, and when the system is brought back up it crashes when it can't handle. This is the sweet stuff: baloo_file(12183): Error opening table `/home/zanny/.local/share/baloo/file//record.': Unable to read revision from /home/zanny/.local/share/baloo/file//record.baseA Unable to read revision from /home/zanny/.local/share/baloo/file//record.baseB DatabaseOpeningError: Error opening table `/home/zanny/.local/share/baloo/file//record.': Unable to read revision from /home/zanny/.local/share/baloo/file//record.baseA Unable to read revision from /home/zanny/.local/share/baloo/file//record.baseB I should have saved copies of these bad records before I trashed the folder to see if it could start over, but wiping the contents did work for this dolphin bug. I have confirmed the behaviour. Baloo does not handle the exceptions coming from xapian, and they get propagated to the qt's event loop which does not handle exceptions. > Qt has caught an exception thrown from an event handler. Throwing > exceptions from an event handler is not supported in Qt. You must > reimplement QApplication::notify() and catch all exceptions there. > > terminate called after throwing an instance of 'Xapian::DatabaseCorruptError' The backtrace is useless since it happens in the event loop. Adding a crash which occurs after the DB gets corrupted - Application: Baloo File (baloo_file), signal: Segmentation fault Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Current thread is 1 (Thread 0x7fa99720c800 (LWP 2340))] Thread 2 (Thread 0x7fa980d88700 (LWP 2343)): #0 0x00007fa992fa6fbd in poll () at ../sysdeps/unix/syscall-template.S:81 #1 0x00007fa991ecbb72 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1 #2 0x00007fa991ecd64f in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1 #3 0x00007fa982926c89 in QXcbEventReader::run (this=0x1163d10) at qxcbconnection.cpp:1043 #4 0x00007fa993844e11 in QThreadPrivate::start (arg=0x1163d10) at thread/qthread_unix.cpp:345 #5 0x00007fa992ca3182 in start_thread (arg=0x7fa980d88700) at pthread_create.c:312 #6 0x00007fa992fb430d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Thread 1 (Thread 0x7fa99720c800 (LWP 2340)): [KCrash Handler] #6 size (this=<optimized out>, this=<optimized out>) at /usr/include/c++/4.8/bits/stl_vector.h:646 #7 Xapian::Database::get_document (this=0x0, did=815390) at ../api/omdatabase.cc:439 #8 0x00007fa995e59b34 in Baloo::XapianDatabase::document (this=0x1183ba0, id=815390) at /build/buildd/project-neon5-baloo-0.0+git20140721.0312+neon4~715c35e~14.04/src/xapian/xapiandatabase.cpp:167 #9 0x000000000044032f in Baloo::BasicIndexingQueue::shouldIndex (this=0x11c0d40, file=..., mimetype=...) at /build/buildd/project-neon5-baloo-0.0+git20140721.0312+neon4~715c35e~14.04/src/file/basicindexingqueue.cpp:146 #10 0x000000000043fdd5 in Baloo::BasicIndexingQueue::process (this=0x11c0d40, file=..., flags=...) at /build/buildd/project-neon5-baloo-0.0+git20140721.0312+neon4~715c35e~14.04/src/file/basicindexingqueue.cpp:104 #11 0x000000000043fc83 in Baloo::BasicIndexingQueue::enqueue (this=0x43fc83 <Baloo::BasicIndexingQueue::enqueue(Baloo::FileMapping const&, QFlags<Baloo::UpdateDirFlag>)+279>, file=..., flags=...) at /build/buildd/project-neon5-baloo-0.0+git20140721.0312+neon4~715c35e~14.04/src/file/basicindexingqueue.cpp:79 #12 0x000000000043f72e in Baloo::IndexingQueue::processNext (this=0x11c0d40) at /build/buildd/project-neon5-baloo-0.0+git20140721.0312+neon4~715c35e~14.04/src/file/indexingqueue.cpp:42 #13 0x0000000000450ace in Baloo::IndexingQueue::qt_static_metacall (_o=0x11c0d40, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x2027780) at /build/buildd/project-neon5-baloo-0.0+git20140721.0312+neon4~715c35e~14.04/obj-x86_64-linux-gnu/src/file/moc_indexingqueue.cpp:92 #14 0x00007fa993aed8f7 in QMetaCallEvent::placeMetaCall (this=0x2026570, object=0x11c0d40) at kernel/qobject.cpp:487 #15 0x00007fa993aee93c in QObject::event (this=0x11c0d40, e=0x2026570) at kernel/qobject.cpp:1241 #16 0x00007fa9947053fa in QApplicationPrivate::notify_helper (this=0x114a670, receiver=0x11c0d40, e=0x2026570) at kernel/qapplication.cpp:3522 #17 0x00007fa994702a42 in QApplication::notify (this=0x7fffb9cccf80, receiver=0x11c0d40, e=0x2026570) at kernel/qapplication.cpp:2975 #18 0x00007fa993ab342a in QCoreApplication::notifyInternal (this=0x7fffb9cccf80, receiver=0x11c0d40, event=0x2026570) at kernel/qcoreapplication.cpp:935 #19 0x00007fa993ab6fb7 in QCoreApplication::sendEvent (receiver=0x11c0d40, event=0x2026570) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:237 #20 0x00007fa993ab46f5 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1148360) at kernel/qcoreapplication.cpp:1539 #21 0x00007fa993ab409a in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1397 #22 0x00007fa993b2927c in postEventSourceDispatch (s=0x1186340) at kernel/qeventdispatcher_glib.cpp:279 #23 0x00007fa98c9dee04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #24 0x00007fa98c9df048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #25 0x00007fa98c9df0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #26 0x00007fa993b29a1d in QEventDispatcherGlib::processEvents (this=0x1174f40, flags=...) at kernel/qeventdispatcher_glib.cpp:426 #27 0x00007fa982980cf2 in QPAEventDispatcherGlib::processEvents (this=0x1174f40, flags=...) at eventdispatchers/qeventdispatcher_glib.cpp:123 #28 0x00007fa993ab0162 in QEventLoop::processEvents (this=0x7fffb9cccdd0, flags=...) at kernel/qeventloop.cpp:136 #29 0x00007fa993ab0423 in QEventLoop::exec (this=0x7fffb9cccdd0, flags=...) at kernel/qeventloop.cpp:212 #30 0x00007fa993ab3ae2 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188 #31 0x00007fa993e994e0 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1446 #32 0x00007fa994702263 in QApplication::exec () at kernel/qapplication.cpp:2767 #33 0x000000000042ece8 in main (argc=1, argv=0x7fffb9ccd1b8) at /build/buildd/project-neon5-baloo-0.0+git20140721.0312+neon4~715c35e~14.04/src/file/main.cpp:107 Fixed with Plasma 5.4. We are no longer using Xapian. |