Bug 390824

Summary: baloo_file crashes in Baloo::Transaction::commit() or mdb_txn_commit()
Product: [Frameworks and Libraries] frameworks-baloo Reporter: Patrick Silva <bugseforuns>
Component: Baloo File DaemonAssignee: baloo-bugs-null
Status: RESOLVED DUPLICATE    
Severity: crash CC: lorebett2002, matejm98mthw, Mathias.Homann, nate, rozzo
Priority: NOR Keywords: drkonqi
Version: 5.43.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Patrick Silva 2018-02-20 23:46:33 UTC
Application: baloo_file (5.43.0)

Qt Version: 5.9.3
Frameworks Version: 5.43.0
Operating System: Linux 4.13.0-32-generic x86_64
Distribution: KDE neon Developer Edition

-- Information about the crash:
- What I was doing when the application crashed:
No specific action, baloo crashes randomly.
I have also observed random crashes on Arch Linux (plasma 5.12.1) installed on another computer.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Baloo File Indexing Daemon (baloo_file), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe2c45138c0 (LWP 8374))]

Thread 3 (Thread 0x7fa2b3fff700 (LWP 17322)):
[KCrash Handler]
#6  0x00007fe2c1f5a428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#7  0x00007fe2c1f5c02a in __GI_abort () at abort.c:89
#8  0x00007fe2bff50e72 in mdb_assert_fail (env=0x240b020, expr_txt=expr_txt@entry=0x7fe2bff52a42 "pglast <= env->me_pglast", func=func@entry=0x7fe2bff531e0 <__func__.7345> "mdb_freelist_save", line=line@entry=3067, file=0x7fe2bff528b0 "mdb.c") at mdb.c:1481
#9  0x00007fe2bff4e886 in mdb_freelist_save (txn=0x2458740) at mdb.c:3067
#10 mdb_txn_commit (txn=0x2458740) at mdb.c:3555
#11 0x00007fe2c337931e in Baloo::Transaction::commit (this=this@entry=0x7fa2b3ffebd0) at /workspace/build/src/engine/transaction.cpp:266
#12 0x0000000000412979 in Baloo::NewFileIndexer::run (this=0x2410db0) at /workspace/build/src/file/newfileindexer.cpp:75
#13 0x00007fe2c2a22b27 in QThreadPoolThread::run (this=0x240cb50) at thread/qthreadpool.cpp:99
#14 0x00007fe2c2a26709 in QThreadPrivate::start (arg=0x240cb50) at thread/qthread_unix.cpp:368
#15 0x00007fe2c127e6ba in start_thread (arg=0x7fa2b3fff700) at pthread_create.c:333
#16 0x00007fe2c202c41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fe2b8eca700 (LWP 8386)):
#0  0x00007fe2c202074d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fe2bea3738c in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fe2b4003220, timeout=<optimized out>, context=0x7fe2b4000990) at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmain.c:4135
#2  g_main_context_iterate (context=context@entry=0x7fe2b4000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmain.c:3835
#3  0x00007fe2bea3749c in g_main_context_iteration (context=0x7fe2b4000990, may_block=may_block@entry=1) at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmain.c:3901
#4  0x00007fe2c2c506cb in QEventDispatcherGlib::processEvents (this=0x7fe2b40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007fe2c2bf8e2a in QEventLoop::exec (this=this@entry=0x7fe2b8ec9cd0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#6  0x00007fe2c2a218f4 in QThread::exec (this=this@entry=0x7fe2c40efd40 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:515
#7  0x00007fe2c3e7b315 in QDBusConnectionManager::run (this=0x7fe2c40efd40 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#8  0x00007fe2c2a26709 in QThreadPrivate::start (arg=0x7fe2c40efd40 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:368
#9  0x00007fe2c127e6ba in start_thread (arg=0x7fe2b8eca700) at pthread_create.c:333
#10 0x00007fe2c202c41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fe2c45138c0 (LWP 8374)):
#0  0x00007fe2c201c27d in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fe2bea7a6f0 in read (__nbytes=16, __buf=0x7fffa8aaf250, __fd=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/unistd.h:44
#2  g_wakeup_acknowledge (wakeup=0x23e2910) at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gwakeup.c:210
#3  0x00007fe2bea36e74 in g_main_context_check (context=context@entry=0x23e2a40, max_priority=2147483647, fds=fds@entry=0x241d200, n_fds=n_fds@entry=3) at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmain.c:3632
#4  0x00007fe2bea37330 in g_main_context_iterate (context=context@entry=0x23e2a40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmain.c:3837
#5  0x00007fe2bea3749c in g_main_context_iteration (context=0x23e2a40, may_block=may_block@entry=1) at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmain.c:3901
#6  0x00007fe2c2c506cb in QEventDispatcherGlib::processEvents (this=0x23e1b90, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#7  0x00007fe2c2bf8e2a in QEventLoop::exec (this=this@entry=0x7fffa8aaf460, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#8  0x00007fe2c2c01d64 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1291
#9  0x000000000040abab in main (argc=1, argv=<optimized out>) at /workspace/build/src/file/main.cpp:104

Possible duplicates by query: bug 380111, bug 378947, bug 378233, bug 377604.

Reported using DrKonqi
Comment 1 Lorenzo Bettini 2018-04-24 15:49:06 UTC
I'm experiencing the same problem (crashes after some time):

Application: baloo_file (5.44.0)

Qt Version: 5.9.5
Frameworks Version: 5.44.0
Operating System: Linux 4.15.0-19-generic x86_64
Distribution: Ubuntu Bionic Beaver (development branch)

After the crash, the only way to use baloo again is to disable it and enable it again, so that the index is recreated.
Comment 2 Matej Mrenica 2018-06-01 14:59:54 UTC

*** This bug has been marked as a duplicate of bug 389848 ***
Comment 3 Christoph Feck 2018-06-01 18:26:43 UTC
This is not a duplicate.
Comment 4 Nate Graham 2018-11-26 18:44:09 UTC
*** Bug 397199 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2018-11-26 18:44:12 UTC
*** Bug 389679 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2018-11-26 18:46:59 UTC

*** This bug has been marked as a duplicate of bug 384607 ***
Comment 7 Nate Graham 2018-11-26 19:56:35 UTC

*** This bug has been marked as a duplicate of bug 389679 ***