Bug 585604

Summary: X process using 100% of CPU (when using F12 kernel on RHEL-6beta)
Product: Red Hat Enterprise Linux 6 Reporter: Gordan Bobic <gordan>
Component: xorg-x11-serverAssignee: Adam Jackson <ajax>
Status: CLOSED INSUFFICIENT_DATA QA Contact: desktop-bugs <desktop-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.0Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 601733 (view as bug list) Environment:
Last Closed: 2010-05-21 18:48:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dmesg
none
Xorg.0.log
none
messages
none
10 second strace of the X process using 100% of CPU none

Description Gordan Bobic 2010-04-25 01:14:07 UTC
Not quite sure if this is related to 585542, but in the setup with the F12 kernel to get the Intel GPU driver working, X process is using up 100% CPU constantly. This continues to happen even if the following packages from F12 are installed instead of the RHEL6b packages to match the kernel:

xorg-x11-server-Xorg-1.7.6-3.fc12.x86_64
xorg-x11-drv-intel-2.9.1-1.fc12.x86_64

Note 1: F12 with the said packages doesn't seem to suffer from this.
Note 2: KDE is being used as both DESKTOP and DISPLAYMANAGER

There don't appear to be any runnaway growing log files.

The 100% CPU usage by the X process only seems to happen when booting into run level 5, and even then, only AFTER logging in. If machine is booted into run level 3 and X started with startx, the X process DOESN'T use up excessive amounts of CPU. Interestingly, while at the X logon screen when booting into run level 5, the X process is also NOT using up CPU.

To summarize: The high CPU usage only occurs when:
1) Booting into run level 5
AND
2) After login

Comment 2 Gordan Bobic 2010-04-25 02:04:23 UTC
Just tested this a little further - this only seems to happen when using kdm login manager. It doesn't seem to happen when using gdm. Perhaps this bug should be re-assigned to the kdm package instead of xorg-x11-server?

Comment 3 RHEL Program Management 2010-04-25 02:16:40 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Matěj Cepl 2010-04-28 05:45:01 UTC
(In reply to comment #0)
> Not quite sure if this is related to 585542, but in the setup with the F12
> kernel to get the Intel GPU driver working, X process is using up 100% CPU
> constantly. This continues to happen even if the following packages from F12
> are installed instead of the RHEL6b packages to match the kernel:
> 
> xorg-x11-server-Xorg-1.7.6-3.fc12.x86_64
> xorg-x11-drv-intel-2.9.1-1.fc12.x86_64
> 
> Note 1: F12 with the said packages doesn't seem to suffer from this.
> Note 2: KDE is being used as both DESKTOP and DISPLAYMANAGER

Thanks for the bug report.  We have reviewed the information you have provided above, and there is some additional information we require that will be helpful in our diagnosis of this issue.

Please attach

* your X server config file (/etc/X11/xorg.conf, if available),
* output of the dmesg command,
* system log (/var/log/messages), and
* X server log file (/var/log/Xorg.*.log)

to the bug report as individual uncompressed file attachments using the bugzilla file attachment link above.

We will review this issue again once you've had a chance to attach this information.

Thanks in advance.

Comment 5 Gordan Bobic 2010-05-06 14:07:14 UTC
Unfortunately, I no longer have access to the machine I was testing this on. However, the symptoms look very similar to what is described in bug 523646. There is a possibility they might be related.

Comment 7 Gordan Bobic 2010-06-07 09:32:30 UTC
I have just re-observed this on a completely different machine. The original one was an Atom N450. The current one is a C2D w/ ATI X1400M. Same thing is happening.

Logs are attached separately.

Please re-open the bug.

Comment 8 Gordan Bobic 2010-06-07 09:37:51 UTC
Created attachment 421760 [details]
dmesg

Comment 9 Gordan Bobic 2010-06-07 09:40:01 UTC
Created attachment 421761 [details]
Xorg.0.log

Comment 10 Gordan Bobic 2010-06-07 09:44:12 UTC
Created attachment 421763 [details]
messages

Comment 11 Gordan Bobic 2010-06-07 09:46:50 UTC
There is no xorg.conf file.

I'd appreciate it if you could mark this bug as invisible for now just in the unlikely case there's something vaguely exploitable that could be inferred from the logs I attached.

Comment 12 Gordan Bobic 2010-06-07 12:46:13 UTC
Another point to note - the current case is when using a vanilla RHEL6b setup, no F12 packages at all.

The top to CPU using processes are consistently these two:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 1671 root      40   0  112m  18m 5800 R 99.4  0.6  34:10.87 X                 
 1993 gordan    40   0  859m  22m  14m S  2.3  0.7   0:41.16 knotify4          

HTH.

Comment 13 Gordan Bobic 2010-06-08 09:53:24 UTC
Having looked elsewhere for possible insight into causes of this, I have found this KDE bug dating back to 2008.

https://bugs.kde.org/show_bug.cgi?id=174897

Could it be related?

Comment 14 Gordan Bobic 2010-06-08 12:09:48 UTC
Created attachment 422157 [details]
10 second strace of the X process using 100% of CPU

Note: Although it is only < 70KB compressed, this extracts to about 15MB, as most lines are almost identical, and one might hope relevant to the high CPU usage.

Comment 15 Gordan Bobic 2010-06-08 14:01:04 UTC
OK, I can confirm that there is additional evidence that it is in fact the external KDE bug from 2008 that is causing this issue.

The bug in question is in KDE's powerdevil.
Removing powerdevil libraries cures the problem:


# ls -la /usr/lib64/kde4/*powerdevil*
----------. 1 root root 193992 Feb 17 14:31 /usr/lib64/kde4/kcm_powerdevilconfig.so.bak
----------. 1 root root 188936 Feb 17 14:31 /usr/lib64/kde4/kded_powerdevil.so.bak
----------. 1 root root  55120 Feb 17 14:31 /usr/lib64/kde4/krunner_powerdevil.so.bak

X process CPU usage is now back down to around 0.

This is, of course, a gross hack, but disabling KDE power management completely in this way yields far, far better battery life than running the CPU constantly at 100%.

If I am right about this, it may be worth investigating how a bug that has been patched upstream for at least 18 months has managed to get into RHEL6b.