Bug 259723

Summary: Running nepomukbackup manually
Product: [Unmaintained] nepomuk Reporter: Bruno Friedmann <bruno>
Component: generalAssignee: Vishesh Handa <me>
Status: RESOLVED FIXED    
Severity: crash CC: bruno, trueg, wstephenson
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
algrind -v --leak-check=full --show-reachable=yes --trace-children=yes --track-origins=yes --log-file=kde4.6.0-nepomukbackup-manual.log nepomukbackup

Description Bruno Friedmann 2010-12-13 13:58:02 UTC
Application: nepomukservicestub (0.2)
KDE Platform Version: 4.5.85 (4.6 Beta2)
Qt Version: 4.7.1
Operating System: Linux 2.6.37-rc5-12-desktop x86_64
Distribution: "openSUSE 11.4 Milestone 4 of 6 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed: After opening kde session, I've launch nepomukbackup manually from konsole. Choose a file where to dump de database.
After 6-9 minutes, it simply crash, the file choosed for the backup didn't exist.

At this time nepomuk was indexing file ( virtuoso-t ~ 60% cpu + 2 nepomukservicestub at 30% each )
Plasma-desktop was running at 95% before I kill it. (the backup run several minutes after that)

Nota, the nepomuk main repository has been build fresh when I upgrade to 4.6b2 yesterday

The crash can be reproduced some of the time.

-- Backtrace:
Application: Nepomuk Service Stub (nepomukservicestub), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f8383e2e760 (LWP 4024))]

Thread 3 (Thread 0x7f83707f6700 (LWP 4197)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f838384e10b in wait (this=<value optimized out>, mutex=0x813218, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x813218, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f837395ebc5 in Nepomuk::Identifier::run (this=0x813200) at /usr/src/debug/kdebase-runtime-4.5.85/nepomuk/services/backupsync/service/identifier.cpp:132
#4  0x00007f838384da1e in QThreadPrivate::start (arg=0x813200) at thread/qthread_unix.cpp:285
#5  0x00007f83835bea4f in start_thread (arg=0x7f83707f6700) at pthread_create.c:297
#6  0x00007f838135c52d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f836fff5700 (LWP 4198)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f838384e10b in wait (this=<value optimized out>, mutex=0x7f9278, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x7f9278, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f8373960169 in Nepomuk::Merger::run (this=0x7f9260) at /usr/src/debug/kdebase-runtime-4.5.85/nepomuk/services/backupsync/service/merger.cpp:123
#4  0x00007f838384da1e in QThreadPrivate::start (arg=0x7f9260) at thread/qthread_unix.cpp:285
#5  0x00007f83835bea4f in start_thread (arg=0x7f836fff5700) at pthread_create.c:297
#6  0x00007f838135c52d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f8383e2e760 (LWP 4024)):
[KCrash Handler]
#6  QUrlPrivate::toEncoded (this=0x4545454545454545, options=...) at io/qurl.cpp:3901
#7  0x00007f83838f6eed in QUrl::toEncoded (this=<value optimized out>, options=<value optimized out>) at io/qurl.cpp:5692
#8  0x00007f837396437b in qHash (this=0x7fff3324fbd8, akey=..., ahp=0x7fff3324fadc) at /usr/include/QtCore/qurl.h:275
#9  QHash<QUrl, QHashDummyValue>::findNode (this=0x7fff3324fbd8, akey=..., ahp=0x7fff3324fadc) at /usr/include/QtCore/qhash.h:880
#10 0x00007f8373970f95 in insert (this=0x7fff3324fbd0) at /usr/include/QtCore/qhash.h:757
#11 insert (this=0x7fff3324fbd0) at /usr/include/QtCore/qset.h:176
#12 (anonymous namespace)::IdentificationSetGenerator::iterate (this=0x7fff3324fbd0) at /usr/src/debug/kdebase-runtime-4.5.85/nepomuk/services/backupsync/service/identificationset.cpp:101
#13 0x00007f8373971750 in (anonymous namespace)::IdentificationSetGenerator::generate (this=0x7fff3324fbd0) at /usr/src/debug/kdebase-runtime-4.5.85/nepomuk/services/backupsync/service/identificationset.cpp:131
#14 0x00007f8373972d9c in Nepomuk::IdentificationSet::fromChangeLog (log=<value optimized out>, model=0x804170, ignoreList=...) at /usr/src/debug/kdebase-runtime-4.5.85/nepomuk/services/backupsync/service/identificationset.cpp:230
#15 0x00007f837397398d in Nepomuk::SyncFile::SyncFile (this=0x7fff3324fd70, log=..., model=0x804170) at /usr/src/debug/kdebase-runtime-4.5.85/nepomuk/services/backupsync/service/syncfile.cpp:81
#16 0x00007f837396b900 in Nepomuk::saveBackupSyncFile (url=...) at /usr/src/debug/kdebase-runtime-4.5.85/nepomuk/services/backupsync/service/tools.cpp:86
#17 0x00007f83739648cc in Nepomuk::BackupManager::backup (this=0x81ae00, oldUrl=<value optimized out>) at /usr/src/debug/kdebase-runtime-4.5.85/nepomuk/services/backupsync/service/backupmanager.cpp:88
#18 0x00007f8373974f20 in BackupManagerAdaptor::qt_metacall (this=0x816840, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fff33250090) at /usr/src/debug/kdebase-runtime-4.5.85/build/nepomuk/services/backupsync/service/backupmanageradaptor.moc:91
#19 0x00007f8383361d08 in QDBusConnectionPrivate::deliverCall (this=0x6cf390, object=0x816840, msg=..., metaTypes=..., slotIdx=5) at qdbusintegrator.cpp:919
#20 0x00007f838336260e in QDBusConnectionPrivate::activateCall (this=0x6cf390, object=0x816840, flags=273, msg=...) at qdbusintegrator.cpp:822
#21 0x00007f8383362e2e in QDBusConnectionPrivate::activateObject (this=0x6cf390, node=..., msg=..., pathStartPos=<value optimized out>) at qdbusintegrator.cpp:1379
#22 0x00007f8383363068 in QDBusActivateObjectEvent::placeMetaCall (this=0x6cdc00) at qdbusintegrator.cpp:1493
#23 0x00007f838394ab0a in QObject::event (this=0x81ae00, e=<value optimized out>) at kernel/qobject.cpp:1211
#24 0x00007f8381ac8d24 in QApplicationPrivate::notify_helper (this=0x6261c0, receiver=0x81ae00, e=0x6cdc00) at kernel/qapplication.cpp:4445
#25 0x00007f8381ad121a in QApplication::notify (this=<value optimized out>, receiver=0x81ae00, e=0x6cdc00) at kernel/qapplication.cpp:4324
#26 0x00007f83829ef776 in KApplication::notify (this=0x7fff33250f60, receiver=0x81ae00, event=0x6cdc00) at /usr/src/debug/kdelibs-4.5.85/kdeui/kernel/kapplication.cpp:311
#27 0x00007f8383936c7c in QCoreApplication::notifyInternal (this=0x7fff33250f60, receiver=0x81ae00, event=0x6cdc00) at kernel/qcoreapplication.cpp:732
#28 0x00007f838393a475 in sendEvent (receiver=0x0, event_type=0, data=0x609660) at kernel/qcoreapplication.h:215
#29 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x609660) at kernel/qcoreapplication.cpp:1373
#30 0x00007f8383961823 in sendPostedEvents (s=0x629e30) at kernel/qcoreapplication.h:220
#31 postEventSourceDispatch (s=0x629e30) at kernel/qeventdispatcher_glib.cpp:277
#32 0x00007f83807b72b3 in g_main_dispatch (context=0x628d20) at gmain.c:2267
#33 g_main_context_dispatch (context=0x628d20) at gmain.c:2824
#34 0x00007f83807b7a90 in g_main_context_iterate (context=0x628d20, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2902
#35 0x00007f83807b7d30 in g_main_context_iteration (context=0x628d20, may_block=1) at gmain.c:2965
#36 0x00007f83839619bf in QEventDispatcherGlib::processEvents (this=0x60f360, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#37 0x00007f8381b6dd2e in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#38 0x00007f83839360b2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#39 0x00007f83839362c5 in QEventLoop::exec (this=0x7fff33250d30, flags=...) at kernel/qeventloop.cpp:201
#40 0x00007f838393a72b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#41 0x0000000000403ea2 in main (argc=1, argv=0x7fff332513b8) at /usr/src/debug/kdebase-runtime-4.5.85/nepomuk/servicestub/main.cpp:165

This bug may be a duplicate of or related to bug 259658.

Possible duplicates by query: bug 259658, bug 251558.

Reported using DrKonqi
Comment 1 Bruno Friedmann 2010-12-21 07:09:59 UTC
Created attachment 55121 [details]
New crash information added by DrKonqi

nepomukservicestub (0.2) on KDE Platform 4.5.85 (4.6 Beta2) using Qt 4.7.1

- What I was doing when the application crashed: nepomuk backup was set to act at 10:00pm on monday. When the time to act was reach, just crash.
No backups are referenced as good.

-- Backtrace (Reduced):
#6  QUrlPrivate::toEncoded (this=0x4545454545454545, options=...) at io/qurl.cpp:3901
#7  0x00007fd217262f0d in QUrl::toEncoded (this=<value optimized out>, options=<value optimized out>) at io/qurl.cpp:5692
#8  0x00007fd2072b634b in qHash (this=0x7fff8d9bb2d8, akey=..., ahp=0x7fff8d9bb1dc) at /usr/include/QtCore/qurl.h:275
#9  QHash<QUrl, QHashDummyValue>::findNode (this=0x7fff8d9bb2d8, akey=..., ahp=0x7fff8d9bb1dc) at /usr/include/QtCore/qhash.h:880
#10 0x00007fd2072c2f55 in insert (this=0x7fff8d9bb2d0) at /usr/include/QtCore/qhash.h:757
Comment 2 Bruno Friedmann 2010-12-28 08:30:16 UTC
Created attachment 55310 [details]
New crash information added by DrKonqi

nepomukservicestub (0.2) on KDE Platform 4.5.90 (4.6 RC1) using Qt 4.7.1

- What I was doing when the application crashed:
Just let the backup scheduler start it's jobs.

-- Backtrace (Reduced):
#6  QUrlPrivate::toEncoded (this=0x4545454545454545, options=...) at io/qurl.cpp:3901
#7  0x00007fd3c712ff0d in QUrl::toEncoded (this=<value optimized out>, options=<value optimized out>) at io/qurl.cpp:5692
#8  0x00007fd3b717534b in qHash (this=0x7fff10f5d288, akey=..., ahp=0x7fff10f5d18c) at /usr/include/QtCore/qurl.h:275
#9  QHash<QUrl, QHashDummyValue>::findNode (this=0x7fff10f5d288, akey=..., ahp=0x7fff10f5d18c) at /usr/include/QtCore/qhash.h:880
#10 0x00007fd3b7181f55 in insert (this=0x7fff10f5d280) at /usr/include/QtCore/qhash.h:757
Comment 3 Bruno Friedmann 2011-01-03 22:28:11 UTC
Created attachment 55537 [details]
New crash information added by DrKonqi

nepomukservicestub (0.2) on KDE Platform 4.5.90 (4.6 RC1) using Qt 4.7.1

- What I was doing when the application crashed: Nepomuk autobackup crash at starting time or manually launched.
Even with lastest build ...

-- Backtrace (Reduced):
#6  QUrlPrivate::toEncoded (this=0x4545454545454545, options=...) at io/qurl.cpp:3901
#7  0x00007f1d514b7f0d in QUrl::toEncoded (this=<value optimized out>, options=<value optimized out>) at io/qurl.cpp:5692
#8  0x00007f1d414fb34b in qHash (this=0x7fff47c0dcc8, akey=..., ahp=0x7fff47c0dbcc) at /usr/include/QtCore/qurl.h:275
#9  QHash<QUrl, QHashDummyValue>::findNode (this=0x7fff47c0dcc8, akey=..., ahp=0x7fff47c0dbcc) at /usr/include/QtCore/qhash.h:880
#10 0x00007f1d41507f55 in insert (this=0x7fff47c0dcc0) at /usr/include/QtCore/qhash.h:757
Comment 4 Sebastian Trueg 2011-01-04 18:43:46 UTC
*** Bug 259658 has been marked as a duplicate of this bug. ***
Comment 5 Vishesh Handa 2011-01-04 23:56:30 UTC
SVN commit 1211769 by vhanda:

* Rename IdentificationSet's performQuery to queryIdentifyingStatements
* In iterate() move the url from 'notDone' to 'done' before deleting it

BUG: 259723


 M  +4 -4      identificationset.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211769
Comment 6 Vishesh Handa 2011-01-05 00:33:11 UTC
SVN commit 1211782 by vhanda:

BACKPORT: 
* Rename IdentificationSet's performQuery to queryIdentifyingStatements
* In iterate() move the url from 'notDone' to 'done' before deleting it

BUG: 259723


 M  +4 -4      identificationset.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211782
Comment 7 Bruno Friedmann 2011-01-20 12:55:07 UTC
Created attachment 56227 [details]
New crash information added by DrKonqi

nepomukservicestub (0.2) on KDE Platform 4.5.95 (4.6 RC2) using Qt 4.7.1

- What I was doing when the application crashed: Seems that something is wrong with newer build.
I've retest it manually and get that backtrace . Any Ideas how to track it down ?

-- Backtrace (Reduced):
#6  QUrlPrivate::toEncoded (this=0x4545454545454545, options=...) at io/qurl.cpp:3901
#7  0x00007fa70fcbcf0d in QUrl::toEncoded (this=<value optimized out>, options=<value optimized out>) at io/qurl.cpp:5692
#8  0x00007fa6ffcf034b in qHash (this=0x7fff286a6778, akey=..., ahp=0x7fff286a667c) at /usr/include/QtCore/qurl.h:275
#9  QHash<QUrl, QHashDummyValue>::findNode (this=0x7fff286a6778, akey=..., ahp=0x7fff286a667c) at /usr/include/QtCore/qhash.h:880
#10 0x00007fa6ffcfcf55 in insert (this=0x7fff286a6770) at /usr/include/QtCore/qhash.h:757
Comment 8 Bruno Friedmann 2011-01-24 22:07:42 UTC
Created attachment 56401 [details]
New crash information added by DrKonqi

nepomukservicestub (0.2) on KDE Platform 4.5.95 (4.6 RC2) using Qt 4.7.1

- What I was doing when the application crashed:
I've setup nepomuk auto-backup on monday at 10pm. We are monday 10pm03 :-) 
Seems to be not yet fixed in RC2. See next week after 4.6.0 release and update

-- Backtrace (Reduced):
#6  QUrlPrivate::toEncoded (this=0x4545454545454545, options=...) at io/qurl.cpp:3901
#7  0x00007f8eaa379f0d in QUrl::toEncoded (this=<value optimized out>, options=<value optimized out>) at io/qurl.cpp:5692
#8  0x00007f8e9a3b634b in qHash (this=0x7fff5b18c6c8, akey=..., ahp=0x7fff5b18c5cc) at /usr/include/QtCore/qurl.h:275
#9  QHash<QUrl, QHashDummyValue>::findNode (this=0x7fff5b18c6c8, akey=..., ahp=0x7fff5b18c5cc) at /usr/include/QtCore/qhash.h:880
#10 0x00007f8e9a3c2f55 in insert (this=0x7fff5b18c6c0) at /usr/include/QtCore/qhash.h:757
Comment 9 Bruno Friedmann 2011-01-28 11:40:27 UTC
Created attachment 56561 [details]
New crash information added by DrKonqi

nepomukservicestub (0.2) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.1

- What I was doing when the application crashed: After doing upgade to kde 4.6.0 
(opensuse factory-kde under opensuse factory 11.4 (step M6) 

This time I've run a valgrind session against nepomuckbackup so I will add that log too
don't know why this happen .

-- Backtrace (Reduced):
#6  QUrlPrivate::toEncoded (this=0x4545454545454545, options=...) at io/qurl.cpp:3901
#7  0x00007f272c90cf0d in QUrl::toEncoded (this=<value optimized out>, options=<value optimized out>) at io/qurl.cpp:5692
#8  0x00007f2726b8d4df in Soprano::Node::resourceToN3 (uri=<value optimized out>) at /usr/src/debug/soprano-2.5.63/soprano/node.cpp:391
#9  0x00007f271c951f84 in (anonymous namespace)::IdentificationSetGenerator::iterate (this=0x7fff374e74a0) at /usr/src/debug/kdebase-runtime-4.6.0/nepomuk/services/backupsync/service/identificationset.cpp:102
#10 0x00007f271c952760 in (anonymous namespace)::IdentificationSetGenerator::generate (this=0x7fff374e74a0) at /usr/src/debug/kdebase-runtime-4.6.0/nepomuk/services/backupsync/service/identificationset.cpp:131
Comment 10 Bruno Friedmann 2011-01-28 11:42:35 UTC
Created attachment 56562 [details]
algrind -v --leak-check=full --show-reachable=yes --trace-children=yes --track-origins=yes --log-file=kde4.6.0-nepomukbackup-manual.log nepomukbackup

valgrind log done during the last drkonqui report
Comment 11 Bruno Friedmann 2011-01-28 11:53:26 UTC
here the content of virtuoso.ini file 
virtuoso_i15921.ini 
[Database]
DatabaseFile=/home/bruno/.kde4/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.db
ErrorLogFile=/home/bruno/.kde4/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.log
TransactionFile=/home/bruno/.kde4/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.trx
xa_persistent_file=/home/bruno/.kde4/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso.pxa

[TempDatabase]
DatabaseFile=/home/bruno/.kde4/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso-temp.db
TransactionFile=/home/bruno/.kde4/share/apps/nepomuk/repository/main/data/virtuosobackend/soprano-virtuoso-temp.trx
MaxCheckpointRemap=1000

[Parameters]
LiteMode=1
ServerPort=1111
DisableTcpSocket=1
PrefixResultNames=0
ServerThreads=100
NumberOfBuffers=22600
MaxDirtyBuffers=15066
SchedulerInterval=5
FreeTextBatchSize=1000
CheckpointInterval=10
MinAutoCheckpointSize=200000


DB is around 650MB for ~78000 files in it
Comment 12 Vishesh Handa 2011-01-28 12:04:56 UTC
SVN commit 1217735 by vhanda:

Only remove the iterator once you are done using it! I can't beleive I didn't see this last time.

BUG: 259723


 M  +1 -1      identificationset.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1217735
Comment 13 Bruno Friedmann 2011-02-08 19:06:08 UTC
Ping @ Will what's happen, the lastest factory seems to not have it included ?
It always crash for the same reasons.

Can you recheck if someone didn't include the path, or delete the patch from our openSUSE package ?

Thanks
Comment 14 Will Stephenson 2011-02-08 22:16:51 UTC
It would have to have been backported to 4.6 branch.  Will check it tomorrow.