Bug 217364 - KDED4 uses 100% of the cpu if the network backend is not FakeNet
Summary: KDED4 uses 100% of the cpu if the network backend is not FakeNet
Status: RESOLVED FIXED
Alias: None
Product: Network Management
Classification: Miscellaneous
Component: KDED Module (show other bugs)
Version: unspecified
Platform: Gentoo Packages Unspecified
: NOR normal
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
: 217371 277063 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-04 19:33 UTC by BRULE Herman
Modified: 2011-11-05 20:34 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
profile (56.52 KB, application/octet-stream)
2009-12-04 19:34 UTC, BRULE Herman
Details
screen shot (97.68 KB, image/png)
2009-12-05 09:34 UTC, BRULE Herman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BRULE Herman 2009-12-04 19:33:52 UTC
Version:            (using KDE 4.3.4)
Installed from:    Gentoo Packages

Hello,
A greate part of kde is block because kded4 use 100% cpu, see the attached file for sysprof profiling.
Comment 1 BRULE Herman 2009-12-04 19:34:26 UTC
Created attachment 38830 [details]
profile
Comment 2 Dario Andres 2009-12-05 03:39:56 UTC
- Which services do you have installed and running ? Check it on System Settings / Advanced / Service Manager
- What is your Qt4 version ?
- When does this problem started ?
Thanks
Comment 3 BRULE Herman 2009-12-05 09:34:02 UTC
- All by default (see my attachement)
- qt-4.5.3
- After update of kde
Comment 4 BRULE Herman 2009-12-05 09:34:56 UTC
Created attachment 38841 [details]
screen shot
Comment 5 BRULE Herman 2009-12-05 09:38:25 UTC
Note: Switch to network management backend to Fake Net have seam solve this problem. The version of networkmanager 0.7.1-r6.
Comment 6 Dario Andres 2009-12-14 18:59:25 UTC
This could be related to bug 217371. Thanks
Comment 7 David Faure 2010-01-16 12:07:10 UTC
SVN commit 1075552 by dfaure:

Fix 100% CPU usage due to a startTimer(0) that was never stopped; this could
happen if the timer was started twice, so m_timerId was overwritten, and the first
timer ID never recognized. It's much much simpler to use deleteLater: no risk of forgetting
the deletion and no risk of timers running forever. It means using QWeakPointer to notice
when it got deleted, though.
CCMAIL: kretz@kde.org

I'm not sure which of the "kded uses 100% cpu" bugs this really fixes; maybe all,
or maybe just the one that talks about phonon specifically...
Fixed for: 4.4
BUG: 202744
CCBUG: 178228
CCBUG: 184576
CCBUG: 217364
CCBUG: 220047


 M  +16 -34    hardwaredatabase.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1075552
Comment 8 BRULE Herman 2010-01-16 12:24:23 UTC
Available in which version of kde 4.4 for test? kde 4.3.90?
Comment 9 David Faure 2010-01-17 03:21:12 UTC
I _just_ committed this today, it would need a time machine to be in the 4.3.90 release from 11 days ago ;). It will be in the next one.
Comment 10 Guilherme Moro 2011-01-24 17:45:48 UTC
Confirming this behavior using KDE (Platform Version 4.5.95 (4.6 RC2))

If I deactivate networkmanager the problem apparently get solved.

Using strace when the kded4 start to eat the CPU shows only a lot of:

[pid  2820] poll([{fd=15, events=POLLIN}, {fd=14, events=POLLIN}], 2, -1) = 1 ([{fd=14, revents=POLLIN}])
[pid  2820] clock_gettime(CLOCK_MONOTONIC, {185, 710471893}) = 0

The commit above perhaps solves the problem with the timer, can't test it right now. But I think this bug need to be confirmed.
Comment 11 Guilherme Moro 2011-02-03 15:43:10 UTC
Still getting this issue on 4.6 final, this time the strace results are different

[guilherme@guilherme workspace]$ strace -p 5239
Process 5239 attached - interrupt to quit
futex(0x912c35c, FUTEX_WAIT_PRIVATE, 1, NULL]

anyone seeing this bug? I will try to made a test case to reproduce this.
Comment 12 Lamarque V. Souza 2011-02-04 16:02:46 UTC
*** Bug 217371 has been marked as a duplicate of this bug. ***
Comment 13 witekfl 2011-02-23 17:08:53 UTC
I also have 100% of CPU usage of kded4. kde-4.6.0.
This happens when IP changes (ADSL connection).
Comment 14 17.poison 2011-04-07 11:12:04 UTC
I also have this problem,
it happens when I disconnect my network connections.
changing backend to fake net didnt help.
Comment 15 17.poison 2011-04-07 11:15:16 UTC
I also have this problem,
it happens when I disconnect my network connections.
changing backend to fake net didnt help.
Comment 16 Alex Merry 2011-04-07 23:15:54 UTC
If changing the network backend to FakeNet doesn't help, and altering other network things doesn't affect the problem, then you're probably experiencing bug 220047, which happens even if all the kded services are stopped.
Comment 17 Edmundo 2011-04-30 03:15:53 UTC
I think I could be hitting this bug on Kubuntu Natty. When I come back from hibernation most of the times (if not all.. not sure about coming from sleeping) a kded4 process starts taking 100% CPU time and I lose control of my desktop. I can go to the VTs and kill it and then I can start working on KDE again... but KNetworkManager stops getting any information about wireless networks or GSM networks (I use a GSM dongle) so if I don't want to go down to using konsole and start wvdial to get internet access I have to restart the session... which by the way normally leaves some processes working that I have to kill by hand. I hope the report is usefull.

Here's the process I had to kill because it was taking all CPU time, as I said:

antoranz  1413  1.5  1.0 230092 21332 ?        Rl   Apr28  16:27 kdeinit4: kded4 [kdeinit]
Comment 18 Edmundo 2011-05-12 19:00:55 UTC
This is an strace from the moment when I killed pppd (I had started it
by hand, so no user interaction with KNetworkManager involved to start
it at all). When I killed pppd kded4 went off as usual. I don't know
if it's still related to this bug. What do you think?
Comment 19 yangjeep 2011-08-03 02:37:44 UTC
*** This bug has been confirmed by popular vote. ***
Comment 20 yangjeep 2011-08-03 02:41:46 UTC
The bug is seen archlinux with kde4. Networkmanager is thought to be the one who made the kde4d to take up high volume of cpu load.
https://bugs.archlinux.org/task/23955
Comment 21 Edmundo 2011-08-03 11:43:20 UTC
As a comment, I'm not seeing it in kde 4.7 (on kubuntu)... as a matter
of fact, I hadn't seen it in quite a while in
4.6.whatever-I-was-on-before-4.7
Comment 22 yangjeep 2011-09-12 23:11:22 UTC
(In reply to comment #21)
> As a comment, I'm not seeing it in kde 4.7 (on kubuntu)... as a matter
> of fact, I hadn't seen it in quite a while in
> 4.6.whatever-I-was-on-before-4.7

Are you using networkmanager at the same time?
The problem could still be seen in archlinux when using networkmanager 0.9.0-1 and kde 4.7.1-1
Comment 23 Lamarque V. Souza 2011-10-16 03:39:29 UTC
This is strange, I have never seen this problem happening in my notebook and I use NM with ethernet, wifi and 3G. Even when I used to use NM-0.8 I did not saw this problem, now I am using NM-0.9 and no problems with kded hogging the CPU.

Does anyone have any log to support the statement that this problem is in kded's network management module? Are you sure this is not a duplicate of the ntrack bug?
Comment 24 Lamarque V. Souza 2011-10-16 03:39:43 UTC
*** Bug 277063 has been marked as a duplicate of this bug. ***
Comment 25 Lamarque V. Souza 2011-11-05 20:34:52 UTC
Closing this bug, re-open if it happens again.