Bugzilla – Bug 148384
restarting acpid makes X consume 100% cpu
Last modified: 2007-09-12 20:12:51 UTC
if i restart, X seems to go into an endless loop, consuming 100% cpu. It is easily reproducible on all my machines.
Seife, what about config and logfile? :-)
Created attachment 66567 [details] xorg.conf
Created attachment 66568 [details] xorg.log.old does this mean that you cannot reproduce it?
Probably the culprit is: - acpid starts first - X server connects to the acpid socket. - when acpid is restarted, the socket is stale => select on the stale socket always returns immediately => read from the socket fails. X should now disconnect the stale socket and reconnect to acpid (and probably retry with a some-second timeout if acpid is not available immediately).
Hmm ... why is acpid restarted?
Oops. I think I can reproduce this.
(In reply to comment #5) > Hmm ... why is acpid restarted? rpm -hUv acpid.rpm
IIRC Egbert has added acpid functionality to X, at this point this must be caught. The acpid cannot make the X server not going in an endless loop. Just an idea, how much sense would it make to let the X-server talk dbus to get the events? Probably not much as the service comes up quite late?
AFAIK Alan Hourihane added it. Matthias will try to have a look at it during the X.Org conference. IMHO this is *not* a blocker. Setting to CRITICAL.
Assigning to Matthias ...
Hm, this should be easy to fix - if I can set up a system to reproduce it. Will give it a try.
Should be pretty easy on 10.1. acpid must be active before Xserver has been started (default). Then kill acpid during an Xsession and have a look at top/ps. :-) Egbert, I'll assign this to you.
Created attachment 68704 [details] fix This patch fixes the problem. Not pretty but the APM functions were not designed for ACPI in the first place.
Thanks! I'll apply the patch.
Works fine! I add the current DEBUG output of Xserver. #rcacpid stop ACPI: Closing device ACPI: trying to reopen ACPI: Opening device ACPI: trying to reopen [...] < Xserver CPU load about 5% instead of 95% before > # rcacpid stop (II) Open ACPI successful (/var/run/acpid.socket) ACPI: successfully reopened
Anyone who want test? --> /work/built/mbuild/shannon-sndirsch-11/*/xorg-x11-server-6*.rpm Otherwise I'll commit it with DEBUG disabled.
Please do so! I forgot to turn the DEBUG stuff off. Sorry.
submitted for STABLE.
*** Bug 273667 has been marked as a duplicate of this bug. ***