Created attachment 71381 [details] detailed list of git versions Xorg failed to shut down properly. keyboard and mouse without any signs of life. ssh login possible, remode restart of Xorg revived local mouse/keyboard. Xorg Log: Nothing special, but the log missed the expected final "Server terminated successfully (0). Closing log file" message. dmesg output: Nothing special /var/log/messages: Nothing special. X was started from the console, so the last lines of stdout/stderr output were available. Nothing special, except one line: .Xorg: dispatch.c:3953: DetachOutputGPU: Assertion `slave->isGPU' failed. Reproducibility: Unfortunately pretty low. I was able to reproduce the problem only once in about 20 cycles. Hardware: Aopen i915GMm-Hfs. Pentium M Dothan, 2GB linux kernel: v3.7 distribution: opensuse 12.1 Xorg: X.Org X Server 1.13.99, for details see attachment cu, Knut
Well, it happened again.
I verified the bug on a 2nd system. Changed DetachOutputGPU in dix/dispatch.c to: void DetachOutputGPU(ScreenPtr slave) { if (slave->isGPU == NULL) { // -kp debug xorg_backtrace(); FatalError("Fatal: DetachOutputGPU called with slave->isGPU == NULL\n"); } xorg_backtrace(); // assert(slave->isGPU); xorg_list_del(&slave->output_head); slave->current_master = NULL; } Result: 1: during most server shutdowns DetachOutputGPU is never called, and the shutdown succeeds without error. 2: Whenever it is called, it is called with slave->isGPU==NULL. Below find a backtrace, (I added some Xorg function names to make it usefull). [ 43563.880] (II) UnloadModule: "evdev" [ 43563.880] (II) evdev: Power Button: Close [ 43563.880] (II) UnloadModule: "evdev" [ 43564.043] (EE) [ 43564.043] (EE) Backtrace: [ 43564.043] (EE) 0: /home/knut/xorg/X11-r/usr/bin/Xorg (xorg_backtrace+0x49) [0x8218839] [ 43564.043] (EE) 1: /home/knut/xorg/X11-r/usr/bin/Xorg (DetachOutputGPU+0x71) [0x8080b31] [ 43564.044] (EE) 2: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0xc1347) [0x8109347] xf86CrtcCloseScreen [ 43564.044] (EE) 3: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0x7e6fb) [0x80c66fb] DGACloseScreen [ 43564.044] (EE) 4: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0x823d1) [0x80ca3d1] DPMSClose [ 43564.044] (EE) 5: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0xf8d43) [0x8140d43] XvCloseScreen [ 43564.044] (EE) 6: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0x13b521) [0x8183521] SyncCloseScreen [ 43564.044] (EE) 7: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0xe7807) [0x812f807] CursorCloseScreen [ 43564.045] (EE) 8: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0x139a50) [0x8181a50] AnimCurCloseScreen [ 43564.045] (EE) 9: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0xe2528) [0x812a528] compCloseScreen [ 43564.045] (EE) 10: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0x87f95) [0x80cff95] VidModeClose [ 43564.045] (EE) 11: /home/knut/xorg/X11-r/usr/lib/xorg/modules/extensions/libglx.so (0xb720c000+0x44181) [0xb7250181] [ 43564.045] (EE) 12: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0x244b8) [0x806c4b8] [ 43564.045] (EE) 13: /lib/libc.so.6 (__libc_start_main+0xf3) [0xb72f9003] [ 43564.045] (EE) 14: /home/knut/xorg/X11-r/usr/bin/Xorg (0x8048000+0x24749) [0x806c749] _start [ 43564.045] (EE) [ 43564.046] Fatal server error: [ 43564.046] Fatal: DetachOutputGPU called with slave->isGPU == NULL [ cu, Knut
As far as I can see there is _one_ place where pScreen->isGPU is set to something: Init_screen() if parameter gpu is true. Added some extra debugging code. Init_screen() seems to be never called here with gpu true. Also AttachOutputGPU() seems to be never called here. But DetachOutputGPU() occasionally gets called on server shutdown from xf86CrtcCloseScreen(): /* detach any providers */ if (config->randr_provider) { if (config->randr_provider->offload_sink) { DetachOffloadGPU(screen); config->randr_provider->offload_sink = NULL; } else if (config->randr_provider->output_source) { DetachOutputGPU(screen); config->randr_provider->output_source = NULL; } else if (screen->current_master) DetachUnboundGPU(screen); } So calling of DetachOutputGPU() depends on config->randr_provider->output_source. It would help if I would knew how all this code is supposed to work ;-)
xf86RandR14ProviderSetOutputSource() never is called. That means output_source receives its value as a result of broken pointer arithmetic or something equivalent.
I am to reproduce this bug 100% of the time using xserver v1.13.1 built by the Fedora 18 beta release. See my description at <https://bugzilla.redhat.com/show_bug.cgi?id=891140> Needs attention ASAP.
(In reply to comment #5) > I am to reproduce this bug 100% of the time using xserver v1.13.1 built by > the Fedora 18 beta release. > > See my description at > > <https://bugzilla.redhat.com/show_bug.cgi?id=891140> > > Needs attention ASAP. 100% reproducibility on your systems sounds good. It seems that the problem vanished with newer versions or xorg on my system. Could you please test the current xorg git master version? cu, Knut
I am not set up to build the xorg git master version. So I am waiting for Fedora 18 developers to post a new version. Their latest is 1.13.1. I have several postings on the Fedora Bugzilla web site under the name Guido.
(In reply to comment #7) > I am not set up to build the xorg git master version. So I am waiting for > Fedora 18 developers to post a new version. Their latest is 1.13.1. I have > several postings on the Fedora Bugzilla web site under the name Guido. Could you try to debug the problem on your machine? Have you had a look at http://www.x.org/wiki/Development/Documentation/ServerDebugging The problem still exists in git master, fetched and compiled yesterday. (X.Org X Server 1.13.99.901 (1.14.0 RC 1)) cu, Knut
Knut At my urging Fedora Bugzilla has fixed the problem. In updates-testing, get these 2 packages xorg-x11-server-common-1.13.1-4.fc18.i686.rpm xorg-x11-server-Xorg-1.13.1-4.fc18.i686.rpm Source is there too in case you want to build yourself. This build #4 of v1.13.1 works for me. Guido PS I don't know if Fedora modifies the git master.
The known fix should be applied to master: http://lists.x.org/archives/xorg-devel/2013-January/035053.html cu, Knut
Daves patch made it to mainline long ago. Knut
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.