Bug 203048 - KNetworkManager uses lots of CPU
Summary: KNetworkManager uses lots of CPU
Status: RESOLVED DUPLICATE of bug 202744
Alias: None
Product: Network Management
Classification: Unmaintained
Component: knetworkmanager (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
: 204649 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-08 08:49 UTC by Thomas Schlichter
Modified: 2010-01-25 13:23 UTC (History)
1 user (show)

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


Attachments
strace log of knetworkmanager (without startup or end) (29.63 KB, application/octet-stream)
2009-08-08 08:51 UTC, Thomas Schlichter
Details
strace log of plasma-desktop (without startup or end) (23.38 KB, application/octet-stream)
2009-08-13 09:36 UTC, Thomas Schlichter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schlichter 2009-08-08 08:49:23 UTC
Version:           v0.8 (using KDE 4.3.0)
Compiler:          gcc-Version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) 
OS:                Linux
Installed from:    Ubuntu Packages

I am using Kubuntu 9.04 with the backported KDE 4.3 packages from:
   https://launchpad.net/~kubuntu-ppa/+archive/backports

My platform is a Samsung NC20 using the ath5k network driver. I am connected to a hidden WPA2 wireless network using the KNetworkManager plasma widget.

The power consumption of this netbook did rise and the CPU fan is always spinning because three processes are nearly always running. These processes are:
  knetworkmanager
  dbus-daemon
  plasma-desktop

So, it seems knetworkmanager is periodically communicating with the plasma-desktop via dbus. I will attach a system trace log from the knetworkmanager process.

If you require more information, please feel free to contact me.

Best regards,
  Thomas
Comment 1 Thomas Schlichter 2009-08-08 08:51:42 UTC
Created attachment 35985 [details]
strace log of knetworkmanager (without startup or end)

This strace was captured from the running knetworkmanager process.
Comment 2 Will Stephenson 2009-08-11 13:10:06 UTC
Do you have the plasmoid installed as well?

what is the output of "qdbus org.kde.kded" - does it contain "networkmanagement"?

if so, does "qdbus org.kde.kded /kded unloadModule networkmanagement" help?
Comment 3 Thomas Schlichter 2009-08-11 20:45:05 UTC
I do have installed the plasmoid as well.

But as I recognized these days, currently I am not able to reproduce the bug. Last time, the laptop was running through the night, and the high CPU usage was there the whole morning. So I think this bug may be related to the runtime, and maybe even to the appearance or disappearance of wireles networks.

So, unfortunately, I cannot tell if the described command would help...
Comment 4 Will Stephenson 2009-08-11 23:14:40 UTC
the command's output is independent of the plasmoid being installed - it shows whether the plasmoid's kded module is loaded, please just tell me whether it's loaded or not.
Comment 5 Thomas Schlichter 2009-08-11 23:54:50 UTC
OK, currently it seems the plasmoid's kded module is not loaded:

schlicht@netbook:~$ qdbus org.kde.kded | grep network
/modules/networkstatus
/modules/networkwatcher

But I cannot say if this was the case when the problem occured...
Comment 6 Thomas Schlichter 2009-08-13 09:33:46 UTC
Today, I hit the problem again, and I can confirm that the plasmoid's kded module is not loaded. Loading it does not have any influence...

But today I recognized that plasma-dekstop requires quite some memory:

Tasks: 108 total,   2 running, 106 sleeping,   0 stopped,   0 zombie
Cpu(s): 38.9%us,  3.1%sy,  0.7%ni, 56.6%id,  0.5%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   1802040k total,  1683200k used,   118840k free,    82628k buffers
Swap:  2642652k total,      128k used,  2642524k free,   895092k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3258 schlicht  20   0  509m 224m  33m R 47.3 12.8 124:53.97 plasma-desktop
 3051 schlicht  20   0  165m 161m  652 S 21.7  9.2  49:01.38 dbus-daemon
 3325 schlicht  20   0 66664  20m  15m S 19.7  1.2  73:21.32 knetworkmanager
 3092 schlicht  20   0  147m  17m  12m S  7.9  1.0   5:24.50 kded4
 2609 root      20   0  313m  48m 5336 S  2.0  2.7  16:30.71 Xorg
24062 schlicht  20   0  2444 1076  828 R  2.0  0.1   0:00.01 top

As it also consumes quite much CPU, I did strace it, too, and will attach the resulting log file.
Comment 7 Thomas Schlichter 2009-08-13 09:36:05 UTC
Created attachment 36123 [details]
strace log of plasma-desktop (without startup or end)

strace log of plasma-desktop (without startup or end)
Comment 8 Thomas Schlichter 2009-08-20 23:47:20 UTC
OK, now knetworkmanager started to use much CPU again. So I disabled all plasma widgets including the panel. Then plasma-desktop disappeared in "top", bur knetworkmanager stayed...:

Tasks: 108 total,   1 running, 107 sleeping,   0 stopped,   0 zombie
Cpu(s): 12.1%us,  1.7%sy,  1.2%ni, 82.9%id,  1.8%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   1802032k total,  1324924k used,   477108k free,    34460k buffers
Swap:  2642652k total,      256k used,  2642396k free,   937300k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3454 schlicht  20   0 65664  17m  13m S 13.5  1.0   4:19.42 knetworkmanager
 3043 schlicht  20   0  3088 1284  648 S 11.6  0.1   2:15.80 dbus-daemon
 2610 root      20   0  319m  51m 5604 S  3.9  2.9   3:48.25 Xorg
 3084 schlicht  20   0  147m  18m  13m S  1.9  1.0   0:19.89 kded4
    1 root      20   0  3084 1852  564 S  0.0  0.1   0:01.63 init
    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0
    4 root      15  -5     0    0    0 S  0.0  0.0   0:00.08 ksoftirqd/0
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    6 root      15  -5     0    0    0 S  0.0  0.0   0:00.06 events/0
    7 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
    8 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 kstop/0
    9 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0
   10 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kblockd/0
   11 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
   12 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify
   13 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 cqueue
   14 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0

What else can I provide so this bug makes progress? Unfortunately, the netbook needs to run for a while until this problem occurs...

Best regards,
  Thomas
Comment 9 Will Stephenson 2009-08-26 07:53:33 UTC
*** Bug 204649 has been marked as a duplicate of this bug. ***
Comment 10 Axel Braun 2009-09-17 13:32:13 UTC
Just had the problem again - after killing knetworkmanager the system responded again to keystrokes :-)
The laptop was on high load during a couple of hours, transcoding a movie. May that be a reason?
Any log I can provide before restarting?
Comment 11 Will Stephenson 2009-09-17 19:56:59 UTC
Just a quick response, I'm on my way out. 

Is there any way you can run knetworkmanager under callgrind with profiling disabled, and turn on profiling when it recurs to get a trace?

Instructions at http://bugzilla.novell.com/show_bug.cgi?id=529358
Comment 12 Axel Braun 2010-01-13 17:01:19 UTC
I did not notice the problem anymore in KDE 4.3.4 
Anyone to share this experience?
Comment 13 Will Stephenson 2010-01-25 13:23:19 UTC
I'm pretty sure it's this kded bug that is making kded spin and keeping everything else busy.

*** This bug has been marked as a duplicate of bug 202744 ***