Hey, some days ago I updated from KDE 4.12 to the new plasma 5.2. Since this update baloo_file consumes 50% of cpu from time to time. How can I detect the problematic file? After killing baloo_file and I enabled debug messages but everything seems fine: $ baloo_file "/home/naraesk/.local/share/baloo/file/" true "/home/naraesk" "/home/naraesk" Successfully opened connection to inotify: 24 XSync seems available and ready XSync Inited Supported, init completed Normal Reproducible: Sometimes Actual Results: high cpu load, doesn't go back to normal
Could you please get a backtrace of when it goes high? $ sudo gdb --pid `pidof baloo_file` > thread apply all backtrace If you can paste the backtrace it would be very helpful.
Created attachment 90984 [details] gdb output Is this useful or do I have to install this debug stuff?
You need to type 'thread apply all backtrace' once you gdb into the process. It seems like you have the correct debugging symbols.
(gdb) thread apply all backtrace Thread 3 (Thread 0x7f3cb9e7d700 (LWP 971)): #0 0x00007f3ccae564ed in poll () from /usr/lib/libc.so.6 #1 0x00007f3cca7499f2 in ?? () from /usr/lib/libxcb.so.1 #2 0x00007f3cca74b56f in xcb_wait_for_event () from /usr/lib/libxcb.so.1 #3 0x00007f3cbb1703f9 in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so #4 0x00007f3ccb6e25ee in ?? () from /usr/lib/libQt5Core.so.5 #5 0x00007f3cc5f2b374 in start_thread () from /usr/lib/libpthread.so.0 #6 0x00007f3ccae5f27d in clone () from /usr/lib/libc.so.6 Thread 2 (Thread 0x7f3cb8e88700 (LWP 7410)): #0 0x00007f3ccae581b3 in select () from /usr/lib/libc.so.6 #1 0x00007f3ccb85fb31 in ?? () from /usr/lib/libQt5Core.so.5 #2 0x00007f3ccb6e25ee in ?? () from /usr/lib/libQt5Core.so.5 #3 0x00007f3cc5f2b374 in start_thread () from /usr/lib/libpthread.so.0 #4 0x00007f3ccae5f27d in clone () from /usr/lib/libc.so.6 Thread 1 (Thread 0x7f3cbb3ff840 (LWP 967)): #0 0x00007f3ccdc220c9 in Key::operator<(Key) const () from /usr/lib/libxapian.so.22 #1 0x00007f3ccdc2221c in ChertTable::find_in_block(unsigned char const*, Key, bool, int) () from /usr/lib/libxapian.so.22 #2 0x00007f3ccdc23563 in ChertTable::find(Cursor*) const () from /usr/lib/libxapian.so.22 #3 0x00007f3ccdbfd1d1 in ChertCursor::find_entry(std::string const&) () from /usr/lib/libxapian.so.22 #4 0x00007f3ccdc29f53 in ?? () from /usr/lib/libxapian.so.22 #5 0x00007f3ccdc2d873 in ?? () from /usr/lib/libxapian.so.22 #6 0x00007f3ccdc0d9ca in ?? () from /usr/lib/libxapian.so.22 #7 0x00007f3ccdb7e232 in Xapian::Document::Internal::get_value(unsigned int) const () from /usr/lib/libxapian.so.22 #8 0x00007f3ccdb7e24c in Xapian::Document::get_value(unsigned int) const () from /usr/lib/libxapian.so.22 #9 0x00007f3ccdf4752a in Baloo::XapianDocument::value(int) const () from /usr/lib/libKF5BalooXapian.so.1 #10 0x000000000041f994 in Baloo::BasicIndexingQueue::shouldIndex(Baloo::FileMapping&, QString const&) const () #11 0x00000000004205e5 in Baloo::BasicIndexingQueue::process(Baloo::FileMapping&, QFlags<Baloo::UpdateDirFlag>) () #12 0x0000000000420b9c in Baloo::BasicIndexingQueue::processNextIteration() () #13 0x00007f3ccb8fd4ba in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5 #14 0x00007f3ccc1aad8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 ---Type <return> to continue, or q <return> to quit--- #15 0x00007f3ccc1b0370 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #16 0x00007f3ccb8cca9b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5 #17 0x00007f3ccb8ceadb in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5 #18 0x00007f3ccb923c83 in ?? () from /usr/lib/libQt5Core.so.5 #19 0x00007f3cc57c6a0d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #20 0x00007f3cc57c6cf8 in ?? () from /usr/lib/libglib-2.0.so.0 #21 0x00007f3cc57c6dac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #22 0x00007f3ccb924077 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #23 0x00007f3ccb8ca532 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #24 0x00007f3ccb8d1f0c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #25 0x0000000000417467 in main ()
It seems like your database is corrupted. (This seems to happen occasionally, we're working with upstream to find a proper solution). Could you please run the following - $ cd .local/share/baloo/file $ xapian-check . And paste the output. That will help us diagnose it better. The temporary solution to this is just to reset your database. $ balooctl disable $ balooctl enable Thanks for being patient and reporting the bug.
$ xapian-check . record: baseA blocksize=8K items=59843 lastblock=906 revision=39367 levels=2 root=186 B-tree checked okay record table structure checked OK termlist: baseA blocksize=8K items=119686 lastblock=10673 revision=39367 levels=2 root=3526 B-tree checked okay termlist table structure checked OK postlist: baseA blocksize=8K items=2488437 lastblock=33517 revision=39367 levels=2 root=26 xapian-check: DatabaseCorruptError: Db block overwritten - are there multiple writers?
Yup. The database is corrupt. Please reset baloo. $ balooctl disable $ balooctl enable *** This bug has been marked as a duplicate of bug 341581 ***