Bug 372880 - baloo_file crashes in Baloo::IdFilenameDB::get()
Summary: baloo_file crashes in Baloo::IdFilenameDB::get()
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.18.0
Platform: unspecified Linux
: HI crash
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords: drkonqi
: 375190 380028 385846 393756 393896 403620 405084 405170 406064 406317 406378 410097 411842 416197 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-24 10:58 UTC by Solerman Kaplon
Modified: 2021-03-25 18:29 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (4.47 KB, text/plain)
2019-04-02 16:44 UTC, Reinhard Auner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Solerman Kaplon 2016-11-24 10:58:41 UTC
Application: baloo_file (5.18.0)

Qt Version: 5.5.1
Operating System: Linux 4.4.0-47-generic x86_64
Distribution: Ubuntu 16.04.1 LTS

-- Information about the crash:
- What I was doing when the application crashed:

Configuring kmail for use, nothing much special desktop. Couldn't find which file caused the problem

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

Thread 2 (Thread 0x7f88fa06e700 (LWP 12319)):
#0  0x00007f8a43230b5d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f8a4040139c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f88f40418c0, timeout=<optimized out>, context=0x7f88f40030b0) at /build/glib2.0-7IO_Yw/glib2.0-2.48.1/./glib/gmain.c:4135
#2  0x00007f8a4040139c in g_main_context_iterate (context=context@entry=0x7f88f40030b0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-7IO_Yw/glib2.0-2.48.1/./glib/gmain.c:3835
#3  0x00007f8a404014ac in g_main_context_iteration (context=0x7f88f40030b0, may_block=may_block@entry=1) at /build/glib2.0-7IO_Yw/glib2.0-2.48.1/./glib/gmain.c:3901
#4  0x00007f8a43e667eb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f88f4003320, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#5  0x00007f8a43e0db4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f88fa06dbc0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x0000000000420cd8 in Baloo::FileContentIndexer::run() (this=0x2211500) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/src/file/filecontentindexer.cpp:71
#7  0x00007f8a43c2c2d3 in QThreadPoolThread::run() (this=0x2455d00) at thread/qthreadpool.cpp:93
#8  0x00007f8a43c2f7be in QThreadPrivate::start(void*) (arg=0x2455d00) at thread/qthread_unix.cpp:331
#9  0x00007f8a4289370a in start_thread (arg=0x7f88fa06e700) at pthread_create.c:333
#10 0x00007f8a4323c82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f8a451148c0 (LWP 10950)):
[KCrash Handler]
#6  0x00007f8a4430073b in Baloo::IdFilenameDB::get(unsigned long long) (this=this@entry=0x7ffc45080ac0, docId=docId@entry=4513297663526917) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/src/engine/idfilenamedb.cpp:96
#7  0x00007f8a44315984 in Baloo::WriteTransaction::replaceDocument(Baloo::Document const&, QFlags<Baloo::DocumentOperation>) (shouldDeleteFolder=..., url=..., docId=4513297663526917, this=0x7ffc45080ab0) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/src/engine/documenturldb.h:92
#8  0x00007f8a44315984 in Baloo::WriteTransaction::replaceDocument(Baloo::Document const&, QFlags<Baloo::DocumentOperation>) (this=<optimized out>, doc=..., operations=...) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/src/engine/writetransaction.cpp:231
#9  0x00007f8a4430e019 in Baloo::Transaction::replaceDocument(Baloo::Document const&, QFlags<Baloo::DocumentOperation>) (this=this@entry=0x7ffc45080ce0, doc=..., operations=..., operations@entry=...) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/src/engine/transaction.cpp:254
#10 0x0000000000429a25 in Baloo::MetadataMover::updateMetadata(Baloo::Transaction*, QString const&, QString const&) (this=this@entry=0x223dc50, tr=tr@entry=0x7ffc45080ce0, from=..., to=...) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/src/file/metadatamover.cpp:116
#11 0x000000000042a023 in Baloo::MetadataMover::moveFileMetadata(QString const&, QString const&) (this=0x223dc50, from=..., to=...) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/src/file/metadatamover.cpp:56
#12 0x00007f8a43e3ebaf in QMetaObject::activate(QObject*, int, int, void**) (a=0x7ffc45080e40, r=0x7ffc45081500, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#13 0x00007f8a43e3ebaf in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x221a3d0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=7, argv=argv@entry=0x7ffc45080e40) at kernel/qobject.cpp:3698
#14 0x00007f8a43e3f537 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x221a3d0, m=m@entry=0x644cc0 <KInotify::staticMetaObject>, local_signal_index=local_signal_index@entry=7, argv=argv@entry=0x7ffc45080e40) at kernel/qobject.cpp:3578
#15 0x000000000042aaba in KInotify::moved(QString const&, QString const&) (this=this@entry=0x221a3d0, _t1=..., _t2=...) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/obj-x86_64-linux-gnu/src/file/moc_kinotify.cpp:330
#16 0x000000000042cbff in KInotify::slotEvent(int) (this=<optimized out>, socket=<optimized out>) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/src/file/kinotify.cpp:421
#17 0x00007f8a43e3ebaf in QMetaObject::activate(QObject*, int, int, void**) (a=0x7ffc450810d0, r=0x221a3d0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#18 0x00007f8a43e3ebaf in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x22764c0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffc450810d0) at kernel/qobject.cpp:3698
#19 0x00007f8a43e3f537 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x22764c0, m=m@entry=0x7f8a44059780 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffc450810d0) at kernel/qobject.cpp:3578
#20 0x00007f8a43ebe24e in QSocketNotifier::activated(int, QSocketNotifier::QPrivateSignal) (this=this@entry=0x22764c0, _t1=13) at .moc/moc_qsocketnotifier.cpp:134
#21 0x00007f8a43e4b1cb in QSocketNotifier::event(QEvent*) (this=0x22764c0, e=<optimized out>) at kernel/qsocketnotifier.cpp:260
#22 0x00007f8a43e1036c in QCoreApplication::notifyInternal(QObject*, QEvent*) (event=0x7ffc45081190, receiver=0x22764c0, this=0x7ffc45081460) at kernel/qcoreapplication.cpp:1038
#23 0x00007f8a43e1036c in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7ffc45081460, receiver=0x22764c0, event=event@entry=0x7ffc45081190) at kernel/qcoreapplication.cpp:965
#24 0x00007f8a43e66c95 in socketNotifierSourceDispatch(GSource*, GSourceFunc, gpointer) (event=0x7ffc45081190, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:224
#25 0x00007f8a43e66c95 in socketNotifierSourceDispatch(GSource*, GSourceFunc, gpointer) (source=0x2187f00) at kernel/qeventdispatcher_glib.cpp:101
#26 0x00007f8a404011a7 in g_main_context_dispatch (context=0x2187b10) at /build/glib2.0-7IO_Yw/glib2.0-2.48.1/./glib/gmain.c:3154
#27 0x00007f8a404011a7 in g_main_context_dispatch (context=context@entry=0x2187b10) at /build/glib2.0-7IO_Yw/glib2.0-2.48.1/./glib/gmain.c:3769
#28 0x00007f8a40401400 in g_main_context_iterate (context=context@entry=0x2187b10, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-7IO_Yw/glib2.0-2.48.1/./glib/gmain.c:3840
#29 0x00007f8a404014ac in g_main_context_iteration (context=0x2187b10, may_block=may_block@entry=1) at /build/glib2.0-7IO_Yw/glib2.0-2.48.1/./glib/gmain.c:3901
#30 0x00007f8a43e667cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x2187d90, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#31 0x00007f8a43e0db4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffc450813a0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#32 0x00007f8a43e15bec in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1229
#33 0x000000000041698c in main(int, char**) (argc=1, argv=<optimized out>) at /build/baloo-kf5-wIK3t6/baloo-kf5-5.18.0/src/file/main.cpp:88

Reported using DrKonqi
Comment 1 Nate Graham 2018-11-26 20:03:29 UTC
*** Bug 385846 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2018-11-26 20:03:31 UTC
*** Bug 393756 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2018-11-26 20:03:33 UTC
*** Bug 393896 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2018-11-26 20:11:33 UTC
*** Bug 375190 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2018-11-26 20:25:40 UTC
*** Bug 380028 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2019-02-06 04:00:58 UTC
*** Bug 403620 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2019-03-08 00:10:01 UTC
*** Bug 405084 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2019-03-08 15:08:22 UTC
*** Bug 405170 has been marked as a duplicate of this bug. ***
Comment 9 Valerii Malov 2019-03-13 21:50:41 UTC
Git commit eb68430ae5f4fc4c4a2e5b1798683ff6a639ad3d by Valerii Malov.
Committed on 13/03/2019 at 21:50.
Pushed by valeriymalov into branch 'master'.

Baloo engine: treat every non-success code as a failure

Summary:
Treating only MDB_NOTFOUND as an error leads to use of uninitliazed
pointers and handle IDs in other cases (e.g. when get fails with
MDB_BAD_TXN) and wreaks havoc in the application.
Related: bug 361186, bug 390823, bug 395888, bug 367480, bug 403720

Reviewers: #baloo, bruns, poboiko

Reviewed By: #baloo, bruns

Subscribers: cullmann, ngraham, bruns, kde-frameworks-devel, #baloo

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D18664

M  +12   -9    src/engine/database.cpp
M  +26   -17   src/engine/documentdatadb.cpp
M  +30   -22   src/engine/documentdb.cpp
M  +30   -22   src/engine/documentiddb.cpp
M  +25   -16   src/engine/documenttimedb.cpp
M  +0    -1    src/engine/documenturldb.cpp
M  +4    -3    src/engine/documenturldb.h
M  +4    -5    src/engine/fsutils.cpp
M  +28   -15   src/engine/idfilenamedb.cpp
M  +22   -13   src/engine/idtreedb.cpp
M  +37   -29   src/engine/mtimedb.cpp
M  +0    -2    src/engine/phraseanditerator.cpp
M  +24   -19   src/engine/positiondb.cpp
M  +31   -27   src/engine/postingdb.cpp
M  +47   -13   src/engine/transaction.cpp
M  +4    -4    src/engine/transaction.h
M  +3    -2    src/file/extractorprocess.cpp
M  +5    -5    src/file/fileindexscheduler.cpp
M  +5    -4    src/file/indexcleaner.cpp
M  +0    -1    src/file/main.cpp
M  +1    -1    src/file/metadatamover.cpp

https://commits.kde.org/baloo/eb68430ae5f4fc4c4a2e5b1798683ff6a639ad3d
Comment 10 Nate Graham 2019-04-01 18:08:43 UTC
*** Bug 406064 has been marked as a duplicate of this bug. ***
Comment 11 Reinhard Auner 2019-04-02 16:44:37 UTC
Created attachment 119213 [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 had open Google Chrome and was surfing the internet - additionally, amarok was running.

-- Backtrace (Reduced):
#6  Baloo::IdFilenameDB::get (this=this@entry=0x7f33d3bcb9f0, docId=<optimized out>, docId@entry=11059540789267) at /usr/src/debug/baloo5-5.55.0-lp151.2.2.x86_64/src/engine/idfilenamedb.cpp:96
#7  0x00007f73de612d1f in Baloo::DocumentUrlDB::get (this=this@entry=0x7f33d3bcba70, docId=docId@entry=11059540789267) at /usr/src/debug/baloo5-5.55.0-lp151.2.2.x86_64/src/engine/documenturldb.cpp:134
#8  0x00007f73de623734 in Baloo::Transaction::documentUrl (this=this@entry=0x7f33d3bcbb20, id=id@entry=11059540789267) at /usr/src/debug/baloo5-5.55.0-lp151.2.2.x86_64/src/engine/transaction.cpp:104
#9  0x000055baa424071e in Baloo::UnindexedFileIndexer::run (this=0x55baa696fec0) at /usr/src/debug/baloo5-5.55.0-lp151.2.2.x86_64/src/file/unindexedfileindexer.cpp:62
#10 0x00007f73dda6fe22 in QThreadPoolThread::run (this=0x55baa6977100) at thread/qthreadpool.cpp:99
Comment 12 Nate Graham 2019-04-09 00:18:51 UTC
*** Bug 406317 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2019-04-12 18:04:26 UTC
*** Bug 406378 has been marked as a duplicate of this bug. ***
Comment 14 Graham P Davis 2019-04-30 10:59:17 UTC
Four days ago, I rebooted my Tumbleweed system after some software upgrades and got no warning pop-up messages. The baloo_file_extractor is finally doing something. For all the four days, it, and 14 tags.so processes have been using 98-100% of each of the 12 CPU cores continuously. They do not appear to be impeding other processes so no worries on that score. I'll just leave things alone and assume they'll be finished whatever it is they're doing one of these days.
Comment 15 Nate Graham 2019-07-22 17:16:11 UTC
*** Bug 410097 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2019-09-12 15:27:55 UTC
*** Bug 411842 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2020-01-14 23:18:27 UTC
*** Bug 416197 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2020-10-26 16:20:21 UTC
No duplicate report is newer than Frameworks 5.55, which is almost two years old. After all the bugfixing work done during that time, I think we can call this fixed!