Bug 481616 - Baloo File Extractor crashes on system startup
Summary: Baloo File Extractor crashes on system startup
Status: RESOLVED DUPLICATE of bug 389848
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.115.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords: drkonqi
: 485071 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-21 08:27 UTC by James Clarke
Modified: 2024-05-21 12:41 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Clarke 2024-02-21 08:27:53 UTC
Application: baloo_file_extractor (5.115.0)

Qt Version: 5.15.12
Frameworks Version: 5.115.0
Operating System: Linux 6.7.5-arch1-1 x86_64
Windowing System: Wayland
Distribution: Arch Linux
DrKonqi: 5.27.10 [KCrashBackend]

-- Information about the crash:
I started my system and i got a crash happen of this application, i dont think i ever used it before, it just happened to be something that starts on boot.
I am on the archlinux stable version of plasma so this should not happen.

The crash can be reproduced every time.

-- Backtrace:
Application: Baloo File Extractor (baloo_file_extractor), signal: Aborted
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[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  0x00007874cc0ab393 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#8  0x00007874cc05a6c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#9  0x00007874cc0424b8 in __GI_abort () at abort.c:79
#10 0x00007874cc5ee991 in mdb_assert_fail.constprop.0 (env=0x5c87117b4640, expr_txt=<optimized out>, func=<optimized out>, line=<optimized out>, file=0x7874cc5fb7f1 "mdb.c") at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:1588
#11 0x00007874cc5ecee4 in mdb_page_dirty (txn=<optimized out>, mp=<optimized out>) at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:2172
#12 mdb_page_dirty (txn=0x5c87117b5a00, mp=<optimized out>) at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:2172
#13 0x00007874cc5fa9e6 in mdb_page_alloc.isra.0 (num=<optimized out>, mp=0x7ffd8963d998, mc=<optimized out>) at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:2366
#14 0x00007874cc5f2023 in mdb_page_touch (mc=mc@entry=0x7ffd8963de20) at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:2486
#15 0x00007874cc5f3c6c in mdb_cursor_touch (mc=mc@entry=0x7ffd8963de20) at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:6602
#16 0x00007874cc5f8039 in _mdb_cursor_del (mc=mc@entry=0x7ffd8963de20, flags=flags@entry=32) at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:7176
#17 0x00007874cc5f9938 in _mdb_cursor_del (flags=32, mc=0x7ffd8963de20) at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:7167
#18 mdb_del0 (txn=0x5c87117b5a00, dbi=<optimized out>, key=0x7ffd8963e210, data=<optimized out>, flags=32) at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:8691
#19 0x00007874cd5597f7 in Baloo::DocumentDB::del (this=<optimized out>, docId=<optimized out>) at /usr/src/debug/baloo5/baloo-5.115.0/src/engine/documentdb.cpp:103
#20 0x00007874cd56fcb8 in Baloo::WriteTransaction::removeDocument (this=0x5c87117ee430, id=94741231883520018) at /usr/src/debug/baloo5/baloo-5.115.0/src/engine/writetransaction.cpp:129
#21 0x00005c87103f8f19 in Baloo::App::processNextFile (this=0x7ffd8963e8d0) at /usr/src/debug/baloo5/baloo-5.115.0/src/file/extractor/app.cpp:96
#22 0x00007874cc8cb0a7 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#23 QSingleShotTimer::timerEvent (this=0x5c87117b0240) at kernel/qtimer.cpp:322
#24 0x00007874cc8bb8de in QObject::event (this=0x5c87117b0240, e=0x7ffd8963e510) at kernel/qobject.cpp:1324
#25 0x00007874cc893ef8 in QCoreApplication::notifyInternal2 (receiver=0x5c87117b0240, event=0x7ffd8963e510) at kernel/qcoreapplication.cpp:1064
#26 0x00007874cc8e255b in QTimerInfoList::activateTimers (this=0x5c871175e5b0) at kernel/qtimerinfo_unix.cpp:643
#27 0x00007874cc8e2b4a in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#28 0x00007874cb70df69 in g_main_dispatch (context=0x7874c0000ec0) at ../glib/glib/gmain.c:3476
#29 0x00007874cb76c3a7 in g_main_context_dispatch_unlocked (context=0x7874c0000ec0) at ../glib/glib/gmain.c:4284
#30 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7874c0000ec0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#31 0x00007874cb70c162 in g_main_context_iteration (context=0x7874c0000ec0, may_block=1) at ../glib/glib/gmain.c:4414
#32 0x00007874cc8e2d0c in QEventDispatcherGlib::processEvents (this=0x5c871175a6b0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#33 0x00007874cc892c04 in QEventLoop::exec (this=this@entry=0x7ffd8963e7c0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#34 0x00007874cc8940a3 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#35 0x00007874ccd2bef2 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870
#36 0x00005c87103eed4e in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/baloo5/baloo-5.115.0/src/file/extractor/main.cpp:43
[Inferior 1 (process 79210) detached]

Reported using DrKonqi
Comment 1 tagwerk19 2024-02-21 08:42:57 UTC
(In reply to James Clarke from comment #0)
> ...
> #10 0x00007874cc5ee991 in mdb_assert_fail.constprop.0 (env=0x5c87117b4640, expr_txt=<optimized out>, func=<optimized out>, line=<optimized out>, file=0x7874cc5fb7f1 "mdb.c") at /usr/src/debug/lmdb/openldap/libraries/liblmdb/mdb.c:1588
> ...
> #19 0x00007874cd5597f7 in Baloo::DocumentDB::del (this=<optimized out>, docId=<optimized out>) at /usr/src/debug/baloo5/baloo-5.115.0/src/engine/documentdb.cpp:103
> #20 0x00007874cd56fcb8 in Baloo::WriteTransaction::removeDocument (this=0x5c87117ee430, id=94741231883520018) at /usr/src/debug/baloo5/baloo-5.115.0/src/engine/writetransaction.cpp:129
> ...
Seems that "clean up" after deleting file is particularly fragile, there seems to be a fair number of crashes happening after a "removeDocument". Not all crashes, certainly, but many...

There's a suspicion here: https://bugs.kde.org/show_bug.cgi?id=389848#c178
> In the middle of txn 0x5638e7e58130 the init sequence occurs again, and all of the
> contents of this logfile are only being written by a single process. That means baloo_file
> has opened the same env twice in the same process, which is explicitly forbidden by the
> LMDB docs. http://www.lmdb.tech/doc/
Maybe the issue can be pinned down to the delete code...
Comment 2 tagwerk19 2024-02-21 13:24:35 UTC
(In reply to tagwerk19 from comment #1)
> ... there seems to be a fair number of crashes happening after a "removeDocument". Not
> all crashes, certainly, but many...
See:
    Bug 405284
    Bug 467769
    Bug 472197
    Bug 472540
    Bug 481429
Comment 3 Christoph Cullmann 2024-03-14 20:40:50 UTC
We always delete the lock file, until that is fixed, all hope is lost, see the linked bug.

*** This bug has been marked as a duplicate of bug 389848 ***
Comment 4 Christoph Cullmann 2024-04-11 19:45:03 UTC
*** Bug 485071 has been marked as a duplicate of this bug. ***