Bug 271645 - Kded4 hangs with 100% cpu usage on resume from suspend
Summary: Kded4 hangs with 100% cpu usage on resume from suspend
Status: RESOLVED DUPLICATE of bug 272527
Alias: None
Product: Network Management
Classification: Miscellaneous
Component: KDED Module (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-24 21:30 UTC by Ricardo Graça
Modified: 2011-05-22 22:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
the setup (134.64 KB, image/png)
2011-05-09 22:13 UTC, Damjan Georgievski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo Graça 2011-04-24 21:30:05 UTC
Version:           4.6 (using KDE 4.6.2) 
OS:                Linux

After resuming from suspend or hibernate the desktop freezes, although keyboard  seems to continue working. Moving the mouse doesn't move the cursor. I am able to switch to another terminal by using Ctrl+Alt+F2 and see that Kded4 is with 100% cpu usage. Looking at the dmesg output after resume, the only possibly relevant errors I see are these lines:

[ 5159.368342] render error detected, EIR: 0x00000010
[ 5159.368342] page table error
[ 5159.368342]   PGTBL_ER: 0x00000003
[ 5159.368342] [drm:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
[ 5159.368342] render error detected, EIR: 0x00000010
[ 5159.368342] page table error
[ 5159.368342]   PGTBL_ER: 0x00000003

Reproducible: Always

Steps to Reproduce:
1. Suspend computer
2. Resume
3. Try to do anything

Actual Results:  
Can't do anything as kwin is frozen.

Expected Results:  
KWin isn't frozen and I'm able to use my computer.

This is an Atom N270 system with i945G and all packages up to date.
Comment 1 Ricardo Graça 2011-04-24 21:31:34 UTC
I forgot to add that killing kded un-freezes the system.
Comment 2 Christoph Feck 2011-05-04 14:08:42 UTC
If this is reproducible, please disable kded4 modules in "System Settings >
Startup and Shutdown > Service Manager" to see which one is the culprit.

Some modules cannot be disabled there. To disable such a module, remove its
.desktop file from /usr/share/kde4/services/kded/, run kbuildsycoca4, and
restart kded4.

The information which module causes the problem helps fixing the issue.
Comment 3 Damjan Georgievski 2011-05-09 22:13:19 UTC
Created attachment 59814 [details]
the setup

I have the same problem, running Awesome on ArchLinux with some KDE 4.6.3 apps.

This is how "systemsettings -> Startup and Shutdown > Service Manager".

Network status is running although I don't know why.
Comment 4 savardd 2011-05-11 19:08:58 UTC
I ran the test in comment #2 (removing .desktop file, and restarting kded4) and found that these two files are causing problems:
networkstatus.desktop and networkmanagement.desktop
After removing them, I no longuer have the 100% cpu problem when doing suspend/resume.  I'm not sure what they are useful for as my network is still working (CDMA cellular card)
Comment 5 Christoph Feck 2011-05-15 20:45:00 UTC
Ricardo, can you confirm that the networkstatus module causes the issue?
Comment 6 Ricardo Graça 2011-05-15 21:13:01 UTC
Sorry, I can't confirm if it works since I'm no longer using KDE. If the user in comment #4 managed to fix it by removing those files and nobody else complained about this, maybe it's safe to say that those are the only files causing problems.
Comment 7 Christoph Feck 2011-05-15 21:33:54 UTC

*** This bug has been marked as a duplicate of bug 272527 ***
Comment 8 Sergio 2011-05-22 22:44:50 UTC
On Kubuntu natty, updated to kde 4.6.3, I confirm that kded4 goes to 100% cpu usage (and becomes unresponsive) whenever a ppp connection via 3G mobile is started or stopped.

I also confirm that going to "System settings"->"Startup and Shutdown"->"Service Manager" and stopping+disabling "Network status" seems to solve the issue.

I believe that here we have 2 problems.

The first one is obviously network status that evidently manages locking up in active wait of something.

The second and IMHO much more serious one is the model by which services are managed by kded4 where one single service can lock up the whole kded4. Indeed note that when the issue reported in this bug report happens, not only kded4 starts eating up 100% cpu, it also becomes unresponsive. This is evidently declared by the "System settings"->"Startup and Shutdown"->"Service Manager" that gets grayed out, with a popup saying that kded4 cannot be contacted. To someone that is not an expert in kded4 internals like me, this is quite reminiscent of older OSes using cooperative multitasking models, where one misbehaving "task" could bring the whole system down. Please at least add a watchdog or something in its lines, so that when a kded4 service locks it can be identified, reported to the user and disabled.