Bug 465090

Summary: X.org sometimes uses 100% of a CPU.
Product: [openSUSE] openSUSE 11.1 Reporter: Boyd Smith <bss>
Component: X.OrgAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.1   
Whiteboard:
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Compressed strace from trace during 100% CPU usage.
ltrace from X.org when using 100% CPU -- ltrace caused X.org to crash

Description Boyd Smith 2009-01-10 02:41:22 UTC
Created attachment 264274 [details]
Compressed strace from trace during 100% CPU usage.

Occasionally, X.org will enter some busy wait loop and use 100% of a single CPU.  My system has two cores, so the system remains mostly usable.  The mouse and keyboard to become less responsive.  (The keyboard will "halt" for 5-10 characters and then dump them all, in the correct order, suddenly; the mouse pointer will move less smoothly or jump around; etc.)  X.org does not seem to be accomplishing anything during this time, but one CPU remains at 100% usage even if the system is otherwise idle.  Once X.org is in this state, it generally persists for hours.

It seems to be related to either suspend/resume OR notifications from powerdevil.  Either of these events can put X.org into the state where it uses 100% of a single CPU *OR* cause the CPU usage to drop back to normal levels--1% to 4% with occasional spikes up to 15%.  It is not all the time, but it does happen regularly--it starts every 1-3 days of usage and I use my system nearly every day.

I will attach an strace of the process while it is busy-waiting.  I when I attempted to ltrace the process, it crashed, but I will attach the partial ltrace.

KSysguard says roughly half of the CPU usage by X is "System Load" and the other half is "User Load".  During the strace, this changed to 70-80% "System Load" and the rest "User Load".  The ltrace crash was sudden, so I did not see a usage change at the time.

Please let be know what actions I can take next time X.org behaves this way to help you troubleshoot the issue.
Comment 1 Boyd Smith 2009-01-10 02:43:15 UTC
Created attachment 264275 [details]
ltrace from X.org when using 100% CPU -- ltrace caused X.org to crash
Comment 2 Stefan Dirsch 2009-01-10 07:09:58 UTC

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