|
Bugzilla – Full Text Bug Listing |
| Summary: | X.Org grabs almost 100% of CPU load on an idle system | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.1 | Reporter: | Luis Medinas <lmedinas> |
| Component: | X.Org | Assignee: | Stefan Dirsch <sndirsch> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <xorg-maintainer-bugs> |
| Severity: | Major | ||
| Priority: | P3 - Medium | CC: | aj, ast, captain.magnus, coolo, federico, hub, hvogel, jmatejek, Joachim.Reichelt, lchiquitto, lmedinas, matz, mrueckert, mvdv, sndirsch, vuntz |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | openSUSE 11.1 | ||
| URL: | http://cgit.freedesktop.org/xorg/xserver/commit/?id=1f4fb0225b | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | Fix. | ||
|
Description
Luis Medinas
2009-02-03 17:52:18 UTC
I think this is something for Egbert to review. I updated from Factory (latest X) and used latest GNOME from GNOME:Factory (2.25.90) and this happens even on the login screen now. I packaged a new Xorg with the patch in my home and X didn't use 100% cpu anymore. Please add this patch to both 11.1 and Factory I've got severe issues with this patch:
1. (minor)
+ timeout = min(timeout, XSyncValueLow32 (value));
and
+ timeout = min(timeout, 0);
why min()? It's a define, timeout and XSyncValueLow32() are unsigned,
in the first case it's initialized to -1 in the latter to some value,
therefore the result is always clear.
This doesn't change the behavior of the function.
2. if (pIdleTimeValueLess &&
XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))
{
- AdjustWaitForDelay (wt, 0);
....
+ if (trig->CheckTrigger(trig, old_idle)) {
+ AdjustWaitForDelay(wt, 0);
+ break;
+ }
}
else if (pIdleTimeValueGreater)
{
...
}
changes the function: AdjustWaitForDelay(wt, 0) in the original form was
called whenever the first condition was true. Therefore the second test for
pIdleTimeValueGreater was not required.
However in the new version it may not have been called while the test for
pIdleTimeValueGreater may still succeed. Thus we may end up not calling it
at all although it should have been called.
This the else should be removed and the 'break' after the
AdjustWaitForDelay(wt, 0); should be replaced by:
IdleTimeCounter->value = old_idle; return;
3. I don't see why we need to check for the trigger in this function. The
greater and less brackets should have been set by SyncComputeBracketValues()
so that djustWaitForDelay() only gets called when CheckTrigger for at least
one Trigger would return true. I think the point of of having these brackets
is exactly to not have to loop over all triggers every time
IdleTimeBlockHandle() is called.
I suspect the bug to be elsewhere however the investigation wasn't done thoroughly enough.
Magnus said: (In reply to comment #2) > I updated from Factory (latest X) and used latest GNOME from GNOME:Factory > (2.25.90) and this happens even on the login screen now. And now the bug is P3. So. A bug making the CPU load 100% in Factory (because the packages in G:F will hit Factory really soon now) is P3? Something is wrong here. [I can understand why we might want to not push a 11.1 update, but for Factory...] As you said, it's factory and not 11.1. > Something is wrong here. Yes, that's you. > [I can understand why we might want to not push a 11.1 update, but for > Factory...] Thanks for not trying to force us to apply a wrong patch. (In reply to comment #8) > As you said, it's factory and not 11.1. Are you saying we don't care if Factory is not usable? > > Something is wrong here. > Yes, that's you. > > > [I can understand why we might want to not push a 11.1 update, but for > > Factory...] > > Thanks for not trying to force us to apply a wrong patch. It's a patch from upstream that got committed upstream. So we'll end up with it anyway. Applying it now will make things usable for Factory users now instead of having to wait, that's my only point. (also, was a bug opened upstream to try to explain why the patch was wrong and to get things fixed the right way?) > (also, was a bug opened upstream to try to explain why the patch was wrong and
> to get things fixed the right way?)
Feel free to open one. JFYI, Egbert did the analysis today.
I will try to investigate the problem to see if I can come up with a better fix. What do I have to do for it? Install FACTORY with GNOME? Anything else? Egbert, before you begin to investigate, could you verify that it isn't already investigated in Bug #473302? Egbert, You don't need Factory. Just install GNOME from GNOME:Factory (http://widehat.opensuse.org/repositories/GNOME:/Factory/openSUSE_11.1/) on your 11.1 install. It seems we are having some things missing here. We are only asking to add an upstream patch to fix this bug that will be present on 11.1 and Factory. If you care about a correct fix, contact who fixed (ajax) or submit a better fix on upstream. This is a critical bug that all GNOME 2.26 users will be notice. I'm going to switch to Xserver 1.6 for Factory anyway. Reassigning back to Egbert to further investigate upstream. *** Bug 480368 has been marked as a duplicate of this bug. *** *** Bug 473302 has been marked as a duplicate of this bug. *** This should be fixed for FACTORY with the update to 1.6 which is now in factory. For 11.1 it's still open. *** Bug 481511 has been marked as a duplicate of this bug. *** *** Bug 485056 has been marked as a duplicate of this bug. *** So... With all the dupes, and the fact that you didn't change to code, that came from upstream, in Factory, why can't you guys release this as a patch? Created attachment 281207 [details]
Fix.
I checked the patch and made some fixes to it. Besides there were more issues in the SYNC extension code which I also addressed.
This patch applies to the to of GIT head.
Reassigning to Stefan for integration. Patch applied to Factory and X11:XOrg. can we get this as maintenance update for 11.1? I noticed that Egbert's patch is not upstream yet. Is it meant for inclusion upstream? I backported a little bunch of upstream patches and put Egbert's patch on top of them, for openSUSE 11.1. There is an xorg-x11-server package in the GNOME:Backports:2.26 repository now: http://download.opensuse.org/repositories/GNOME://Backports://2.26/openSUSE_11.1 Could someone please test that package? (In reply to comment #29) > can we get this as maintenance update for 11.1? Egbert didn't work on a patch for 11.1/SLE11 (yet). I would assume the patch needs more testing in Factory first. (In reply to comment #31) > I backported a little bunch of upstream patches and put Egbert's patch on top > of them, for openSUSE 11.1. There is an xorg-x11-server package in the > GNOME:Backports:2.26 repository now: > > http://download.opensuse.org/repositories/GNOME://Backports://2.26/openSUSE_11.1 > > Could someone please test that package? I tested it on a test computer last week and it seemed to work perfectly fine there. Same. Works perfectly. Can we please get an online update for 11.1 now? Was an 11.1 update ever released? If so, I'll open a new bug report since I am seeing this issue after `zypper dup` # rpm -qi xorg-x11-server Name : xorg-x11-server Relocations: (not relocatable) Version : 7.4 Vendor: openSUSE Release : 17.6.1 Build Date: Thu Jul 2 18:12:30 2009 Install Date: Fri Jul 17 16:28:48 2009 Build Host: field Group : System/X11/Servers/XF86_4 Source RPM: xorg-x11-server-7.4-17.6.1.src.rpm Size : 5177913 License: X11/MIT Signature : RSA/8, Thu Jul 2 18:13:35 2009, Key ID b88b2fd43dbdc284 Packager : http://bugs.opensuse.org URL : http://xorg.freedesktop.org/ Summary : X.Org Server Description : This package contains the X.Org Server. Distribution: openSUSE 11.1 FYI: # strace -v -f -p (pid of xorg) -c Process 10095 attached - interrupt to quit % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 37.26 0.065195 0 2162497 setitimer 32.94 0.057638 0 2162567 clock_gettime 27.42 0.047983 0 1081249 select 2.34 0.004102 7 560 202 read 0.03 0.000045 0 181 writev 0.00 0.000000 0 3 sigreturn ------ ----------- ----------- --------- --------- ---------------- 100.00 0.174963 5407057 202 total We never released an update for 11.1. See comment #32. Fair enough. However, is the fix in the following repo: http://download.opensuse.org/repositories/X11:/XOrg/openSUSE_11.1 or just the GNOME backports repo mentioned in Comment #31. I don't have Gnome installed so prefer to be prudent with these things. Comment #28 was ambiguous: Is the patch in all branches of X11:Xorg or just the Factory branch. The fix is in X11:XOrg - for all repos. Does anyone claim that if they logon to two desktops (kde4 in my case) under two different accounts they don't see this bug? Currently I still have Xorg escalating to saturate the cpu after some time interval. It is a little worse with the update since the xorg hogs 99.9% of the cpu, where as prior to the X11:Xorg update the greedy xorg process only consumed spare CPU capacity, i.e. the active desktop was still responsive while the inactive desktops Xorg process hogged spare CPU cycles. Now the active desktop is not responsive. The greedy xorg process is from the non-current (background) desktop. What I see from gdb is below: # gdb /usr/bin/Xorg 3659 2>&1|tee -a gdb-Xorg-3659-cont.txt GNU gdb (GDB; openSUSE 11.1) 6.8.50.20081120-cvs Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i586-suse-linux". For bug reporting instructions, please see: <http://bugs.opensuse.org/>... Attaching to program: /usr/bin/Xorg, process 3659 Reading symbols from /usr/lib/libpciaccess.so.0...Reading symbols from /usr/lib/debug/usr/lib/libpciaccess.so.0.10.2.debug...done. done. Loaded symbols for /usr/lib/libpciaccess.so.0 Reading symbols from /usr/lib/libXfont.so.1...Reading symbols from /usr/lib/debug/usr/lib/libXfont.so.1.4.1.debug...done. done. Loaded symbols for /usr/lib/libXfont.so.1 Reading symbols from /usr/lib/libfreetype.so.6...done. Loaded symbols for /usr/lib/libfreetype.so.6 Reading symbols from /usr/lib/libXau.so.6...Reading symbols from /usr/lib/debug/usr/lib/libXau.so.6.0.0.debug...done. done. Loaded symbols for /usr/lib/libXau.so.6 Reading symbols from /usr/lib/libfontenc.so.1...Reading symbols from /usr/lib/debug/usr/lib/libfontenc.so.1.0.0.debug...done. done. Loaded symbols for /usr/lib/libfontenc.so.1 Reading symbols from /usr/lib/libpixman-1.so.0...done. Loaded symbols for /usr/lib/libpixman-1.so.0 Reading symbols from /usr/lib/libhal.so.1...done. Loaded symbols for /usr/lib/libhal.so.1 Reading symbols from /lib/libuuid.so.1...done. Loaded symbols for /lib/libuuid.so.1 Reading symbols from /lib/libdbus-1.so.3...done. Loaded symbols for /lib/libdbus-1.so.3 Reading symbols from /usr/lib/libXdmcp.so.6...Reading symbols from /usr/lib/debug/usr/lib/libXdmcp.so.6.0.0.debug...done. done. Loaded symbols for /usr/lib/libXdmcp.so.6 Reading symbols from /usr/lib/libssl.so.0.9.8...done. Loaded symbols for /usr/lib/libssl.so.0.9.8 Reading symbols from /usr/lib/libcrypto.so.0.9.8...done. Loaded symbols for /usr/lib/libcrypto.so.0.9.8 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libz.so.1...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /lib/libm.so.6...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libgcc_s.so.1...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /lib/libpthread.so.0...done. [Thread debugging using libthread_db enabled] Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libnss_compat.so.2...done. Loaded symbols for /lib/libnss_compat.so.2 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libnss_nis.so.2...done. Loaded symbols for /lib/libnss_nis.so.2 Reading symbols from /lib/libnss_files.so.2...done. Loaded symbols for /lib/libnss_files.so.2 Reading symbols from /usr/lib/xorg/modules/extensions/libdbe.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/extensions/libdbe.so.debug...done. done. Loaded symbols for /usr/lib/xorg/modules//extensions/libdbe.so Reading symbols from /usr/lib/xorg/modules/extensions/libdri.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/extensions/libdri.so.debug...done. done. Loaded symbols for /usr/lib/xorg/modules//extensions/libdri.so Reading symbols from /usr/lib/libdrm.so.2...done. Loaded symbols for /usr/lib/libdrm.so.2 Reading symbols from /usr/lib/xorg/modules/updates/extensions/libglx.so...done. Loaded symbols for /usr/lib/xorg/modules/updates//extensions/libglx.so Reading symbols from /usr/X11R6/lib/libGLcore.so.1...done. Loaded symbols for /usr/X11R6/lib/libGLcore.so.1 Reading symbols from /usr/lib/tls/libnvidia-tls.so.1...done. Loaded symbols for /usr/lib/tls/libnvidia-tls.so.1 Reading symbols from /usr/lib/xorg/modules/extensions/libextmod.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/extensions/libextmod.so.debug...done. done. Loaded symbols for /usr/lib/xorg/modules//extensions/libextmod.so Reading symbols from /usr/lib/xorg/modules/extensions/librecord.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/extensions/librecord.so.debug...done. done. Loaded symbols for /usr/lib/xorg/modules//extensions/librecord.so Reading symbols from /usr/lib/xorg/modules/extensions/libdri2.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/extensions/libdri2.so.debug...done. done. Loaded symbols for /usr/lib/xorg/modules//extensions/libdri2.so Reading symbols from /usr/lib/xorg/modules/updates/drivers/nvidia_drv.so...done. Loaded symbols for /usr/lib/xorg/modules/updates//drivers/nvidia_drv.so Reading symbols from /usr/lib/xorg/modules/input/synaptics_drv.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/input/synaptics_drv.so.debug...done. done. Loaded symbols for /usr/lib/xorg/modules//input/synaptics_drv.so Reading symbols from /usr/lib/xorg/modules/libfb.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/libfb.so.debug...done. done. Loaded symbols for /usr/lib/xorg/modules//libfb.so Reading symbols from /usr/lib/xorg/modules/libwfb.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/libwfb.so.debug...done. done. Loaded symbols for /usr/lib/xorg/modules//libwfb.so Reading symbols from /usr/lib/xorg/modules/input/evdev_drv.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/input/evdev_drv.so.debug...done. done. Loaded symbols for /usr/lib/xorg/modules//input/evdev_drv.so 0xffffe430 in __kernel_vsyscall () (gdb) backtrace full #0 0xffffe430 in __kernel_vsyscall () No symbol table info available. #1 0xb7ae0ae9 in setitimer () from /lib/libc.so.6 No symbol table info available. #2 0x08168602 in SmartScheduleStartTimer () at utils.c:1236 timer = {it_interval = {tv_sec = 0, tv_usec = 20000}, it_value = { tv_sec = 0, tv_usec = 20000}} #3 0x0815ef85 in WaitForSomething (pClientsReady=0x8649668) at WaitFor.c:233 i = 0 waittime = {tv_sec = 153935600, tv_usec = 153727352} wt = (struct timeval *) 0x827c780 timeout = 0 clientsReadable = {fds_bits = {0 <repeats 32 times>}} clientsWritable = {fds_bits = {151033048, 1, -1082018440, 134686602, 136845432, 136833908, 0, 137206280, 153261944, 423, 1073741825, 137222936, 0, 0, -1082018376, 135905167, 153857008, 137206280, 1, 1, 136845536, 134681232, -1082018328, 134698042, 1, 1, 137206280, -1082018344, 1, -1082018252, -1213080084, 1}} curclient = 0 selecterr = 0 nready = 19 devicesReadable = {fds_bits = {0 <repeats 32 times>}} now = 0 someReady = 0 #4 0x0808b9f7 in Dispatch () at dispatch.c:386 clientReady = (int *) 0x8649668 result = 0 client = (ClientPtr) 0x9229778 nready = -1 icheck = (HWEventQueuePtr *) 0x827f5d0 start_tick = 12580 #5 0x080718c0 in main (argc=8, argv=0xbf81b7f4, envp=0xbf81b818) at main.c:397 i = 1 alwaysCheckForInput = {0, 1} (gdb) bt #0 0xffffe430 in __kernel_vsyscall () #1 0xb7ae0ae9 in setitimer () from /lib/libc.so.6 #2 0x08168602 in SmartScheduleStartTimer () at utils.c:1236 #3 0x0815ef85 in WaitForSomething (pClientsReady=0x8649668) at WaitFor.c:233 #4 0x0808b9f7 in Dispatch () at dispatch.c:386 #5 0x080718c0 in main (argc=8, argv=0xbf81b7f4, envp=0xbf81b818) at main.c:397 (gdb) The lockup of the current desktop was an artifact caused by particular (ab)use of gdb. So current behavior with the updated Xorg is unchanged - Xorg process associated with the background desktop consumes all spare CPU cycles. Partial workaround is to cycle (ctl+atl+f7/f8) between user's desktops, but this only temporarily interrupts the runaway Xorg process for a few minutes. Will this bug be reopened? |