Bug 341991 - Tagging large amounts of files causes segmentation fault crash
Summary: Tagging large amounts of files causes segmentation fault crash
Status: RESOLVED FIXED
Alias: None
Product: Baloo
Classification: Frameworks and Libraries
Component: General (show other bugs)
Version: 0.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Vishesh Handa
URL:
Keywords:
: 342855 346997 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-18 02:43 UTC by David M
Modified: 2015-05-03 13:41 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (5.12 KB, text/plain)
2015-03-22 15:58 UTC, Jacek Pawlyta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David M 2014-12-18 02:43:49 UTC
Dolphin: 14.11.97 (beta from Arch kde-beta repo)
using KDE 4.14.3 (but using KDE frameworks 5.5, plasma 5.1.2)

When trying to tag large amounts of files (>60) a segmentation fault seems to occur most of the time.  It seems the more files tagged the greater the chances of a crash.  I've also noticed this happen in previous versions at least from two months ago.

The only suspicious entries I see in the journal are:

Dec 17 21:10:17 system baloo_file[859]: Could not obtain lock for Xapian Database. This is bad

In .xsession-errors the following seems related:

---------
dolphin(3608): Bananana Error 
dolphin(3608):  
dolphin(3608): Bananana Error 
dolphin(3608): Could not obtain lock for Xapian Database. This is bad 
dolphin(3608):  
dolphin(3608): Could not obtain lock for Xapian Database. This is bad 
dolphin(3608): Serious Error:   
dolphin(3608): Error opening table `/home/david/.local/share/baloo/file/record.':
Couldn't open /home/david/.local/share/baloo/file/record.baseA: Too many open files
Couldn't open /home/david/.local/share/baloo/file/record.baseB: Too many open files
  DatabaseOpeningError: Error opening table `/home/david/.local/share/baloo/file/record.':
Couldn't open /home/david/.local/share/baloo/file/record.baseA: Too many open files
Couldn't open /home/david/.local/share/baloo/file/record.baseB: Too many open files
 
KCrash: Application 'dolphin' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
KCrash: Connect sock_file=/home/david/.kde4/socket-dellt3400/kdeinit4__0
------

So it looks like perhaps I need to adjust the amount of open files allowed somewhere in my configuration.  I will investigate,do that and report back, however, I don't think Dolphin is supposed to crash under this condition and probably should handle it more gracefully.

More system info:

extra/baloo-frameworks 5.1.2-1 [installed]
extra/baloo4-akonadi 4.14.3-1 [installed]
extra/baloo4-widgets 4.14.3-1 [installed]
extra/libbaloo4 4.14.3-1 [installed]
extra/xapian-core 1:1.2.19-1 [installed]
kde-beta/kdebase-dolphin 14.11.97-1 (kde kdebase) [installed]
kde-beta/kdesdk-dolphin-plugins 14.11.97-1 (kde kdesdk) [installed]
extra/kdesdk-dolphin-plugins 4.14.3-1 (kde kdesdk) [installed: 14.11.97-1]

Linux system 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64 GNU/Linux

Thank you and please let me know if further info would help.
Comment 1 Christoph Feck 2014-12-18 02:46:29 UTC
If this crash is reproducible on your system, please add the backtrace. For more information, please see https://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 2 Arjun AK 2014-12-19 10:32:35 UTC
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
81	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7f95d3cd8900 (LWP 8810))]

Thread 3 (Thread 0x7f95aa606700 (LWP 9836)):
#0  0x00007fff319feb27 in clock_gettime ()
#1  0x00007f95cd5c79fd in __GI___clock_gettime (clock_id=<optimized out>, tp=<optimized out>) at ../sysdeps/unix/clock_gettime.c:115
#2  0x00007f95ce6104e5 in qt_gettime() (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  0x00007f95ce6104e5 in qt_gettime() () at tools/qelapsedtimer_unix.cpp:144
#4  0x00007f95ce6f2855 in QTimerInfoList::timerWait(timeval&) (this=0x7f95a40030e0) at kernel/qeventdispatcher_unix.cpp:354
#5  0x00007f95ce6f2855 in QTimerInfoList::timerWait(timeval&) (this=0x7f95a40030e0, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0x00007f95ce6f10fc in timerSourcePrepareHelper(GTimerSource*, gint*) (src=<optimized out>, timeout=0x7f95aa605ab4) at kernel/qeventdispatcher_glib.cpp:143
#7  0x00007f95ce6f11c5 in timerSourcePrepare(GSource*, gint*) (source=<optimized out>, timeout=timeout@entry=0x7f95aa605ab4) at kernel/qeventdispatcher_glib.cpp:176
#8  0x00007f95c7e733ed in g_main_context_prepare (context=context@entry=0x7f95a40009a0, priority=priority@entry=0x7f95aa605b40) at gmain.c:3399
#9  0x00007f95c7e73d4b in g_main_context_iterate (context=context@entry=0x7f95a40009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3761
#10 0x00007f95c7e73f3c in g_main_context_iteration (context=0x7f95a40009a0, may_block=1) at gmain.c:3842
#11 0x00007f95ce6f1a3e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f95a40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:452
#12 0x00007f95ce6c1261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f95aa605c80, flags=...) at kernel/qeventloop.cpp:149
#13 0x00007f95ce6c15c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f95aa605c80, flags=...) at kernel/qeventloop.cpp:204
#14 0x00007f95ce5b6b59 in QThread::exec() (this=this@entry=0x1c40c00) at thread/qthread.cpp:538
#15 0x00007f95ce6a1cc3 in QInotifyFileSystemWatcherEngine::run() (this=0x1c40c00) at io/qfilesystemwatcher_inotify.cpp:265
#16 0x00007f95ce5b93bf in QThreadPrivate::start(void*) (arg=0x1c40c00) at thread/qthread_unix.cpp:349
#17 0x00007f95ce32852a in start_thread (arg=0x7f95aa606700) at pthread_create.c:310
#18 0x00007f95cd5b977d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f95a9e05700 (LWP 9884)):
#0  0x00007f95cd5ae1dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f95c7e73e24 in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f959c0013e0, timeout=-1, context=0x7f959c0009a0) at gmain.c:4076
#2  0x00007f95c7e73e24 in g_main_context_iterate (context=context@entry=0x7f959c0009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3776
#3  0x00007f95c7e73f3c in g_main_context_iteration (context=0x7f959c0009a0, may_block=1) at gmain.c:3842
#4  0x00007f95ce6f1a3e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f959c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:452
#5  0x00007f95ce6c1261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f95a9e04cd0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f95ce6c15c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f95a9e04cd0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f95ce5b6b59 in QThread::exec() (this=<optimized out>) at thread/qthread.cpp:538
#8  0x00007f95ce5b93bf in QThreadPrivate::start(void*) (arg=0x1f50120) at thread/qthread_unix.cpp:349
#9  0x00007f95ce32852a in start_thread (arg=0x7f95a9e05700) at pthread_create.c:310
#10 0x00007f95cd5b977d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f95d3cd8900 (LWP 8810)):
[KCrash Handler]
#6  0x00007f95caa207f8 in Xapian::Database::get_document(unsigned int) const () at /lib64/libxapian.so.22
#7  0x00007f95ca5ac724 in Baloo::XapianDatabase::document(unsigned int) (this=0x528cb10, id=54319) at /usr/src/debug/baloo-4.14.3/src/xapian/xapiandatabase.cpp:159
#8  0x00007f95d22e922a in Baloo::FileModifyJob::doStart() (this=0x1f80f20) at /usr/src/debug/baloo-4.14.3/src/file/lib/filemodifyjob.cpp:144
#9  0x00007f95ce6db951 in QObject::event(QEvent*) (this=0x1f80f20, e=<optimized out>) at kernel/qobject.cpp:1222
#10 0x00007f95cf554efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x19b21f0, receiver=receiver@entry=0x1f80f20, e=e@entry=0x2890100) at kernel/qapplication.cpp:4565
#11 0x00007f95cf55b958 in QApplication::notify(QObject*, QEvent*) (this=this@entry=0x7fff318ec8b0, receiver=receiver@entry=0x1f80f20, e=e@entry=0x2890100) at kernel/qapplication.cpp:4351
#12 0x00007f95d02c89ea in KApplication::notify(QObject*, QEvent*) (this=0x7fff318ec8b0, receiver=0x1f80f20, event=0x2890100) at /usr/src/debug/kdelibs-4.14.3/kdeui/kernel/kapplication.cpp:311
#13 0x00007f95ce6c270d in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7fff318ec8b0, receiver=receiver@entry=0x1f80f20, event=event@entry=0x2890100) at kernel/qcoreapplication.cpp:953
#14 0x00007f95ce6c59d1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (event=0x2890100, receiver=0x1f80f20) at kernel/qcoreapplication.h:231
#15 0x00007f95ce6c59d1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x196bbe0) at kernel/qcoreapplication.cpp:1577
#16 0x00007f95ce6c5e63 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#17 0x00007f95ce6f18ae in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) () at kernel/qcoreapplication.h:236
#18 0x00007f95ce6f18ae in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x19a0100) at kernel/qeventdispatcher_glib.cpp:300
#19 0x00007f95c7e73aeb in g_main_context_dispatch (context=0x19b2950) at gmain.c:3111
#20 0x00007f95c7e73aeb in g_main_context_dispatch (context=context@entry=0x19b2950) at gmain.c:3710
#21 0x00007f95c7e73e88 in g_main_context_iterate (context=context@entry=0x19b2950, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#22 0x00007f95c7e73f3c in g_main_context_iteration (context=0x19b2950, may_block=1) at gmain.c:3842
#23 0x00007f95ce6f1a1e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x196d530, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#24 0x00007f95cf5f8136 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#25 0x00007f95ce6c1261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff318ec790, flags=...) at kernel/qeventloop.cpp:149
#26 0x00007f95ce6c15c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff318ec790, flags=...) at kernel/qeventloop.cpp:204
#27 0x00007f95ce6c6ca9 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1225
#28 0x00007f95cf55339c in QApplication::exec() () at kernel/qapplication.cpp:3823
#29 0x00007f95d390d4ce in kdemain(int, char**) (argc=1, argv=0x7fff318ec9f8) at /usr/src/debug/kde-baseapps-4.14.3/dolphin/src/main.cpp:93
#30 0x00007f95cd4d8fe0 in __libc_start_main (main=0x4008e0 <main(int, char**)>, argc=1, argv=0x7fff318ec9f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff318ec9e8) at libc-start.c:289
#31 0x000000000040090e in _start ()
Comment 3 Arjun AK 2014-12-19 10:49:45 UTC
Steps to reproduce:

1. Create a large number of files.
2. Using dolphin add a tag to these files.

It crashes when it reaches the 250th file.
Comment 4 Vishesh Handa 2014-12-22 16:00:38 UTC
I'm guessing that the Dophin being used is the Qt4 version. When Dophin moves to KF5, this should be fixed as it will no longer be writing to the Baloo database directly.
Comment 5 Arjun AK 2015-01-15 10:42:14 UTC
*** Bug 342855 has been marked as a duplicate of this bug. ***
Comment 6 Jacek Pawlyta 2015-03-22 15:58:59 UTC
Created attachment 91686 [details]
New crash information added by DrKonqi

dolphin (14.12.3) on KDE Platform 4.14.6 using Qt 4.8.6

- What I was doing when the application crashed:

tagging several graphic files and two video files

-- Backtrace (Reduced):
#6  0x0000003f722497f8 in Xapian::Database::get_document(unsigned int) const () at /lib64/libxapian.so.22
#7  0x000000323160c724 in Baloo::XapianDatabase::document(unsigned int) () at /lib64/libbalooxapian.so.4
#8  0x00007ff8b897322a in Baloo::FileModifyJob::doStart() () at /lib64/libbaloofiles.so.4
#9  0x0000003b3439f3d1 in QObject::event(QEvent*) () at /lib64/libQtCore.so.4
#10 0x00007ff8b6fb2efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQtGui.so.4
Comment 7 Emmanuel Pescosta 2015-05-03 13:41:26 UTC
*** Bug 346997 has been marked as a duplicate of this bug. ***