Bug 272527 - kde4d eat 100% when disconnecting gsm modem
Summary: kde4d eat 100% when disconnecting gsm modem
Status: RESOLVED DUPLICATE of bug 268038
Alias: None
Product: Network Management
Classification: Unmaintained
Component: KDED Module (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
: 271645 272415 272916 272965 273022 273194 273610 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-05 13:16 UTC by Piotr L
Modified: 2011-05-19 12:53 UTC (History)
12 users (show)

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


Attachments
example (189.98 KB, image/png)
2011-05-05 13:17 UTC, Piotr L
Details
connected (240.81 KB, image/png)
2011-05-05 20:36 UTC, Piotr L
Details
xsession-errors when unplugging usb modem (169.15 KB, text/plain)
2011-05-11 00:07 UTC, Piotr L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr L 2011-05-05 13:16:26 UTC
Version:           4.6 (using KDE 4.6.2) 
OS:                Linux

kde4d eat 100% when I disconnect gsm modem

Reproducible: Always
Comment 1 Piotr L 2011-05-05 13:17:27 UTC
Created attachment 59655 [details]
example
Comment 3 Christoph Feck 2011-05-05 14:23:27 UTC
In the hope that the removal of the GSM modem reliably triggers this, I am reassigning to network guys for inspection.
Comment 4 Lamarque V. Souza 2011-05-05 19:36:03 UTC
I cannot reproduce this bug with my 3G modem nor with my cell phone. There are bug reports about kded4 consuming too much CPU time not related to gsm connections:

https://bugs.kde.org/buglist.cgi?quicksearch=kded+cpu

I need more details about what you did to trigger this problem: did you disconnect using the disconnect button you just pull out the modem from the USB port? If the latter, was the modem connected to the Internet? Does this happen verytime you disconnect?

Are you sure there was only one kded4 daemon running? There is another bug report of kded4 not being closed when the user logs out. I myself face this problem from time to time.
Comment 5 Piotr L 2011-05-05 19:58:51 UTC
"did you disconnect using the disconnect button you just pull out the modem from the USB port?"
I do nothing, it is happen when I touch usb cable then gsm modem disconnect and kded eat 100% cpu.
Gsm modem is set the auto-connect to network, but when kded eat 100% modem dont want to connected to network.
"Are you sure there was only one kded4 daemon running?"
Yes
"There is another bug report of kded4 not being closed when the user logs out."
Yes I know, but I'm not using log out.
Comment 6 Lamarque V. Souza 2011-05-05 20:15:41 UTC
(In reply to comment #5)
> "did you disconnect using the disconnect button you just pull out the modem
> from the USB port?"
> I do nothing, it is happen when I touch usb cable then gsm modem disconnect and kded eat 100% cpu.

I do not get. Did you use the disconnect button or just unplug the modem when the problem happen? Touching the usb cable should do nothing as long as there is no bad contact in the USB port.

> Gsm modem is set the auto-connect to network, but when kded eat 100% modem dont  want to connected to network.

That is understandable since Plasma NM uses a kded module to control network interfaces. If kded is not working ok nor will Plasma NM's kded module.
Comment 7 Piotr L 2011-05-05 20:33:29 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > "did you disconnect using the disconnect button you just pull out the modem
> > from the USB port?"
> > I do nothing, it is happen when I touch usb cable then gsm modem disconnect and kded eat 100% cpu.
> 
> I do not get. Did you use the disconnect button or just unplug the modem when
> the problem happen? Touching the usb cable should do nothing as long as there
> is no bad contact in the USB port.
> 

I think that it is when connecting and disconnecting, because now it happen when status was "preparing to connect", I now I'm connected and kded eat 100% cpu ....
Comment 8 Piotr L 2011-05-05 20:36:14 UTC
Created attachment 59662 [details]
connected
Comment 9 Piotr L 2011-05-10 19:33:09 UTC
Yesterday I've got something like this, but I cant reproduce this with dbg libs...

Application: Powłoka pulpitu Plazmy (plasma-desktop), signal: Segmentation fault
[Current thread is 1 (Thread 0xb7760ad0 (LWP 1506))]

Thread 4 (Thread 0xb541ab70 (LWP 1507)):
#0  0x0081281f in ?? () from /lib/i386-linux-gnu/libc.so.6
#1  0x007f5f88 in poll () from /lib/i386-linux-gnu/libc.so.6
#2  0x0554384b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x055331af in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x05533524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x06014577 in QEventDispatcherGlib::processEvents (this=0x9e1fef0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x05fe6289 in QEventLoop::processEvents (this=0xb541a280, flags=...) at kernel/qeventloop.cpp:149
#7  0x05fe6522 in QEventLoop::exec (this=0xb541a280, flags=...) at kernel/qeventloop.cpp:201
#8  0x05ef02a0 in QThread::exec (this=0x9e20348) at thread/qthread.cpp:492
#9  0x05fc7fdb in QInotifyFileSystemWatcherEngine::run (this=0x9e20348) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x05ef2da2 in QThreadPrivate::start (arg=0x9e20348) at thread/qthread_unix.cpp:320
#11 0x04136e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#12 0x0080473e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 3 (Thread 0xae432b70 (LWP 1512)):
#0  0x05532010 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#1  0x05532e63 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0x05533524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x06014577 in QEventDispatcherGlib::processEvents (this=0x9e70e58, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x05fe6289 in QEventLoop::processEvents (this=0xae432280, flags=...) at kernel/qeventloop.cpp:149
#5  0x05fe6522 in QEventLoop::exec (this=0xae432280, flags=...) at kernel/qeventloop.cpp:201
#6  0x05ef02a0 in QThread::exec (this=0x9abc4b8) at thread/qthread.cpp:492
#7  0x05fc7fdb in QInotifyFileSystemWatcherEngine::run (this=0x9abc4b8) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x05ef2da2 in QThreadPrivate::start (arg=0x9abc4b8) at thread/qthread_unix.cpp:320
#9  0x04136e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#10 0x0080473e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 2 (Thread 0xad42ab70 (LWP 1517)):
#0  0x00bac416 in __kernel_vsyscall ()
#1  0x007f5f76 in poll () from /lib/i386-linux-gnu/libc.so.6
#2  0x0554384b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x055331af in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x0553392b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x04353304 in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0x0555c2df in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0x04136e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#8  0x0080473e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 1 (Thread 0xb7760ad0 (LWP 1506)):
[KCrash Handler]
#7  0x05fed6e7 in QMetaObject::cast (this=0x40e9868, obj=0x9f48930) at kernel/qmetaobject.cpp:266
#8  0x07d6a5af in UiUtils::iconName(Solid::Control::NetworkInterface*) () from /usr/lib/libknminternals.so.4
#9  0x04214a21 in ?? () from /usr/lib/kde4/plasma_applet_networkmanagement.so
#10 0x04214484 in ?? () from /usr/lib/kde4/plasma_applet_networkmanagement.so
#11 0x04207c20 in ?? () from /usr/lib/kde4/plasma_applet_networkmanagement.so
#12 0x05fed6ba in QMetaObject::metacall (object=0xa51ed70, cl=QMetaObject::InvokeMetaMethod, idx=50, argv=0xbfb5a558) at kernel/qmetaobject.cpp:237
#13 0x05ffd4ff in QMetaObject::activate (sender=0x9a9ef00, m=0x40b9760, local_signal_index=1, argv=0xbfb5a558) at kernel/qobject.cpp:3287
#14 0x040a72b9 in RemoteInterfaceConnection::hasDefaultRouteChanged(bool) () from /usr/lib/libknmclient.so.4
#15 0x040a768d in RemoteInterfaceConnection::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libknmclient.so.4
#16 0x040a7e1a in RemoteGsmInterfaceConnection::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libknmclient.so.4
#17 0x05fed6ba in QMetaObject::metacall (object=0x9a9ef00, cl=QMetaObject::InvokeMetaMethod, idx=8, argv=0xbfb5a6f8) at kernel/qmetaobject.cpp:237
#18 0x05ffd4ff in QMetaObject::activate (sender=0xa24f108, m=0x40b9d04, local_signal_index=1, argv=0xbfb5a6f8) at kernel/qobject.cpp:3287
#19 0x040b0489 in ?? () from /usr/lib/libknmclient.so.4
#20 0x040b0918 in ?? () from /usr/lib/libknmclient.so.4
#21 0x00b02acd in QDBusConnectionPrivate::deliverCall (this=0x99a7e58, object=0xa24f108, msg=..., metaTypes=..., slotIdx=6) at qdbusintegrator.cpp:942
#22 0x00b0d1d7 in QDBusCallDeliveryEvent::placeMetaCall (this=0x9a74d00, object=0xa24f108) at qdbusintegrator_p.h:103
#23 0x05ffc3b7 in QObject::event (this=0xa24f108, e=0x9a74d00) at kernel/qobject.cpp:1226
#24 0x02e1ed24 in QApplicationPrivate::notify_helper (this=0x99b19f0, receiver=0xa24f108, e=0x9a74d00) at kernel/qapplication.cpp:4462
#25 0x02e238ce in QApplication::notify (this=0x99a77e0, receiver=0xa24f108, e=0x9a74d00) at kernel/qapplication.cpp:3862
#26 0x00f7f3ca in KApplication::notify (this=0x99a77e0, receiver=0xa24f108, event=0x9a74d00) at ../../kdeui/kernel/kapplication.cpp:311
#27 0x05fe70bb in QCoreApplication::notifyInternal (this=0x99a77e0, receiver=0xa24f108, event=0x9a74d00) at kernel/qcoreapplication.cpp:731
#28 0x05feac79 in sendEvent (receiver=0x0, event_type=0, data=0x9959f38) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#29 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9959f38) at kernel/qcoreapplication.cpp:1372
#30 0x05feae0d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1265
#31 0x060143c4 in sendPostedEvents (s=0x99b0720) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#32 postEventSourceDispatch (s=0x99b0720) at kernel/qeventdispatcher_glib.cpp:277
#33 0x05532aa8 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#34 0x05533270 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#35 0x05533524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#36 0x0601453c in QEventDispatcherGlib::processEvents (this=0x9959a90, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#37 0x02ed2775 in QGuiEventDispatcherGlib::processEvents (this=0x9959a90, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#38 0x05fe6289 in QEventLoop::processEvents (this=0xbfb5b0f4, flags=...) at kernel/qeventloop.cpp:149
#39 0x05fe6522 in QEventLoop::exec (this=0xbfb5b0f4, flags=...) at kernel/qeventloop.cpp:201
#40 0x05feaecc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#41 0x02e1c8e7 in QApplication::exec () at kernel/qapplication.cpp:3736
#42 0x00c805a5 in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_plasma-desktop.so
#43 0x080485cb in _start ()
Comment 10 Piotr L 2011-05-10 19:36:31 UTC
But I think this backtrace may be other bug (?)
Of course I've got still this eating 100% cpu bug :( it is horrible bug...
Comment 11 Lamarque V. Souza 2011-05-10 20:04:33 UTC
*** Bug 272916 has been marked as a duplicate of this bug. ***
Comment 12 Lars Ivar Igesund 2011-05-10 21:05:52 UTC
To the question about exactly when this happens; whenever and however the USB modem is disconnected - whether via the phone menu, or by unplugging the USB. I haven't tried disconnecting via the applet - will try that tomorrow.
Comment 13 Christoph Feck 2011-05-10 22:10:19 UTC
See also bug 272965, which is probably a duplicate.
Comment 14 Lamarque V. Souza 2011-05-10 23:00:35 UTC
*** Bug 272965 has been marked as a duplicate of this bug. ***
Comment 15 Lamarque V. Souza 2011-05-10 23:01:40 UTC
Can you enable debugging in kdebugdialog and send me yours ~/.xsession-errors file when the bug happens?
Comment 16 Víctor Prea 2011-05-10 23:05:01 UTC
Same here but with OpenVPN...
Fresh Kubuntu 11.04 install on a Lenovo ThinkPad Edge 14 (Intel)

I have configured KNetworkManager to work with OpenVPN. It works fine!, I can
connect to my VPN and everything works smoothly.
But when I disconnect, 'kded4' process starts eating 100% CPU. I have to logoff
and login again, because the desktop becomes unusable.
I can always reproduce this bug, so I can provide more information if it is
requested.

$ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04
Comment 17 Piotr L 2011-05-11 00:07:16 UTC
Created attachment 59886 [details]
xsession-errors when unplugging usb modem
Comment 18 Lamarque V. Souza 2011-05-11 00:16:37 UTC
(In reply to comment #17)
> Created an attachment (id=59886) [details]
> xsession-errors when unplugging usb modem

ntrack is known to cause problems with kded: http://bugs.kde.org/268038 and http://bugs.kde.org/252076

If everybody here could not reproduce this problem with ntrack uninstalled then I will mark this bug as duplicate of http://bugs.kde.org/268038
Comment 19 Víctor Prea 2011-05-11 00:25:25 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > Created an attachment (id=59886) [details] [details]
> > xsession-errors when unplugging usb modem
> 
> ntrack is known to cause problems with kded: http://bugs.kde.org/268038 and
> http://bugs.kde.org/252076
> 
> If everybody here could not reproduce this problem with ntrack uninstalled then
> I will mark this bug as duplicate of http://bugs.kde.org/268038

Yes, most probably it is referred to ntrack. Anyways, anybody knows how to temporally disable ntrack on Kubuntu??, so I can run the tests and confirm if it is a duplicate of http://bugs.kde.org/268038.
Thanks.
Comment 20 Piotr L 2011-05-11 00:36:32 UTC
It is impossible to remove libntrack-qt4-1 or libntrack0 with apt-get (kubuntu) because it will remove whole kde.... how to disable ntrack ?
Comment 21 Christoph Feck 2011-05-11 12:59:04 UTC
*** Bug 273022 has been marked as a duplicate of this bug. ***
Comment 22 jose bernardo silva 2011-05-12 06:59:50 UTC
I have the same problem both with GSM and VPN disconnections in Kubuntu natty. The workaround for me, disabling networkstatus, is to edit /usr/share/kde4/services/kded/networkstatus.desktop and set X-KDE-Kded-autoload=false and restart kded4.
Is networkstatus the same as ntrack?
Comment 23 Lamarque V. Souza 2011-05-12 07:13:58 UTC
networkstatus uses ntrack when it is available. It seems it is the only program/library that uses ntrack.
Comment 24 Lamarque V. Souza 2011-05-13 19:07:34 UTC
*** Bug 273194 has been marked as a duplicate of this bug. ***
Comment 25 Christoph Feck 2011-05-14 22:06:38 UTC
*** Bug 272415 has been marked as a duplicate of this bug. ***
Comment 26 Christoph Feck 2011-05-15 21:33:54 UTC
*** Bug 271645 has been marked as a duplicate of this bug. ***
Comment 27 Víctor Prea 2011-05-15 21:52:10 UTC
(In reply to comment #22)
> I have the same problem both with GSM and VPN disconnections in Kubuntu natty.
> The workaround for me, disabling networkstatus, is to edit
> /usr/share/kde4/services/kded/networkstatus.desktop and set
> X-KDE-Kded-autoload=false and restart kded4.
> Is networkstatus the same as ntrack?

I did your modifications without success... after disconnecting OpenVPN, kded4 goes to 100%.
This is my /usr/share/kde4/services/kded/networkstatus.desktop file:
[Desktop Entry]
Name=Network Status
Comment=Tracks status of network interfaces and provides notification to applications using the network.
Type=Service
X-KDE-ServiceTypes=KDEDModule
X-KDE-ModuleType=Library
X-KDE-Library=networkstatus
X-KDE-DBus-ModuleName=networkstatus
X-KDE-Kded-autoload=false
X-KDE-Kded-load-on-demand=true
X-Ubuntu-Gettext-Domain=desktop_kdebase-runtime
Comment 28 Christoph Feck 2011-05-15 23:57:51 UTC
> X-KDE-Kded-load-on-demand=true

Try changing that to false, too. The network stack loads the status module on demand.
Comment 29 jose bernardo silva 2011-05-16 09:09:02 UTC
Sorry, I forgot I also set X-KDE-Kded-load-on-demand to false.
Comment 30 Víctor Prea 2011-05-16 21:20:28 UTC
(In reply to comment #29)
> Sorry, I forgot I also set X-KDE-Kded-load-on-demand to false.

Still with the same problem... kded4 at 100% CPU after disconnecting VPN.How can I check ntrack/networkstatus is not running?. I can not see it with ps -A.

--------------------
$ cat /usr/share/kde4/services/kded/networkstatus.desktop
[Desktop Entry]
Name=Network Status
Comment=Tracks status of network interfaces and provides notification to applications using the network.
Type=Service
X-KDE-ServiceTypes=KDEDModule
X-KDE-ModuleType=Library
X-KDE-Library=networkstatus
X-KDE-DBus-ModuleName=networkstatus
X-KDE-Kded-autoload=false
X-KDE-Kded-load-on-demand=false
X-Ubuntu-Gettext-Domain=desktop_kdebase-runtime
-----------------------
Comment 31 Lamarque V. Souza 2011-05-16 21:35:36 UTC
Try

qdbus org.kde.kded /kded unloadModule networkstatus

if it returns true then networkstatus is now disabled. You can enable it again by executing the same command with 'loadModule networkstatus' arguments.
Comment 32 Víctor Prea 2011-05-16 22:26:09 UTC
(In reply to comment #31)
> Try
> 
> qdbus org.kde.kded /kded unloadModule networkstatus
> 
> if it returns true then networkstatus is now disabled. You can enable it again
> by executing the same command with 'loadModule networkstatus' arguments.

$ qdbus org.kde.kded /kded unloadModule networkstatus
true

But again, kded4 100% CPU after VPN disconnect....
Comment 33 Lamarque V. Souza 2011-05-16 22:38:50 UTC
Is networkstatus listed in loadedModules when the problem happen?

qdbus org.kde.kded /kded loadedModules

Maybe kded is autoloading it. Being radical... you can move $KDEDIR/lib/kde4/kded_networkstatus.so to a different directory, then you make sure it is not loading it.
Comment 34 Víctor Prea 2011-05-16 23:20:09 UTC
(In reply to comment #33)
> Is networkstatus listed in loadedModules when the problem happen?
> 
> qdbus org.kde.kded /kded loadedModules
> 
> Maybe kded is autoloading it. Being radical... you can move
> $KDEDIR/lib/kde4/kded_networkstatus.so to a different directory, then you make
> sure it is not loading it.

$ qdbus org.kde.kded /kded loadedModules
networkstatus
remotedirnotify
powerdevil
device_automounter
keyboard
favicons
networkmanagement
khotkeys
dnssdwatcher
solidautoeject
kpackagekitd
notificationhelper
randrmonitor
kwrited
kmixd
freespacenotifier
desktopnotifier
ktimezoned
kcookiejar
statusnotifierwatcher

$ qdbus org.kde.kded /kded unloadModule networkstatus
true

$ qdbus org.kde.kded /kded loadedModules
remotedirnotify
powerdevil
device_automounter
keyboard
favicons
networkmanagement
khotkeys
dnssdwatcher                                                                    solidautoeject                                                                  kpackagekitd                                                                    notificationhelper                                                              randrmonitor                                                                    kwrited                                                                         kmixd                                                                           freespacenotifier                                                               desktopnotifier                                                                 ktimezoned                                                                      kcookiejar
statusnotifierwatcher

I'll try right now. If it fails, I'll move kded_networkstatus.so and try again.
Comment 35 Víctor Prea 2011-05-16 23:39:24 UTC
(In reply to comment #33)
> Is networkstatus listed in loadedModules when the problem happen?
> 
> qdbus org.kde.kded /kded loadedModules
> 
> Maybe kded is autoloading it. Being radical... you can move
> $KDEDIR/lib/kde4/kded_networkstatus.so to a different directory, then you make
> sure it is not loading it.

Well, moving /usr/lib/kde4/kded_networkstatus.so WORKED!!!!. Now I can connect and disconnect my VPN without trouble. Anyways.... I didn't noticed any loss of functionality on my network apps... I think I can live without ntrack/networkstatus.

So, I'll follow http://bugs.kde.org/268038
Comment 36 Lamarque V. Souza 2011-05-17 01:39:27 UTC

*** This bug has been marked as a duplicate of bug 268038 ***
Comment 37 Christoph Feck 2011-05-19 12:53:46 UTC
*** Bug 273610 has been marked as a duplicate of this bug. ***