Bug 306573 - segfault(s) in nepomukfilewatcher.so at each login
Summary: segfault(s) in nepomukfilewatcher.so at each login
Status: RESOLVED DUPLICATE of bug 307388
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: filewatch (show other bugs)
Version: 4.9
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Nepomuk Bugs Coordination
URL:
Keywords:
: 306796 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-10 21:53 UTC by Andreas Sturmlechner
Modified: 2012-10-04 07:08 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
nepomuk-backtrace.log (10.45 KB, text/plain)
2012-09-15 16:08 UTC, Andreas Sturmlechner
Details
nepomuk-backtrace.log (11.43 KB, text/plain)
2012-09-15 22:23 UTC, Andreas Sturmlechner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sturmlechner 2012-09-10 21:53:34 UTC
Each time right after login I see this in dmesg:

[  113.919165] nepomukservices[3100]: segfault at c ip 00007fbd1c290384 sp 00007fffaf5e9310 error 4 in nepomukfilewatch.so[7fbd1c278000+1f000]
[  116.366999] nepomukservices[3215]: segfault at c ip 00007f9404250384 sp 00007fffa685e3a0 error 4 in nepomukfilewatch.so[7f9404238000+1f000]
[  118.035213] nepomukservices[3227]: segfault at c ip 00007f6768ae2384 sp 00007fff975f18d0 error 4 in nepomukfilewatch.so[7f6768aca000+1f000]
[  122.186416] nepomukservices[3235]: segfault at c ip 00007f12c4ddd384 sp 00007fffd7fbcb20 error 4 in nepomukfilewatch.so[7f12c4dc5000+1f000]
[  123.394601] nepomukservices[3263]: segfault at c ip 00007fc314953384 sp 00007fff44622e80 error 4 in nepomukfilewatch.so[7fc31493b000+1f000]
[  124.833609] nepomukservices[3268]: segfault at c ip 00007f9dc35ef384 sp 00007fff684641d0 error 4 in nepomukfilewatch.so[7f9dc35d7000+1f000]

It has been present since 4.8.something and stayed through several rebuilds with different gcc, glibc versions and nepomuk dependencies. Other than the nasty dmesg spam it doesn't affect me much - but I would still like to know what the heck is going on.

Reproducible: Always

Steps to Reproduce:
1. login to KDE
2. $ dmesg
Comment 1 Andreas Sturmlechner 2012-09-10 22:17:41 UTC
OK, logoff and then logon to a different user profile triggers this:

[ 8856.459257] nepomukserver[2840]: segfault at 50 ip 00007f092f69e634 sp 00007fff9fd55550 error 4 in libkdeinit4_nepomukserver.so[7f092f696000+15000]

However, login just to the other user profile right after start does not trigger it. So it seems to be some nepomuk storage corruption again after all, solution - delete some files?
Comment 2 Vishesh Handa 2012-09-10 22:30:39 UTC
Interesting. I have never heard of this before.

Could you please manually run the filewatch service in a debugger, and then provide a backtrace

$ gdb --args nepomukservicestub nepomukfilewatch
..
..
bt

should do the trick
Comment 3 Joachim Wilke 2012-09-14 13:08:15 UTC
I'm expecting the same messages in dmesg and want to provide a backtrace:

$ gdb --args nepomukservicestub nepomukfilewatch
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/nepomukservicestub...Reading symbols from /usr/lib/debug/usr/bin/nepomukservicestub.debug...done.
done.
(gdb) run
Starting program: /usr/bin/nepomukservicestub nepomukfilewatch
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffeba0f700 (LWP 3228)]
"/usr/bin/nepomukservicestub(3225)" Soprano: "Could not connect to server at /tmp/ksocket-jo/nepomuk-socket (No such file or directory)"
"/usr/bin/nepomukservicestub(3225)" Soprano: "Could not connect to server at /tmp/ksocket-jo/nepomuk-socket (No such file or directory)"
"/usr/bin/nepomukservicestub(3225)" Soprano: "Could not connect to server at /tmp/ksocket-jo/nepomuk-socket (No such file or directory)"
"/usr/bin/nepomukservicestub(3225)" Soprano: "Could not connect to server at /tmp/ksocket-jo/nepomuk-socket (No such file or directory)"
[New Thread 0x7fffeb20e700 (LWP 3229)]
[New Thread 0x7fffeaa0d700 (LWP 3230)]
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Soprano::Client::LocalSocketClient(0x83fd00), parent's thread is QThread(0x609320), current thread is Nepomuk2::InvalidFileResourceCleaner(0x8b6b00)
"/usr/bin/nepomukservicestub(3225)" Soprano: "Could not connect to server at /tmp/ksocket-jo/nepomuk-socket (No such file or directory)"
"/usr/bin/nepomukservicestub(3225)" Soprano: "Could not connect to server at /tmp/ksocket-jo/nepomuk-socket (No such file or directory)"
"/usr/bin/nepomukservicestub(3225)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/nepomukservicestub(3225)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/nepomukservicestub(3225)" Soprano: "Invalid iterator."
[Thread 0x7fffeaa0d700 (LWP 3230) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffebc314a4 in isEmpty (this=0x841948) at /usr/include/QtCore/qlist.h:99
99          inline bool isEmpty() const { return d->end  == d->begin; }
(gdb) bt
#0  0x00007fffebc314a4 in isEmpty (this=0x841948) at /usr/include/QtCore/qlist.h:99
#1  isEmpty (this=0x841948) at /usr/include/QtCore/qlist.h:152
#2  KInotify::Private::_k_addWatches (this=0x841930) at /chakra/desktop-testing/nepomuk-core/src/nepomuk-core-4.9.1/services/filewatch/kinotify.cpp:147
#3  0x00007fffebc2fa79 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at /chakra/desktop-testing/nepomuk-core/src/nepomuk-core-4.9.1/build/services/filewatch/kinotify.moc:96
#4  KInotify::qt_static_metacall (_o=0x1, _c=11242288, _id=-170752511, _a=0xab5510) at /chakra/desktop-testing/nepomuk-core/src/nepomuk-core-4.9.1/build/services/filewatch/kinotify.moc:72
#5  0x00007ffff7a986ae in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#6  0x00007ffff61f6b4c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#7  0x00007ffff61fafca in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#8  0x00007ffff7a83dce in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#9  0x00007ffff7a87731 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#10 0x00007ffff7ab1d43 in ?? () from /usr/lib/libQtCore.so.4
#11 0x00007ffff5094655 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#12 0x00007ffff5094988 in ?? () from /usr/lib/libglib-2.0.so.0
#13 0x00007ffff5094a44 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#14 0x00007ffff7ab1ed6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#15 0x00007ffff629666e in ?? () from /usr/lib/libQtGui.so.4
#16 0x00007ffff7a82b1f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#17 0x00007ffff7a82da8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#18 0x00007ffff7a87a48 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#19 0x0000000000403c50 in main (argc=2, argv=<optimized out>) at /chakra/desktop-testing/nepomuk-core/src/nepomuk-core-4.9.1/servicestub/main.cpp:170
(gdb)
Comment 4 Hussam Al-Tayeb 2012-09-14 16:53:35 UTC
*** Bug 306796 has been marked as a duplicate of this bug. ***
Comment 5 Hussam Al-Tayeb 2012-09-14 16:57:22 UTC
Happens to me on Archlinux's 4.9.1 packages. this seems to be a regression from 4.9.0
Comment 6 Andreas Sturmlechner 2012-09-15 16:08:58 UTC
Created attachment 73947 [details]
nepomuk-backtrace.log

I've rebuilt nepomuk{-core} with minimum optimisations and debug symbols and now here is my backtrace. I can rebuild more packages with debug symbols if really needed, but this is a laptop with several years on its shoulders. ;)
Comment 7 Andreas Sturmlechner 2012-09-15 22:23:48 UTC
Created attachment 73952 [details]
nepomuk-backtrace.log

more info with added soprano debug symbols
Comment 8 l33tmmx 2012-09-19 04:39:58 UTC
I'm getting this nepomukfilewatcher segfault too:

nepomukservices[3021]: segfault at c ip 00007f83405c3cf8 sp 00007fff048151c0 error 4 in nepomukfilewatch.so[7f83405ad000+1e000]

It always segfauts within 2 minutes after login. I first noticed this on 4.9.0; I'm using Gentoo packages, too - will try to produce a backtrace later.
Comment 9 l33tmmx 2012-09-19 17:44:06 UTC
Here's gdb output of my system (Gentoo 64-bit), hopefully it proves to be useful:

madmax@wintermute ~ $ gdb --args nepomukservicestub nepomukfilewatch
GNU gdb (Gentoo 7.5 p1) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/nepomukservicestub...Reading symbols from /usr/lib64/debug/usr/bin/nepomukservicestub.debug...done.
done.
(gdb) run
Starting program: /usr/bin/nepomukservicestub nepomukfilewatch
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe7f2c700 (LWP 30523)]
[New Thread 0x7fffe772b700 (LWP 30525)]
[New Thread 0x7fffe6f2a700 (LWP 30526)]
[New Thread 0x7fffe6729700 (LWP 30527)]
[Thread 0x7fffe6f2a700 (LWP 30526) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe8198cf8 in isEmpty (this=0x7e8438)
    at /usr/include/qt4/QtCore/qlist.h:99
99	    inline bool isEmpty() const { return d->end  == d->begin; }
(gdb) bt
#0  0x00007fffe8198cf8 in isEmpty (this=0x7e8438)
    at /usr/include/qt4/QtCore/qlist.h:99
#1  isEmpty (this=0x7e8438) at /usr/include/qt4/QtCore/qlist.h:152
#2  KInotify::Private::_k_addWatches (this=0x7e8420)
    at /var/tmp/portage/kde-base/nepomuk-core-4.9.1/work/nepomuk-core-4.9.1/services/filewatch/kinotify.cpp:147
#3  0x00007fffe8197bd8 in KInotify::qt_static_metacall (_o=<optimized out>, 
    _c=<optimized out>, _id=<optimized out>, _a=0xafb740)
    at /var/tmp/portage/kde-base/nepomuk-core-4.9.1/work/nepomuk-core-4.9.1_build/services/filewatch/kinotify.moc:96
#4  0x00007ffff7a929ad in QObject::event(QEvent*) ()
   from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007ffff61ef59c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib64/qt4/libQtGui.so.4
#6  0x00007ffff61f3bc1 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib64/qt4/libQtGui.so.4
#7  0x00007ffff7a7fdc8 in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007ffff7a82c75 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007ffff7aaaa48 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#10 0x00007ffff549caae in g_main_context_dispatch ()
   from /usr/lib64/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#11 0x00007ffff549cd83 in ?? () from /usr/lib64/libglib-2.0.so.0
#12 0x00007ffff549ce45 in g_main_context_iteration ()
   from /usr/lib64/libglib-2.0.so.0
#13 0x00007ffff7aaab6e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#14 0x00007ffff628698a in ?? () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007ffff7a7ed38 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00007ffff7a7ef99 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#17 0x00007ffff7a82fc1 in QCoreApplication::exec() ()
   from /usr/lib64/qt4/libQtCore.so.4
#18 0x00000000004046a9 in main (argc=2, argv=0x7fffffffd8a8)
    at /var/tmp/portage/kde-base/nepomuk-core-4.9.1/work/nepomuk-core-4.9.1/servicestub/main.cpp:170
(gdb)
Comment 10 Vishesh Handa 2012-09-19 17:46:56 UTC
Okay. Confirmed.

I'll fix it when I get some time. It's very clear what the problem is.
Comment 11 Hussam Al-Tayeb 2012-09-22 18:33:51 UTC
It would be nice if this was taken care of before 4.9.2
Comment 12 Vishesh Handa 2012-09-26 13:03:36 UTC

*** This bug has been marked as a duplicate of bug 307388 ***
Comment 13 l33tmmx 2012-10-04 02:49:47 UTC
Still segfaults in 4.9.2... :(
Comment 14 Andreas Sturmlechner 2012-10-04 07:08:37 UTC
The fix in bug 307388 didn't make it into 4.9.2, yes, but is easily backported.