Bug 295404 - knotify crash (assertion) repeatedly in Solid::DeviceManagerPrivate::_k_deviceRemoved
Summary: knotify crash (assertion) repeatedly in Solid::DeviceManagerPrivate::_k_devic...
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: libsolid-fstab (show other bugs)
Version: 4.9.0
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Mario Bensi
URL:
Keywords:
: 305621 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-06 09:23 UTC by Francesco Riosa
Modified: 2013-03-12 23:15 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
knotify4-20120306-094411.kcrash (6.16 KB, application/octet-stream)
2012-03-06 09:25 UTC, Francesco Riosa
Details
solid-debug.patch (871 bytes, patch)
2012-03-07 11:40 UTC, Francesco Riosa
Details
New crash information added by DrKonqi (5.01 KB, text/plain)
2012-04-16 16:15 UTC, Francesco Riosa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Riosa 2012-03-06 09:23:57 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Build Identifier: 

The assertion triggered is the following: Q_ASSERT(dev->backendObject()!=0);

The stack seem to show that the device is one from /etc/mtab (it's a real file not a link to /proc/self/mounts), the disk that change often are the network ones, mounted by `automount` with a timeout of 360s

After one there were 91 drkonqi windows open, the stacktraces are all the same, see attached one

Reproducible: Always

Actual Results:  
pletora of drkonqi windows


There are a lot of bug similar to this one (293914, 160221) but none of them fitted totally, thus reporting a new one (and Drkonqi is confused by the new bugzilla theme).

Every week I do rebuild the whole kde in gentoo from git, this problem presented itself after a build at 2012-03-03, previous build 2012-02-25 was working fine.

example mtab:

rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,nosuid,relatime,size=4084352k,nr_inodes=1021088,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/md1 / ext4 rw,nodiratime,relatime,commit=0 0 0
tmpfs /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0
rc-svcdir /usr/lib64/rc/init.d tmpfs rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
memory /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
devices /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
freezer /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/md2 /home ext4 rw,nodiratime,relatime,commit=30,nodelalloc,errors=remount-ro,data=writeback,commit=0 0 0
/dev/md4 /srv ext4 rw,nodiratime,relatime,commit=30,nodelalloc,errors=remount-ro,data=writeback,commit=0 0 0
shm /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0
/dev/md3 /vservers ext4 rw,nodiratime,relatime,commit=30,nodelalloc,errors=remount-ro,data=writeback,commit=0 0 0
//192.168.42.21/SRC /mnt/autonfs/sources cifs rw 0 0
Comment 1 Francesco Riosa 2012-03-06 09:25:34 UTC
Created attachment 69322 [details]
knotify4-20120306-094411.kcrash
Comment 2 Christoph Feck 2012-03-06 11:50:11 UTC
Pasting attachment from comment #1 inline:

Application: KNotify (knotify4), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x33bea4eb7a0 (LWP 16921))]

Thread 2 (Thread 0x33bd035c700 (LWP 16922)):
#0  0x0000033be69ffc63 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x0000033be33f95f8 in g_main_context_poll (n_fds=1, fds=0x10be1b23d0, timeout=-1, context=0x10be1b3b70, priority=<optimized out>) at gmain.c:3402
#2  g_main_context_iterate (context=0x10be1b3b70, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3084
#3  0x0000033be33f9b0d in g_main_context_iteration (context=0x10be1b3b70, may_block=1) at gmain.c:3152
#4  0x0000033be7850656 in QEventDispatcherGlib::processEvents (this=0x10be1b2700, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x0000033be781c8c2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x0000033be781cb07 in QEventLoop::exec (this=0x33bd035bda0, flags=...) at kernel/qeventloop.cpp:204
#7  0x0000033be770e098 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x0000033be77fa5d3 in QInotifyFileSystemWatcherEngine::run (this=0x10be154c20) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x0000033be7710fad in QThreadPrivate::start (arg=0x10be154c20) at thread/qthread_unix.cpp:298
#10 0x0000033be7476c70 in start_thread (arg=0x33bd035c700) at pthread_create.c:301
#11 0x0000033be6a0764d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x33bea4eb7a0 (LWP 16921)):
[KCrash Handler]
#6  0x0000033be6967a45 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x0000033be6968ebb in __GI_abort () at abort.c:93
#8  0x0000033be77063d4 in qt_message_output (msgType=<optimized out>, buf=<optimized out>) at global/qglobal.cpp:2252
#9  0x0000033be770655f in qt_message(enum QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x33be7889e98 "ASSERT: \"%s\" in file %s, line %d", ap=0x3a5170e6bb8) at global/qglobal.cpp:2298
#10 0x0000033be7706704 in qFatal (msg=<optimized out>) at global/qglobal.cpp:2481
#11 0x0000033be95d9088 in Solid::DeviceManagerPrivate::_k_deviceRemoved (this=0x10be154780, udi=...) at /usr/src/debug/kde-base/kdelibs-9999/kdelibs-9999/solid/solid/devicemanager.cpp:201
#12 0x0000033be7834117 in QMetaObject::activate (sender=0x10be1559f0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x3a5170e6df0) at kernel/qobject.cpp:3547
#13 0x0000033be95f8555 in Solid::Ifaces::DeviceManager::deviceRemoved (this=<optimized out>, _t1=...) at /usr/src/debug/kde-base/kdelibs-9999/kdelibs-9999_build/solid/solid/ifaces/devicemanager.moc:108
#14 0x0000033be9655c93 in Solid::Backends::Fstab::FstabManager::_k_updateDeviceList (this=0x10be1559f0) at /usr/src/debug/kde-base/kdelibs-9999/kdelibs-9999/solid/solid/backends/fstab/fstabmanager.cpp:126
#15 0x0000033be9655d5a in Solid::Backends::Fstab::FstabManager::onMtabChanged (this=0x10be1559f0) at /usr/src/debug/kde-base/kdelibs-9999/kdelibs-9999/solid/solid/backends/fstab/fstabmanager.cpp:136
#16 0x0000033be7834117 in QMetaObject::activate (sender=0x10be1545c0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3547
#17 0x0000033be965a048 in Solid::Backends::Fstab::FstabWatcher::onFileChanged (this=0x10be1545c0, path=...) at /usr/src/debug/kde-base/kdelibs-9999/kdelibs-9999/solid/solid/backends/fstab/fstabwatcher.cpp:104
#18 0x0000033be7834117 in QMetaObject::activate (sender=0x10be1554c0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x3a5170e72f0) at kernel/qobject.cpp:3547
#19 0x0000033be77ea642 in QFileSystemWatcher::fileChanged (this=<optimized out>, _t1=...) at .moc/debug-shared/moc_qfilesystemwatcher.cpp:109
#20 0x0000033be7839786 in QObject::event (this=0x10be1554c0, e=<optimized out>) at kernel/qobject.cpp:1195
#21 0x0000033be87e4012 in notify_helper (e=0x10be1df7f0, receiver=0x10be1554c0, this=0x10bdff8a70) at kernel/qapplication.cpp:4550
#22 QApplicationPrivate::notify_helper (this=0x10bdff8a70, receiver=0x10be1554c0, e=0x10be1df7f0) at kernel/qapplication.cpp:4522
#23 0x0000033be87e9b19 in QApplication::notify (this=0x3a5170e7d60, receiver=0x10be1554c0, e=0x10be1df7f0) at kernel/qapplication.cpp:4411
#24 0x0000033be9de961d in KApplication::notify (this=0x3a5170e7d60, receiver=0x10be1554c0, event=0x10be1df7f0) at /usr/src/debug/kde-base/kdelibs-9999/kdelibs-9999/kdeui/kernel/kapplication.cpp:311
#25 0x0000033be781e31c in QCoreApplication::notifyInternal (this=0x3a5170e7d60, receiver=0x10be1554c0, event=0x10be1df7f0) at kernel/qcoreapplication.cpp:876
#26 0x0000033be7821c35 in sendEvent (event=0x10be1df7f0, receiver=0x10be1554c0) at kernel/qcoreapplication.h:231
#27 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x10bdfca560) at kernel/qcoreapplication.cpp:1500
#28 0x0000033be7850193 in sendPostedEvents () at kernel/qcoreapplication.h:236
#29 postEventSourceDispatch (s=0x10bdffc290) at kernel/qeventdispatcher_glib.cpp:279
#30 0x0000033be33f90bd in g_main_dispatch (context=0x10bdffb0e0) at gmain.c:2441
#31 g_main_context_dispatch (context=0x10bdffb0e0) at gmain.c:3011
#32 0x0000033be33f98e8 in g_main_context_iterate (context=0x10bdffb0e0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3089
#33 0x0000033be33f9b0d in g_main_context_iteration (context=0x10bdffb0e0, may_block=1) at gmain.c:3152
#34 0x0000033be78505ef in QEventDispatcherGlib::processEvents (this=0x10bdfcba20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#35 0x0000033be88942ee in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#36 0x0000033be781c8c2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#37 0x0000033be781cb07 in QEventLoop::exec (this=0x3a5170e7cc0, flags=...) at kernel/qeventloop.cpp:204
#38 0x0000033be7822047 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#39 0x00000010bdd8bf22 in main (argc=1, argv=0x3a5170e8108) at /usr/src/debug/kde-base/knotify-9999/knotify-9999/knotify/main.cpp:73
Comment 3 Francesco Riosa 2012-03-07 11:40:59 UTC
Created attachment 69344 [details]
solid-debug.patch

This debug patch comment out the assertion and emit a message instead, it's confirmed that the bug is triggered by auto mount/unmount of devices by the autofs daemon.
The message is in the lines which contain "Solid::DeviceManagerPrivate::_k_deviceRemoved"

8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 
kwin(9912) KWin::x11ErrorHandler: kwin: X Error ( "error: RenderBadPicture [RENDER+1], request: RenderFreePicture[RENDER+7], resource: 0x1200120" )
Object::disconnect: No such slot QObject::dataUpdated(QString,Plasma::DataEngine::Data) in /var/tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/plasma/datacontainer.cpp:274
Object::disconnect:  (sender name:   '/org/kde/fstab///192.168.4.21/SRC')
Object::disconnect: No such slot QObject::dataUpdated(QString,Plasma::DataEngine::Data) in /var/tmp/portage/kde-base/kdelibs-9999/work/kdelibs-9999/plasma/datacontainer.cpp:274
Object::disconnect:  (sender name:   '/org/kde/fstab///192.168.4.21/SRC')
[/usr/bin/nepomukservicestub] virtual void Soprano::Server::LocalServer::incomingConnection(quintptr)
[/usr/bin/nepomukservicestub] void Soprano::Server::ServerCorePrivate::addConnection(Soprano::Server::ServerConnection*) New connection. New count: 10
[/usr/bin/nepomukservicestub] Soprano::ODBC::Connection::Connection() Soprano::Server::ServerConnection(0x2a3140076d0)
file:///usr/share/apps/plasma/plasmoids/notifier/contents/ui/devicenotifier.qml:67: TypeError: Result of expression 'data[last]' [undefined] is not an object.
Solid::DeviceManagerPrivate::_k_deviceRemoved Q_ASSERT(dev->backendObject()!=0);   "/org/kde/fstab///192.168.4.25/g-gentoo-kde"
Solid::DeviceManagerPrivate::_k_deviceRemoved Q_ASSERT(dev->backendObject()!=0);   "/org/kde/fstab///192.168.4.25/g-gentoo-kde"
Solid::DeviceManagerPrivate::_k_deviceRemoved Q_ASSERT(dev->backendObject()!=0);   "/org/kde/fstab///192.168.4.25/g-gentoo-kde"
Solid::DeviceManagerPrivate::_k_deviceRemoved Q_ASSERT(dev->backendObject()!=0);   "/org/kde/fstab///192.168.4.25/g-gentoo-kde"
[/usr/bin/nepomukservicestub] virtual void Soprano::Server::LocalServer::incomingConnection(quintptr)
8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8<
Comment 4 Marian Kyral 2012-03-09 14:20:09 UTC
Hi I could confirm. After upgrade to 4.8.1, each mount/unmount of my auto mounted NFS disk causing crash of knotify It was OK in 4.8.
Comment 5 Francesco Riosa 2012-03-09 14:39:01 UTC
For me those are of type cifs (samba)
Comment 6 dag 2012-04-05 06:20:21 UTC
Still not fixed in 4.8.2 ?? The patch works fine for me.
Comment 7 Francesco Riosa 2012-04-16 16:15:25 UTC
Created attachment 70433 [details]
New crash information added by DrKonqi

knotify4 (4.0) on KDE Platform 4.8.2 (4.8.2) using Qt 4.8.1

since DrKonqi is workin again I'm going to attach a report from it

-- Backtrace (Reduced):
#11 0x00007f1ebe166a78 in Solid::DeviceManagerPrivate::_k_deviceRemoved (this=0x8226e0, udi=...) at /usr/src/debug/kde-base/kdelibs-4.8.2/kdelibs-4.8.2/solid/solid/devicemanager.cpp:201
[...]
#13 0x00007f1ebe17a2f5 in Solid::Ifaces::DeviceManager::deviceRemoved (this=<optimized out>, _t1=...) at /usr/src/debug/kde-base/kdelibs-4.8.2/kdelibs-4.8.2_build/solid/solid/ifaces/devicemanager.moc:108
#14 0x00007f1ebe1bf6a3 in Solid::Backends::Fstab::FstabManager::_k_updateDeviceList (this=0x783ba0) at /usr/src/debug/kde-base/kdelibs-4.8.2/kdelibs-4.8.2/solid/solid/backends/fstab/fstabmanager.cpp:126
#15 0x00007f1ebe1bf74a in Solid::Backends::Fstab::FstabManager::onMtabChanged (this=0x783ba0) at /usr/src/debug/kde-base/kdelibs-4.8.2/kdelibs-4.8.2/solid/solid/backends/fstab/fstabmanager.cpp:136
[...]
#17 0x00007f1ebe1c2628 in Solid::Backends::Fstab::FstabWatcher::onFileChanged (this=0x81cec0, path=...) at /usr/src/debug/kde-base/kdelibs-4.8.2/kdelibs-4.8.2/solid/solid/backends/fstab/fstabwatcher.cpp:104
Comment 8 Marian Kyral 2012-05-06 10:26:03 UTC
Still crashing in 4.8.3.
Comment 9 dag 2012-05-06 11:10:31 UTC
Is this unmaintained? Also had to patch my 4.8.3 just now.
Comment 10 Marian Kyral 2012-06-12 11:49:05 UTC
I just upgraded to KDE 4.8.80. It is still crashing :-(

Any change for fix?
Comment 11 Lamarque V. Souza 2012-08-23 13:54:19 UTC
*** Bug 305621 has been marked as a duplicate of this bug. ***
Comment 12 Alex Fiestas 2013-03-12 23:15:38 UTC
This was fixed in v4.8.90 sorry for not closing the bug :/

If I'm mistaken please, reopen the bug and provide a backtrace for 4.9.5 or 4.10 !

Thanks and sorry for the delay !