Bug 347684

Summary: baloo_file crash - FileIQ::fileQueue - mdb_txn_begin
Product: [Frameworks and Libraries] Baloo Reporter: Hrvoje Senjan <hrvoje.senjan>
Component: Baloo File DaemonAssignee: Vishesh Handa <me>
Status: RESOLVED WORKSFORME    
Severity: crash CC: manisandro, nisselarsson000
Priority: NOR Keywords: drkonqi, triaged
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Hrvoje Senjan 2015-05-13 20:29:35 UTC
Application: baloo_file (5.9.90)

Qt Version: 5.4.2
Operating System: Linux 4.0.1-1-desktop x86_64
Distribution: "openSUSE 20150508 (Tumbleweed) (x86_64)"

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

Started a new session with a clean user, baloo_file crashes every time.

The crash can be reproduced every time.

-- Backtrace:
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 0x7ff459df3900 (LWP 7618))]

Thread 2 (Thread 0x7ff444775700 (LWP 7620)):
#0  0x00007ff4567184cd in poll () at /lib64/libc.so.6
#1  0x00007ff45600b202 in  () at /usr/lib64/libxcb.so.1
#2  0x00007ff45600cccf in xcb_wait_for_event () at /usr/lib64/libxcb.so.1
#3  0x00007ff4466facc9 in QXcbEventReader::run() (this=0x2127910) at qxcbconnection.cpp:1105
#4  0x00007ff456d89a7f in QThreadPrivate::start(void*) (arg=0x2127910) at thread/qthread_unix.cpp:337
#5  0x00007ff45107c484 in start_thread () at /lib64/libpthread.so.0
#6  0x00007ff456720a4d in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7ff459df3900 (LWP 7618)):
[KCrash Handler]
#5  0x00007ff4554a4161 in mdb_txn_begin (env=0x0, parent=0x0, flags=131072, ret=0x7ffc223cbf78) at mdb.c:2635
#6  0x000000000041cf1e in Baloo::FileIndexingQueue::fillQueue() (this=0x21bcc70) at /usr/src/debug/baloo-5.9.90git~20150513T161155~54cbd78/src/file/fileindexingqueue.cpp:58
#7  0x0000000000419bda in Baloo::IndexScheduler::slotScheduleIndexing() (this=0x2194f10) at /usr/src/debug/baloo-5.9.90git~20150513T161155~54cbd78/src/file/indexscheduler.cpp:271
#8  0x000000000041a60f in Baloo::IndexScheduler::IndexScheduler(Baloo::Database*, Baloo::FileIndexerConfig*, QObject*) (this=0x2194f10, db=<optimized out>, config=<optimized out>, parent=<optimized out>) at /usr/src/debug/baloo-5.9.90git~20150513T161155~54cbd78/src/file/indexscheduler.cpp:68
#9  0x0000000000415d4c in Baloo::FileIndexer::FileIndexer(Baloo::Database*, Baloo::FileIndexerConfig*, QObject*) (this=0x7ffc223cc410, db=0x7ffc223cc480, config=<optimized out>, parent=<optimized out>) at /usr/src/debug/baloo-5.9.90git~20150513T161155~54cbd78/src/file/fileindexer.cpp:39
#10 0x000000000041559d in main(int, char**) (argc=1, argv=<optimized out>) at /usr/src/debug/baloo-5.9.90git~20150513T161155~54cbd78/src/file/main.cpp:93

Reported using DrKonqi
Comment 1 Hrvoje Senjan 2015-05-13 20:30:46 UTC
p.s.
mkdir -p ~/.local/share/baloo solves the problem
Comment 2 Vishesh Handa 2015-05-19 09:04:41 UTC
I'm not creating the directory on startup. However, I don't think that could be the cause of this bug.

Could you please run it under valgrind?

$ valgrind baloo_file
Comment 3 Vishesh Handa 2015-05-19 11:43:36 UTC
Git commit bebc1742f6f4bf415f9e9075042de63b9bc47645 by Vishesh Handa.
Committed on 19/05/2015 at 09:03.
Pushed by vhanda into branch 'master'.

Create the database directory if it does not exist

M  +5    -0    src/engine/database.cpp

http://commits.kde.org/baloo/bebc1742f6f4bf415f9e9075042de63b9bc47645
Comment 4 Vishesh Handa 2015-05-25 09:37:41 UTC
*** Bug 347842 has been marked as a duplicate of this bug. ***
Comment 5 Vishesh Handa 2015-06-02 13:58:40 UTC
Ping.

Could you please provide a valgrind log if possible?
Comment 6 Sandro Mani 2015-10-03 16:16:21 UTC
Hi, getting the crash also, valgrind output:

==11367== Invalid read of size 4
==11367==    at 0x3B0B9214: mdb_reader_check (in /usr/lib64/liblmdb.so.0.0.0)
==11367==    by 0x3AE7B274: Baloo::Database::open(Baloo::Database::OpenMode) (database.cpp:82)
==11367==    by 0x3AA4A138: Baloo::SearchStore::SearchStore() (searchstore.cpp:51)
==11367==    by 0x3AA390F8: Baloo::Query::exec() (query.cpp:209)
==11367==    by 0x3A82320F: SearchRunner::match(Plasma::RunnerContext&, QString const&, QString const&) (baloosearchrunner.cpp:98)
==11367==    by 0x3A823DAA: SearchRunner::match(Plasma::RunnerContext&) (baloosearchrunner.cpp:162)
==11367==    by 0x2EB13AEF: Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) (in /usr/lib64/libKF5Runner.so.5.14.0)
==11367==    by 0x2ED4A59F: ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) (in /usr/lib64/libKF5ThreadWeaver.so.5.14.0)
==11367==    by 0x2ED49429: ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) (in /usr/lib64/libKF5ThreadWeaver.so.5.14.0)
==11367==    by 0x2ED48B79: ThreadWeaver::Thread::run() (in /usr/lib64/libKF5ThreadWeaver.so.5.14.0)
==11367==    by 0x9A6B54D: QThreadPrivate::start(void*) (qthread_unix.cpp:331)
==11367==    by 0xE0FC6C9: start_thread (in /usr/lib64/libpthread-2.22.90.so)
==11367==  Address 0x31c6e038 is not stack'd, malloc'd or (recently) free'd
Comment 7 Andrew Crouthamel 2018-09-04 19:46:15 UTC
Hello! This project has been replaced with a newer system so I will be closing this bug. If you could please re-test on the latest Baloo. If the issue still present, please open a new bug under "frameworks-baloo". Thank you!
Comment 8 Andrew Crouthamel 2018-09-28 03:08:19 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 set the bug status 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 9 Andrew Crouthamel 2018-10-28 03:19:28 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!