Bug 357206

Summary: baloo_file crashes in Baloo::PostingDB::get()
Product: [Frameworks and Libraries] frameworks-baloo Reporter: Jean-Paul Lambrechts <jlambrec>
Component: Baloo File DaemonAssignee: Pinak Ahuja <pinak.ahuja>
Status: RESOLVED FIXED    
Severity: crash CC: alanjprescott, aramgrigoryan, ashl1future, aspotashev, bilal.elmas, christoph, clorous, dirk.regenstein, frederic.coiffier, georgemrc, hilmar.schulze, hotmusicfan, ismailsahillioglu, jordan.freeman, k.ohlhus, k.zimmermann, kde-bugs, kde, kde, laskaigergely93, mail, minatto.uzumaki, mm-schade, moritz-kdebugs, nate, pat_h, pinak.ahuja, raessler, reinhardauner, rsodrewong, sander, subdiff, suprafluid, tillschoenefeld
Priority: VHI Keywords: drkonqi
Version: 5.17.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description Jean-Paul Lambrechts 2015-12-27 07:16:47 UTC
Application: baloo_file (5.17.0)

Qt Version: 5.5.1
Operating System: Linux 4.2.8-300.fc23.x86_64 x86_64
Distribution: "Fedora release 23 (Twenty Three)"

-- Information about the crash:
- What I was doing when the application crashed: The system was booting. Nothing else was going on. This crash occurs consistently on this sytem at startup.

-- Backtrace:
Application: Baloo File Indexing Daemon (baloo_file), signal: Bus error
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f0cf91328c0 (LWP 2595))]

Thread 2 (Thread 0x7f0ba57f1700 (LWP 3105)):
#0  0x00007f0cf68bbffd in poll () at /lib64/libc.so.6
#1  0x00007f0cf1a2c16c in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f0cf1a2c27c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f0cf7910f0b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007f0cf78b7f0a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x000056190068c2b8 in Baloo::FileContentIndexer::run() ()
#6  0x00007f0cf76d5ec3 in QThreadPoolThread::run() () at /lib64/libQt5Core.so.5
#7  0x00007f0cf76d93ce in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007f0cf53a960a in start_thread () at /lib64/libpthread.so.0
#9  0x00007f0cf68c7a9d in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f0cf91328c0 (LWP 2595)):
[KCrash Handler]
#5  0x00007f0cf7423e9b in mdb_node_search () at /lib64/liblmdb.so.0.0.0
#6  0x00007f0cf7427239 in mdb_page_search_root () at /lib64/liblmdb.so.0.0.0
#7  0x00007f0cf74274f8 in mdb_page_search () at /lib64/liblmdb.so.0.0.0
#8  0x00007f0cf7427bd5 in mdb_cursor_set () at /lib64/liblmdb.so.0.0.0
#9  0x00007f0cf742826c in mdb_get () at /lib64/liblmdb.so.0.0.0
#10 0x00007f0cf7fbbdc8 in Baloo::PostingDB::get(QByteArray const&) () at /lib64/libKF5BalooEngine.so.5
#11 0x00007f0cf7fcf9ad in Baloo::WriteTransaction::commit() () at /lib64/libKF5BalooEngine.so.5
#12 0x00007f0cf7fc60a2 in Baloo::Transaction::commit() () at /lib64/libKF5BalooEngine.so.5
#13 0x0000561900696515 in Baloo::MetadataMover::removeFileMetadata(QString const&) ()
#14 0x00007f0cf78e9177 in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
#15 0x00005619006a0595 in Baloo::PendingFileQueue::removeFileIndex(QString const&) ()
#16 0x0000561900693c9e in Baloo::PendingFileQueue::processCache() ()
#17 0x00007f0cf78e9177 in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
#18 0x00007f0cf78f5b98 in QTimer::timerEvent(QTimerEvent*) () at /lib64/libQt5Core.so.5
#19 0x00007f0cf78ea163 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#20 0x00007f0cf78ba75c in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#21 0x00007f0cf790fd0d in QTimerInfoList::activateTimers() () at /lib64/libQt5Core.so.5
#22 0x00007f0cf7910249 in idleTimerSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#23 0x00007f0cf1a2be3a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#24 0x00007f0cf1a2c1d0 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#25 0x00007f0cf1a2c27c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#26 0x00007f0cf7910eef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#27 0x00007f0cf78b7f0a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#28 0x00007f0cf78bffec in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#29 0x000056190067f27c in main ()

Reported using DrKonqi
Comment 1 Christoph Cullmann 2016-09-11 13:46:52 UTC
How large is your index db?

.local/share/baloo/index

32-bit or 64-bit system?
Comment 2 Elvis Angelaccio 2016-10-20 09:35:27 UTC
*** Bug 368753 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2018-10-12 23:03:30 UTC
*** Bug 396973 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2018-10-12 23:03:31 UTC
*** Bug 399481 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2018-10-12 23:03:34 UTC
*** Bug 399692 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2018-10-12 23:03:36 UTC
*** Bug 394404 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2018-10-12 23:03:47 UTC
*** Bug 396323 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2018-10-12 23:03:52 UTC
*** Bug 396218 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2018-10-12 23:04:01 UTC
*** Bug 395996 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2018-10-12 23:04:30 UTC
*** Bug 394969 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2018-10-12 23:04:41 UTC
*** Bug 389455 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2018-10-12 23:04:52 UTC
*** Bug 395472 has been marked as a duplicate of this bug. ***
Comment 13 Ben Cooksley 2018-10-16 06:23:21 UTC
Removing subscriber per abuse report.
Comment 14 Nate Graham 2018-11-13 15:14:42 UTC
*** Bug 400967 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2018-11-13 15:14:58 UTC
*** Bug 400966 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2018-11-13 15:22:18 UTC
*** Bug 400961 has been marked as a duplicate of this bug. ***
Comment 17 Alexey Shildyakov 2018-11-18 08:52:37 UTC
*** Bug 401122 has been marked as a duplicate of this bug. ***
Comment 18 Alexey Shildyakov 2018-11-18 09:08:55 UTC
From #401122 :

@
My DB file (.local/share/baloo/index) was 2Gb on the moment the problem occurs. I use 64-bit Gentoo Linux (amd64). (In reply to Christoph Cullmann from comment #1)
> How large is your index db?
> 
> .local/share/baloo/index
> 
> 32-bit or 64-bit system?

What's strange, `balooctl indexSize` showed me about 86 MiB index size (while in actual size in FS around 2 GiB)

I solved the problem by reenabling and start indexing. New DB was created and after time the size become this:
~~~
balooctl indexSize
Actual Size: 3.90 GiBExpected Size: 2.60 GiB

           PostingDB:     602.89 MiB    22.666 %
          PositionDB:       1.05 GiB    40.553 %
            DocTerms:     447.96 MiB    16.842 %
    DocFilenameTerms:      16.00 MiB     0.602 %
       DocXattrTerms:            0 B     0.000 %
              IdTree:       1.97 MiB     0.074 %
          IdFileName:      11.87 MiB     0.446 %
             DocTime:       7.04 MiB     0.265 %
             DocData:      14.07 MiB     0.529 %
   ContentIndexingDB:            0 B     0.000 %
         FailedIdsDB:            0 B     0.000 %
             MTimeDB:       3.64 MiB     0.137 %
~~~
Comment 19 Nate Graham 2018-12-27 01:27:23 UTC
*** Bug 402340 has been marked as a duplicate of this bug. ***
Comment 20 Nate Graham 2018-12-28 19:28:20 UTC
*** Bug 402656 has been marked as a duplicate of this bug. ***
Comment 21 Nate Graham 2019-01-15 16:20:16 UTC
*** Bug 402787 has been marked as a duplicate of this bug. ***
Comment 22 Nate Graham 2019-01-15 16:20:38 UTC
*** Bug 403205 has been marked as a duplicate of this bug. ***
Comment 23 Nate Graham 2019-01-17 02:50:34 UTC
*** Bug 403282 has been marked as a duplicate of this bug. ***
Comment 24 Nate Graham 2019-01-18 21:33:13 UTC
*** Bug 403310 has been marked as a duplicate of this bug. ***
Comment 25 Nate Graham 2019-02-05 19:57:00 UTC
*** Bug 403483 has been marked as a duplicate of this bug. ***
Comment 26 Nate Graham 2019-02-05 19:57:12 UTC
*** Bug 403967 has been marked as a duplicate of this bug. ***
Comment 27 Nate Graham 2019-02-05 21:15:23 UTC
*** Bug 403720 has been marked as a duplicate of this bug. ***
Comment 28 Nate Graham 2019-02-05 22:03:40 UTC
*** Bug 403737 has been marked as a duplicate of this bug. ***
Comment 29 Nate Graham 2019-02-08 18:49:27 UTC
*** Bug 404107 has been marked as a duplicate of this bug. ***
Comment 30 Branimir Amidzic 2019-02-21 09:15:41 UTC
I have the same problem. The bug exists in several versions.

My current config:
KDE Plasma: 5.14.5
KDE FW: 5.54.0
Qt: 5.11.3
Gentoo stable 64bit
Kernel: 4.19.23

ambra@toshiba ~ $ balooctl indexSize
Actual Size: 3,03 GiB
Expected Size: 2,16 GiB

           PostingDB:     602,46 MiB    27.288 %
          PositionDB:     921,75 MiB    41.750 %
            DocTerms:     296,18 MiB    13.415 %
    DocFilenameTerms:      18,70 MiB     0.847 %
       DocXattrTerms:       4,00 KiB     0.000 %
              IdTree:       2,48 MiB     0.112 %
          IdFileName:      13,74 MiB     0.622 %
             DocTime:       6,88 MiB     0.311 %
             DocData:      21,35 MiB     0.967 %
   ContentIndexingDB:            0 B     0.000 %
         FailedIdsDB:            0 B     0.000 %
             MTimeDB:       4,94 MiB     0.224 %


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 0x7f171c00f800 (LWP 29540))]

Thread 3 (Thread 0x7f170f38c700 (LWP 29542)):
[KCrash Handler]
#6  0x00007f1719a80c01 in ?? () from /lib64/libc.so.6
#7  0x00007f171b02dae3 in ?? () from /usr/lib64/libKF5BalooEngine.so.5
#8  0x00007f171b01f2b4 in Baloo::PostingDB::get(QByteArray const&) () from /usr/lib64/libKF5BalooEngine.so.5
#9  0x00007f171b02b1e0 in Baloo::WriteTransaction::commit() () from /usr/lib64/libKF5BalooEngine.so.5
#10 0x00007f171b0248d2 in Baloo::Transaction::commit() () from /usr/lib64/libKF5BalooEngine.so.5
#11 0x000055e1d9aab577 in ?? ()
#12 0x00007f171a50b0e1 in ?? () from /usr/lib64/libQt5Core.so.5
#13 0x00007f171a51354f in ?? () from /usr/lib64/libQt5Core.so.5
#14 0x00007f17178e896a in start_thread () from /lib64/libpthread.so.0
#15 0x00007f1719a1b1af in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f170fd8e700 (LWP 29541)):
#0  0x00007f1715ecdea4 in g_mutex_unlock () from /usr/lib64/libglib-2.0.so.0
#1  0x00007f1715e87528 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f1715e87f0b in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f1715e880ec in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f171a6fb12b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007f171a6a711a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#6  0x00007f171a509aea in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#7  0x00007f171b24ade5 in ?? () from /usr/lib64/libQt5DBus.so.5
#8  0x00007f171a51354f in ?? () from /usr/lib64/libQt5Core.so.5
#9  0x00007f17178e896a in start_thread () from /lib64/libpthread.so.0
#10 0x00007f1719a1b1af in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f171c00f800 (LWP 29540)):
#0  0x00007f1719a0f5d3 in poll () from /lib64/libc.so.6
#1  0x00007f1715e87fd9 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f1715e880ec in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f171a6fb12b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x00007f171a6a711a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007f171a6afb00 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x000055e1d9aa071c in ?? ()
#7  0x00007f1719938ae7 in __libc_start_main () from /lib64/libc.so.6
#8  0x000055e1d9aa098a in ?? ()
Comment 31 Christoph Feck 2019-03-12 09:41:10 UTC
*** Bug 404726 has been marked as a duplicate of this bug. ***
Comment 32 Brett Keller 2019-04-19 20:25:01 UTC
Created attachment 119510 [details]
New crash information added by DrKonqi

baloo_file (5.44.0) using Qt 5.9.5

- What I was doing when the application crashed:
Happens immediately after login.

I don't really even have that many files on this system to index:
$ balooctl indexSize
Actual Size: 12.02 MiB
Expected Size: 6.77 MiB

           PostingDB:       1.18 MiB    17.426 %
         PosistionDB:       1.39 MiB    20.542 %
            DocTerms:       1.05 MiB    15.522 %
    DocFilenameTerms:       1.03 MiB    15.176 %
       DocXattrTerms:            0 B     0.000 %
              IdTree:     168.00 KiB     2.424 %
          IdFileName:     924.00 KiB    13.329 %
             DocTime:     644.00 KiB     9.290 %
             DocData:            0 B     0.000 %
   ContentIndexingDB:            0 B     0.000 %
         FailedIdsDB:            0 B     0.000 %
             MTimeDB:     220.00 KiB     3.174 %

-- Backtrace (Reduced):
#6  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:427
#7  0x00007f42e75a0973 in memcpy (__len=18446744073126832784, __src=<optimized out>, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#8  Baloo::PostingCodec::decode (this=this@entry=0x7f42dd446a47, arr=...) at ./src/codecs/postingcodec.cpp:42
#9  0x00007f42e75923e4 in Baloo::PostingDB::get (this=this@entry=0x7f42dd446b30, term=...) at ./src/engine/postingdb.cpp:100
#10 0x00007f42e759e060 in Baloo::WriteTransaction::commit (this=0x7f02d0003400) at ./src/engine/writetransaction.cpp:259
Comment 33 Sander van Dragt 2019-04-23 06:36:50 UTC
Created attachment 119576 [details]
New crash information added by DrKonqi

baloo_file (5.45.0) using Qt 5.9.4

- What I was doing when the application crashed: This is happening on bootup before a network connection is enabled.

-- Backtrace (Reduced):
#7  0x00007ffb42c4da93 in memcpy (__len=1110874144, __src=<optimized out>, __dest=<optimized out>) at /usr/include/bits/string_fortified.h:34
#8  Baloo::PostingCodec::decode (this=this@entry=0x7ffb38875967, arr=...) at /usr/src/debug/baloo5-5.45.0-lp150.2.1.x86_64/src/codecs/postingcodec.cpp:42
#9  0x00007ffb42c3ef64 in Baloo::PostingDB::get (this=this@entry=0x7ffb38875a50, term=...) at /usr/src/debug/baloo5-5.45.0-lp150.2.1.x86_64/src/engine/postingdb.cpp:100
#10 0x00007ffb42c4b180 in Baloo::WriteTransaction::commit (this=0x7fbb2c004da0) at /usr/src/debug/baloo5-5.45.0-lp150.2.1.x86_64/src/engine/writetransaction.cpp:259
#11 0x00007ffb42c444c2 in Baloo::Transaction::commit (this=this@entry=0x7ffb38875b60) at /usr/src/debug/baloo5-5.45.0-lp150.2.1.x86_64/src/engine/transaction.cpp:262
Comment 34 k.zimmermann 2019-05-26 08:12:19 UTC
Created attachment 120315 [details]
New crash information added by DrKonqi

baloo_file (5.55.0) using Qt 5.9.7

- What I was doing when the application crashed:
I started up my system, after starting KDE -> balloo crashed

-- Backtrace (Reduced):
#7  0x00007fceb0a8ed53 in memcpy (__len=18446744072369125792, __src=<optimized out>, __dest=<optimized out>) at /usr/include/bits/string_fortified.h:34
#8  Baloo::PostingCodec::decode (this=this@entry=0x7fcea62c5917, arr=...) at /usr/src/debug/baloo5-5.55.0-lp151.2.2.x86_64/src/codecs/postingcodec.cpp:42
#9  0x00007fceb0a80674 in Baloo::PostingDB::get (this=this@entry=0x7fcea62c5a00, term=...) at /usr/src/debug/baloo5-5.55.0-lp151.2.2.x86_64/src/engine/postingdb.cpp:100
#10 0x00007fceb0a8c460 in Baloo::WriteTransaction::commit (this=0x7f8e98004da0) at /usr/src/debug/baloo5-5.55.0-lp151.2.2.x86_64/src/engine/writetransaction.cpp:275
#11 0x00007fceb0a85bd2 in Baloo::Transaction::commit (this=this@entry=0x7fcea62c5b20) at /usr/src/debug/baloo5-5.55.0-lp151.2.2.x86_64/src/engine/transaction.cpp:269
Comment 35 Nate Graham 2019-06-05 15:07:12 UTC
*** Bug 408259 has been marked as a duplicate of this bug. ***
Comment 36 Nate Graham 2019-06-14 13:56:44 UTC
*** Bug 408681 has been marked as a duplicate of this bug. ***
Comment 37 Nate Graham 2019-08-13 15:55:30 UTC
*** Bug 410783 has been marked as a duplicate of this bug. ***
Comment 38 Nate Graham 2019-09-12 15:52:03 UTC
*** Bug 411744 has been marked as a duplicate of this bug. ***
Comment 39 Nate Graham 2019-10-19 14:36:17 UTC
*** Bug 413150 has been marked as a duplicate of this bug. ***
Comment 40 Nate Graham 2019-10-27 23:09:17 UTC
*** Bug 413335 has been marked as a duplicate of this bug. ***
Comment 41 Nate Graham 2019-10-27 23:27:50 UTC
*** Bug 413399 has been marked as a duplicate of this bug. ***
Comment 42 Nate Graham 2020-10-26 16:11:23 UTC
No duplicate bug reports seen in a year. After all the bugfixing work done during that time, I think we can call this fixed!
Comment 43 Holger Maxion 2020-10-26 16:14:29 UTC
Think so!
Thanks a lot!
Am 26.10.20 um 17:11 schrieb Nate Graham:
> https://bugs.kde.org/show_bug.cgi?id=357206
> 
> Nate Graham <nate@kde.org> changed:
> 
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>           Resolution|---                         |FIXED
>               Status|CONFIRMED                   |RESOLVED
> 
> --- Comment #42 from Nate Graham <nate@kde.org> ---
> No duplicate bug reports seen in a year. After all the bugfixing work done
> during that time, I think we can call this fixed!
>