Bug 362333

Summary: baloo_file Closed Unexpectedly a short while after starting KDE
Product: [Frameworks and Libraries] frameworks-baloo Reporter: Steve Youngs <steve>
Component: EngineAssignee: Pinak Ahuja <pinak.ahuja>
Status: RESOLVED DUPLICATE    
Severity: crash CC: aspotashev, christoph, pinak.ahuja, theivorytower
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Steve Youngs 2016-04-27 04:04:37 UTC
Application: baloo_file (5.21.0)
 (Compiled from sources)
Qt Version: 5.6.1
Frameworks Version: 5.21.0
Operating System: Linux 4.5.0-12626-g15dbc13 x86_64

-- Information about the crash:
It happens onces per session, a couple of minutes after startup.

The crash can be reproduced every time.

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

Thread 3 (Thread 0x7fec14f90700 (LWP 1984)):
#0  0x00007fec2c81379d in read () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fec2709f810 in g_wakeup_acknowledge (wakeup=0x1817bc0) at /usr/src/glib/glib/glib/gwakeup.c:210
#2  0x00007fec2705d504 in g_main_context_check (context=context@entry=0x7fec10000990, max_priority=2147483647, fds=fds@entry=0x7fec10003220, n_fds=n_fds@entry=1) at /usr/src/glib/glib/glib/gmain.c:3632
#3  0x00007fec2705d978 in g_main_context_iterate (context=context@entry=0x7fec10000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /usr/src/glib/glib/glib/gmain.c:3837
#4  0x00007fec2705dadc in g_main_context_iteration (context=0x7fec10000990, may_block=1) at /usr/src/glib/glib/glib/gmain.c:3901
#5  0x00007fec2d8f31e4 in QEventDispatcherGlib::processEvents (this=0x7fec100008c0, flags=...) at /usr/src/qt/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:419
#6  0x00007fec2d8753ec in QEventLoop::processEvents (this=0x7fec14f8fc30, flags=...) at /usr/src/qt/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:128
#7  0x00007fec2d8756e8 in QEventLoop::exec (this=0x7fec14f8fc30, flags=...) at /usr/src/qt/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:204
#8  0x00007fec2d63f3bc in QThread::exec (this=0x7fec2eec3000 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at /usr/src/qt/qt5/qtbase/src/corelib/thread/qthread.cpp:504
#9  0x00007fec2ec29bf0 in QDBusConnectionManager::run (this=0x7fec2eec3000 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at /usr/src/qt/qt5/qtbase/src/dbus/qdbusconnection.cpp:181
#10 0x00007fec2d64742b in QThreadPrivate::start (arg=0x7fec2eec3000 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at /usr/src/qt/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:340
#11 0x00007fec2ac23084 in start_thread (arg=0x7fec14f90700) at pthread_create.c:309
#12 0x00007fec2c81fead in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7feacffff700 (LWP 3266)):
[KCrash Handler]
#6  0x00007fec2c76ad47 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007fec2c76c0f8 in __GI_abort () at abort.c:89
#8  0x00007fec2d631e5d in qt_message_fatal (context=..., message=...) at /usr/src/qt/qt5/qtbase/src/corelib/global/qlogging.cpp:1645
#9  0x00007fec2d62e170 in QMessageLogger::fatal (this=0x7feacfffe890, msg=0x7fec2d9aecf0 "ASSERT: \"%s\" in file %s, line %d") at /usr/src/qt/qt5/qtbase/src/corelib/global/qlogging.cpp:790
#10 0x00007fec2d6275ee in qt_assert (assertion=0x7fec2e0e3f15 "info.mTime", file=0x7fec2e0e3e90 "/usr/src/kde/kf5src/frameworks/baloo/src/engine/documenttimedb.cpp", line=61) at /usr/src/qt/qt5/qtbase/src/corelib/global/qglobal.cpp:2999
#11 0x00007fec2e0c52ca in Baloo::DocumentTimeDB::put (this=0x7feacfffe9b0, docId=27587086043318277, info=...) at /usr/src/kde/kf5src/frameworks/baloo/src/engine/documenttimedb.cpp:61
#12 0x00007fec2e0db89c in Baloo::WriteTransaction::addDocument (this=0x7feac8002f90, doc=...) at /usr/src/kde/kf5src/frameworks/baloo/src/engine/writetransaction.cpp:80
#13 0x00007fec2e0d6f1d in Baloo::Transaction::addDocument (this=0x7feacfffea50, doc=...) at /usr/src/kde/kf5src/frameworks/baloo/src/engine/transaction.cpp:226
#14 0x00000000004159b8 in Baloo::FirstRunIndexer::run (this=0x1974c40) at /usr/src/kde/kf5src/frameworks/baloo/src/file/firstrunindexer.cpp:76
#15 0x00007fec2d640bdb in QThreadPoolThread::run (this=0x1a30bd0) at /usr/src/qt/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:93
#16 0x00007fec2d64742b in QThreadPrivate::start (arg=0x1a30bd0) at /usr/src/qt/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:340
#17 0x00007fec2ac23084 in start_thread (arg=0x7feacffff700) at pthread_create.c:309
#18 0x00007fec2c81fead in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7fec2f372900 (LWP 1983)):
#0  0x00007fec2c81379d in read () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fec2709f810 in g_wakeup_acknowledge (wakeup=0x1817810) at /usr/src/glib/glib/glib/gwakeup.c:210
#2  0x00007fec2705d504 in g_main_context_check (context=context@entry=0x18175e0, max_priority=2147483647, fds=fds@entry=0x182d3e0, n_fds=n_fds@entry=3) at /usr/src/glib/glib/glib/gmain.c:3632
#3  0x00007fec2705d978 in g_main_context_iterate (context=context@entry=0x18175e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /usr/src/glib/glib/glib/gmain.c:3837
#4  0x00007fec2705dadc in g_main_context_iteration (context=0x18175e0, may_block=1) at /usr/src/glib/glib/glib/gmain.c:3901
#5  0x00007fec2d8f31b5 in QEventDispatcherGlib::processEvents (this=0x18172f0, flags=...) at /usr/src/qt/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:417
#6  0x00007fec2d8753ec in QEventLoop::processEvents (this=0x7ffd9a84fa20, flags=...) at /usr/src/qt/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:128
#7  0x00007fec2d8756e8 in QEventLoop::exec (this=0x7ffd9a84fa20, flags=...) at /usr/src/qt/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:204
#8  0x00007fec2d8791c0 in QCoreApplication::exec () at /usr/src/qt/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1285
#9  0x000000000040cbea in main (argc=1, argv=0x7ffd9a84fe98) at /usr/src/kde/kf5src/frameworks/baloo/src/file/main.cpp:88

Possible duplicates by query: bug 361817, bug 356019, bug 355096, bug 354692, bug 353914.

Reported using DrKonqi
Comment 1 Steve Youngs 2016-05-06 02:38:37 UTC
I seem to have found a way around this.

`balooctl status' was telling me that there wasn't any files indexed which made me think that this bug was biting pretty early in the process and it wasn't even getting to the initial indexing stage.  I tentatively tried 'balooctl index somedir/*' and that gave me a few files in the index.

I then decided (probably foolishly) that if I could manually index one directory, why not do the whole dang lot, so...

  $ find ${HOME} -type d -exec sh -c 'balooctl index {}/*' \;

That took a LONG time, I can't tell you exactly how long because I stopped it after it went beyond 24 hours!  And it hit a few bumps along the way.  Had a few of

"ASSERT failure in PositionDB::put: "MDB_MAP_FULL: Environment mapsize limit reached", file /usr/src/kde/kf5src/frameworks/baloo/src/engine/positiondb.cpp, line 80 "

At this point I had just on 170K files in the index (indexer wasn't running).  I crossed my fingers and restarted KDE.  The bug hit just like always.  Then it occurred to me that the bug was preventing the initial indexing, but I had pretty much done that manually now.  ~/.config/baloofilerc hinted that the initial indexing had not been done.  So maybe all I had to do was change the config...

  $ sed -i 's/\(first run=\)true/\1false/' ~/.config/baloofilerc

More finger crossing, another KDE restart.  This time... success!  Didn't get the crash, and baloo seems to be functioning properly.  Searching via krunner, or baloosearch is working just how I'd expect.  balooshow is returning good info.  New files are getting added to the index automatically, likewise deleted files are being removed.

  $ balooctl status
Baloo File Indexer is running
Indexer state: Indexing file content
Indexed 170229 / 170229 files
Current size of index is 1,021.54 MiB

I am now happy and this bug is no longer affecting me.
Comment 2 Christoph Cullmann 2016-09-11 11:51:06 UTC
Same bogus mtime assert as in the the other bug.

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