Bug 279492 - Nepomuk stub crashed on log out
Summary: Nepomuk stub crashed on log out
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-05 23:52 UTC by Alexey Chernov
Modified: 2011-09-29 14:06 UTC (History)
1 user (show)

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


Attachments
Patch against kde-runtime (1.25 KB, patch)
2011-09-20 12:08 UTC, Sebastian Trueg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Chernov 2011-08-05 23:52:05 UTC
Application: nepomukservicestub (0.2)
KDE Platform Version: 4.7.00 (4.7.0) (Compiled from sources)
Qt Version: 4.7.3
Operating System: Linux 2.6.39.1 x86_64

-- Information about the crash:
- What I was doing when the application crashed:
Nepomuk stub suddenly crashed when I was logging out of KDE. It seems that all the programs were already closed and last KDE services were stopping (i.e. late stages of log out).

-- Backtrace:
Application: Заглушка службы Nepomuk (nepomukservicestub), signal: Segmentation fault
pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
	in ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
[Current thread is 1 (Thread 0x7f36e7d90760 (LWP 18985))]

Thread 4 (Thread 0x7f36c5543710 (LWP 19139)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007f36c5542ad0 in ?? ()
#2  0x00007fff888d6782 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0x7f36b79c9710 (LWP 19172)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f36e789661b in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0xa03690, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xa03690, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f36e7888b19 in QThreadPoolThread::run (this=0xf62710) at concurrent/qthreadpool.cpp:140
#4  0x00007f36e789591a in QThreadPrivate::start (arg=0xf62710) at thread/qthread_unix.cpp:320
#5  0x00007f36e75f3aca in start_thread (arg=<value optimized out>) at pthread_create.c:297
#6  0x00007f36e45cb58d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7f36b71c8710 (LWP 19182)):
[KCrash Handler]
#6  0x0000000000fa92c0 in ?? ()
#7  0x00007f36e6093aeb in Soprano::FilterModel::executeQuery(QString const&, Soprano::Query::QueryLanguage, QString const&) const () from /usr/lib/libsoprano.so.4
#8  0x00007f36c8d1690a in CrappyInferencer2::removeAllStatements (this=0x9b4bb0, statement=...) at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/crappyinferencer2.cpp:398
#9  0x00007f36e6093e68 in Soprano::FilterModel::removeAllStatements(Soprano::Statement const&) () from /usr/lib/libsoprano.so.4
#10 0x00007f36c8d1c51b in Nepomuk::RemovableMediaModel::removeAllStatements (this=0x9b76c0, statement=...)
    at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/removablemediamodel.cpp:173
#11 0x00007f36e6093e68 in Soprano::FilterModel::removeAllStatements(Soprano::Statement const&) () from /usr/lib/libsoprano.so.4
#12 0x00007f36e6093e68 in Soprano::FilterModel::removeAllStatements(Soprano::Statement const&) () from /usr/lib/libsoprano.so.4
#13 0x00007f36e60e0707 in Soprano::NRLModel::removeAllStatements(Soprano::Statement const&) () from /usr/lib/libsoprano.so.4
#14 0x00007f36e6093e68 in Soprano::FilterModel::removeAllStatements(Soprano::Statement const&) () from /usr/lib/libsoprano.so.4
#15 0x00007f36e6077f92 in Soprano::Model::removeAllStatements(Soprano::Node const&, Soprano::Node const&, Soprano::Node const&, Soprano::Node const&) () from /usr/lib/libsoprano.so.4
#16 0x00007f36e6093f29 in Soprano::FilterModel::removeAllStatements(Soprano::Node const&, Soprano::Node const&, Soprano::Node const&, Soprano::Node const&) () from /usr/lib/libsoprano.so.4
#17 0x00007f36c8d2650c in Nepomuk::DataManagementModel::removeDataByApplication (this=0x9f8bc0, resources=..., flags=..., app=...)
    at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/datamanagementmodel.cpp:1081
#18 0x00007f36c8d41c73 in Nepomuk::RemoveResourcesByApplicationCommand::runCommand (this=0x10dd420)
    at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/datamanagementcommand.h:215
#19 0x00007f36c8d43942 in Nepomuk::DataManagementCommand::run (this=0x10dd420) at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/datamanagementcommand.cpp:62
#20 0x00007f36e7888a63 in QThreadPoolThread::run (this=0x1038d40) at concurrent/qthreadpool.cpp:106
#21 0x00007f36e789591a in QThreadPrivate::start (arg=0x1038d40) at thread/qthread_unix.cpp:320
#22 0x00007f36e75f3aca in start_thread (arg=<value optimized out>) at pthread_create.c:297
#23 0x00007f36e45cb58d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7f36e7d90760 (LWP 18985)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f36e789661b in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0xa03690, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xa03690, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f36e7888efb in QThreadPoolPrivate::waitForDone (this=0xa03600) at concurrent/qthreadpool.cpp:295
#4  0x00007f36e7888fcf in ~QThreadPool (this=0xa035e0, __in_chrg=<value optimized out>) at concurrent/qthreadpool.cpp:428
#5  0x00007f36e79a8ba0 in QObjectPrivate::deleteChildren (this=0xa03460) at kernel/qobject.cpp:1955
#6  0x00007f36e79b240b in ~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:946
#7  0x00007f36c8d3f7da in ~DataManagementAdaptor (this=0x9f8110, __in_chrg=<value optimized out>)
    at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/datamanagementadaptor.cpp:64
#8  0x00007f36e79a8ba0 in QObjectPrivate::deleteChildren (this=0x9fc740) at kernel/qobject.cpp:1955
#9  0x00007f36e79b240b in ~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:946
#10 0x00007f36e60776d7 in Soprano::Model::~Model() () from /usr/lib/libsoprano.so.4
#11 0x00007f36e60931c8 in Soprano::FilterModel::~FilterModel() () from /usr/lib/libsoprano.so.4
#12 0x00007f36c8d1eede in ~DataManagementModel (this=0x9f8bc0, __in_chrg=<value optimized out>) at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/datamanagementmodel.cpp:201
#13 0x00007f36e79a8ba0 in QObjectPrivate::deleteChildren (this=0x93d710) at kernel/qobject.cpp:1955
#14 0x00007f36e79b240b in ~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:946
#15 0x00007f36e60776d7 in Soprano::Model::~Model() () from /usr/lib/libsoprano.so.4
#16 0x00007f36e60931c8 in Soprano::FilterModel::~FilterModel() () from /usr/lib/libsoprano.so.4
#17 0x00007f36c8d033ab in ~Repository (this=0x93a610, __in_chrg=<value optimized out>) at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/repository.cpp:75
#18 0x00007f36c8a9071f in void qDeleteAll<QHash<QString, Soprano::Model*>::const_iterator>(QHash<QString, Soprano::Model*>::const_iterator, QHash<QString, Soprano::Model*>::const_iterator) ()
   from /usr/lib/libsopranoserver.so.1
#19 0x00007f36c8a8f86e in void qDeleteAll<QHash<QString, Soprano::Model*> >(QHash<QString, Soprano::Model*> const&) () from /usr/lib/libsopranoserver.so.1
#20 0x00007f36c8a8ce51 in Soprano::Server::ServerCore::~ServerCore() () from /usr/lib/libsopranoserver.so.1
#21 0x00007f36c8d01748 in ~Core (this=0x9186d0, __in_chrg=<value optimized out>) at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/nepomukcore.cpp:48
#22 0x00007f36e79a8ba0 in QObjectPrivate::deleteChildren (this=0x919730) at kernel/qobject.cpp:1955
#23 0x00007f36e79b240b in ~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:946
#24 0x00007f36e63adbfa in ~Service (this=0x90b980, __in_chrg=<value optimized out>) at /usr/src/packages/kde4/4.7.0/kdelibs-4.7.0/nepomuk/core/nepomukservice.cpp:44
#25 0x00007f36c8d00810 in ~Storage (this=0x90b980, __in_chrg=<value optimized out>) at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/services/storage/storage.cpp:56
#26 0x00007f36e79a8ba0 in QObjectPrivate::deleteChildren (this=0x91aa90) at kernel/qobject.cpp:1955
#27 0x00007f36e79b240b in ~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:946
#28 0x0000000000405deb in ~ServiceControl (this=0x90c7d0, __in_chrg=<value optimized out>) at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/servicestub/servicecontrol.cpp:39
#29 0x00007f36e79a8ba0 in QObjectPrivate::deleteChildren (this=0x7c9b70) at kernel/qobject.cpp:1955
#30 0x00007f36e79b240b in ~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:946
#31 0x00007f36e5464fae in ~QApplication (this=0x7fff888b61f0, __in_chrg=<value optimized out>) at kernel/qapplication.cpp:1204
#32 0x00007f36e68e222b in ~KApplication (this=0x7fff888b61f0, __in_chrg=<value optimized out>) at /usr/src/packages/kde4/4.7.0/kdelibs-4.7.0/kdeui/kernel/kapplication.cpp:911
#33 0x0000000000404806 in main (argc=2, argv=0x7fff888b66e8) at /usr/src/packages/kde4/4.7.0/kde-runtime-4.7.0/nepomuk/servicestub/main.cpp:167

Reported using DrKonqi
Comment 1 Sebastian Trueg 2011-09-20 12:08:07 UTC
Created attachment 63795 [details]
Patch against kde-runtime

If you can reproduce this crash then please apply this patch to kde-runtime and see if it fixes the crash.
Comment 2 Sebastian Trueg 2011-09-29 13:41:34 UTC
Git commit 4c2238bd96bb3582929b8d0c77927ecd3d51e712 by Sebastian Trueg.
Committed on 29/09/2011 at 15:39.
Pushed by trueg into branch 'KDE/4.7'.

Make sure all commands are finished before shutting down.

This fixes a potential crash when the DMS model is deleted while
another thread is still working on some command.
BUG: 279492

M  +2    -0    nepomuk/services/storage/datamanagementadaptor.cpp
M  +7    -0    nepomuk/services/storage/repository.cpp

http://commits.kde.org/kde-runtime/4c2238bd96bb3582929b8d0c77927ecd3d51e712
Comment 3 Sebastian Trueg 2011-09-29 13:41:48 UTC
Git commit bb01696d5ade8f92f85a87db867e36a502f2676f by Sebastian Trueg.
Committed on 29/09/2011 at 15:39.
Pushed by trueg into branch 'master'.

Make sure all commands are finished before shutting down.

This fixes a potential crash when the DMS model is deleted while
another thread is still working on some command.
BUG: 279492

M  +2    -0    nepomuk/services/storage/datamanagementadaptor.cpp
M  +7    -0    nepomuk/services/storage/repository.cpp

http://commits.kde.org/kde-runtime/bb01696d5ade8f92f85a87db867e36a502f2676f
Comment 4 Sebastian Trueg 2011-09-29 13:52:48 UTC
Git commit 6611c4b3b556a30f88572f02d205570c99eacfd1 by Sebastian Trueg.
Committed on 20/09/2011 at 14:11.
Pushed by trueg into branch 'master'.

Make sure all commands are finished before shutting down.

This fixes a potential crash when the DMS model is deleted while
another thread is still working on some command.
BUG: 279492

M  +2    -0    services/storage/datamanagementadaptor.cpp
M  +7    -0    services/storage/repository.cpp

http://commits.kde.org/nepomuk-core/6611c4b3b556a30f88572f02d205570c99eacfd1
Comment 5 Alexey Chernov 2011-09-29 13:58:38 UTC
Thanks, Sebastian.

Unfortunately (or fortunately) the crash is hard to reproduce as it happens very seldom. I updated to 4.7.1 recently and didn't experienced this. I think, you commit will be included in 4.7.2 so if the bug appears again I'll write here.