Bug 462909 - baloo_file crashed at mdb_assert_fail.constprop.0 on GNOME after login
Summary: baloo_file crashed at mdb_assert_fail.constprop.0 on GNOME after login
Status: REPORTED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.101.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-11 14:41 UTC by Fushan Wen
Modified: 2024-04-13 10:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2022-12-11 14:41:13 UTC
SUMMARY
After logging in to GNOME,  KCrashHandler popped up showing baloo_file crashed.


STEPS TO REPRODUCE
1. Log out from Plasma
2. Log in to GNOME
3. 

OBSERVED RESULT
Crash

EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.102
Qt Version: 

ADDITIONAL INFORMATION
Application: baloo_file (baloo_file), signal: Aborted
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#6  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#7  0x00007f9cb4895873 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#8  0x00007f9cb4842816 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#9  0x00007f9cb482b81c in __GI_abort () at abort.c:79
#10 0x00007f9cb4c531e3 in mdb_assert_fail.constprop.0 (env=0x55d87b795230, expr_txt=<optimized out>, func=<optimized out>, line=<optimized out>, file=0x7f9cb4c549b0 "mdb.c") at /usr/src/debug/lmdb-0.9.29-1.8.x86_64/libraries/liblmdb/mdb.c:1545
#11 0x00007f9cb4c45825 in mdb_page_dirty (txn=<optimized out>, mp=<optimized out>) at /usr/src/debug/lmdb-0.9.29-1.8.x86_64/libraries/liblmdb/mdb.c:2117
#12 mdb_page_dirty (txn=0x55d87b7965f0, mp=<optimized out>) at /usr/src/debug/lmdb-0.9.29-1.8.x86_64/libraries/liblmdb/mdb.c:2117
#13 0x00007f9cb4c50516 in mdb_page_alloc.isra.0 (num=<optimized out>, mp=0x7f9caeffacb8, mc=<optimized out>) at /usr/src/debug/lmdb-0.9.29-1.8.x86_64/libraries/liblmdb/mdb.c:2311
#14 0x00007f9cb4c4797b in mdb_page_touch (mc=mc@entry=0x7f9caeffb200) at /usr/src/debug/lmdb-0.9.29-1.8.x86_64/libraries/liblmdb/mdb.c:2431
#15 0x00007f9cb4c4970c in mdb_cursor_touch (mc=mc@entry=0x7f9caeffb200) at /usr/src/debug/lmdb-0.9.29-1.8.x86_64/libraries/liblmdb/mdb.c:6536
#16 0x00007f9cb4c4c2e0 in mdb_cursor_put (mc=mc@entry=0x7f9caeffb200, key=key@entry=0x7f9caeffb5f0, data=data@entry=0x7f9caeffb5e0, flags=<optimized out>, flags@entry=0) at /usr/src/debug/lmdb-0.9.29-1.8.x86_64/libraries/liblmdb/mdb.c:6670
#17 0x00007f9cb4c4d227 in mdb_put (txn=0x55d87b7965f0, dbi=8, key=0x7f9caeffb5f0, data=0x7f9caeffb5e0, flags=0) at /usr/src/debug/lmdb-0.9.29-1.8.x86_64/libraries/liblmdb/mdb.c:9045
#18 0x00007f9cb55aaeb4 in Baloo::IdFilenameDB::put (this=this@entry=0x7f9caeffb6a0, docId=<optimized out>, docId@entry=2557773283852326, path=...) at /usr/src/debug/baloo-5.101.0git.20221203T094117~0324690/src/engine/idfilenamedb.cpp:66
#19 0x00007f9cb55ab072 in Baloo::DocumentUrlDB::add (this=this@entry=0x7f9caeffb8b0, id=<optimized out>, id@entry=2557773283852326, parentId=parentId@entry=2556566398042150, name=...) at /usr/src/debug/baloo-5.101.0git.20221203T094117~0324690/src/engine/documenturldb.cpp:161
#20 0x00007f9cb55ac046 in Baloo::DocumentUrlDB::put (docId=<optimized out>, url=..., this=0x7f9caeffb8b0) at /usr/src/debug/baloo-5.101.0git.20221203T094117~0324690/src/engine/documenturldb.cpp:61
#21 Baloo::DocumentUrlDB::put (this=0x7f9caeffb8b0, docId=<optimized out>, url=...) at /usr/src/debug/baloo-5.101.0git.20221203T094117~0324690/src/engine/documenturldb.cpp:27
#22 0x00007f9cb55bdeae in Baloo::WriteTransaction::addDocument (this=0x7f5c98004e20, doc=...) at /usr/src/debug/baloo-5.101.0git.20221203T094117~0324690/src/engine/writetransaction.cpp:42
#23 0x000055d879c1e868 in Baloo::UnindexedFileIndexer::run (this=0x55d87b8e3500) at /usr/src/debug/baloo-5.101.0git.20221203T094117~0324690/src/file/unindexedfileindexer.cpp:58
#24 0x00007f9cb4ef93e1 in QThreadPoolThread::run (this=0x55d87b8e34a0) at thread/qthreadpool.cpp:100
#25 0x00007f9cb4ef5e3d in QThreadPrivate::start (arg=0x55d87b8e34a0) at thread/qthread_unix.cpp:330
#26 0x00007f9cb489398d in start_thread (arg=<optimized out>) at pthread_create.c:442
#27 0x00007f9cb491a380 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7f9caf7fd6c0 (LWP 14650) "baloo_file"):
#1  __pselect (nfds=nfds@entry=5, readfds=readfds@entry=0x7f9caf7f4ba0, writefds=writefds@entry=0x0, exceptfds=exceptfds@entry=0x0, timeout=<optimized out>, timeout@entry=0x7f9caf7f4b90, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:56
#2  0x00007f9cb380eb4f in usbmuxd_listen_inotify () at /usr/src/debug/libusbmuxd-2.0.2-1.11.x86_64/src/libusbmuxd.c:923
#3  0x00007f9cb380f7e3 in usbmuxd_listen () at /usr/src/debug/libusbmuxd-2.0.2-1.11.x86_64/src/libusbmuxd.c:979
#4  device_monitor (data=<optimized out>) at /usr/src/debug/libusbmuxd-2.0.2-1.11.x86_64/src/libusbmuxd.c:1107
#5  0x00007f9cb489398d in start_thread (arg=<optimized out>) at pthread_create.c:442
#6  0x00007f9cb491a380 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7f9cb01ff6c0 (LWP 14647) "QDBusConnection"):
#1  0x00007f9cb391cdbe in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7f9ca80029e0, timeout=<optimized out>, context=0x7f9ca8000c30) at ../glib/gmain.c:4543
#2  g_main_context_iterate (context=context@entry=0x7f9ca8000c30, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4233
#3  0x00007f9cb391cedc in g_main_context_iteration (context=0x7f9ca8000c30, may_block=1) at ../glib/gmain.c:4303
#4  0x00007f9cb5133b6e in QEventDispatcherGlib::processEvents (this=0x7f9ca8000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007f9cb50dab9b in QEventLoop::exec (this=this@entry=0x7f9cb01fec10, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#6  0x00007f9cb4ef4c47 in QThread::exec (this=this@entry=0x7f9cb565b060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007f9cb55e2277 in QDBusConnectionManager::run (this=0x7f9cb565b060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:179
#8  0x00007f9cb4ef5e3d in QThreadPrivate::start (arg=0x7f9cb565b060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:330
#9  0x00007f9cb489398d in start_thread (arg=<optimized out>) at pthread_create.c:442
#10 0x00007f9cb491a380 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7f9cb2ef4940 (LWP 14619) "baloo_file"):
#1  0x00007f9cb391cdbe in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x55d87b7996a0, timeout=<optimized out>, context=0x55d87b776a20) at ../glib/gmain.c:4543
#2  g_main_context_iterate (context=context@entry=0x55d87b776a20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4233
#3  0x00007f9cb391cedc in g_main_context_iteration (context=0x55d87b776a20, may_block=1) at ../glib/gmain.c:4303
#4  0x00007f9cb5133b6e in QEventDispatcherGlib::processEvents (this=0x55d87b7760a0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007f9cb50dab9b in QEventLoop::exec (this=this@entry=0x7ffc8b3ac700, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#6  0x00007f9cb50e2d06 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x000055d879c0b2d8 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/baloo-5.101.0git.20221203T094117~0324690/src/file/main.cpp:78
[Inferior 1 (process 14619) detached]
Comment 1 tagwerk19 2022-12-11 19:06:38 UTC
Baloo running under Gnome? Strange.
Do you have anything unusual configured?
What sort of filesystem, Ext4? BTRFS?
Comment 2 Bug Janitor Service 2022-12-26 05:20:32 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Fushan Wen 2022-12-26 05:21:49 UTC
(In reply to tagwerk19 from comment #1)
> Baloo running under Gnome? Strange.
> Do you have anything unusual configured?
> What sort of filesystem, Ext4? BTRFS?

I installed two desktop environments, and can't remember any unusual configured. I am using btrfs.
Comment 4 tagwerk19 2022-12-27 09:38:50 UTC
(In reply to Fushan Wen from comment #3)
> .... I am using btrfs.
It is strange is that baloo is still running when you have switched to Gnome, I'd expect it to close down when you log out of KDE.

However, there are times when closing down baloo doesn't work, that is if you do a "balooctl disable", you still have the baloo_file process running. 

My gut feeling, as you are using OpenSUSE and BTRFS, it's likely that your home drive has been (re)mounted with a new/different device number and baloo sees a completely new set of files to index (and a large set of files that it had indexed, which have vanished). When baloo sorts through this, it can get stuck and not to respond to signals. Maybe it could still be running after you have logged out and back in under Gnome.

You can see if your database has has grown unexpectedly large with "balooctl indexSize", if it is very large that would be a warning sign, and you can check whether baloo is seeing device numbers changing by comparing "stat" and "balooshow -x" as described here:

    https://bugs.kde.org/show_bug.cgi?id=402154#c12