Description of problem: X gives a segfault when run as '/etc/X11/X -query othermachine' from init (using /etc/inittab). Version-Release number of selected component (if applicable): XFree86-4.2.99.902-20030218.0 How reproducible: 100% Steps to Reproduce: 1. Set up othermachine for XDMCP 2. Fresh install 3. init 3 4. Change last line of /etc/inittab to: x:5:respawn:/etc/X11/X -query othermachine 5. init q 6. init 5 Actual results: Screen flickers until giving up. Expected results: X display. Additional info: Bizarrely, running '/etc/X11/X -query othermachine' from the console as root works perfectly fine. :-/ Also, this is a new regression since a couple of days ago.
Please do a binary search of last builds to narrow down the single release that introduces the problem for ya.
17.1 works, 18.0 doesn't
The machine with the crashing server has a Matrox G400 video card, by the way.
Too weird. So if I set the inittab line to run: sh -c '/etc/X11/X -query othermachine' then it will segfault. But this works fine: sh -c 'cd /;/etc/X11/X -query othermachine' About the best stack trace I'm going to be able to get is this I think: #0 0x4011e985 in ?? () #1 0x0876c646 in ?? () #2 0x08782ea7 in ?? () #3 0x08782bc3 in ?? () #4 0x08085dd6 in DGAShutdown () at xf86DGA.c:496 #5 0x0806e87e in ddxGiveUp () #6 0x08100512 in AbortServer () at utils.c:436 #7 0x08102060 in FatalError ( f=0x81ed6c0 "Caught signal %d. Server aborting\n") at utils.c:1421 #8 0x0808861e in xf86SigHandler (signo=11) at xf86Events.c:1186 #9 <signal handler called> #10 0x4011e985 in ?? () #11 0x0876c4a4 in ?? () #12 0x08782771 in ?? () #13 0x080becec in CMapCloseScreen (i=0, pScreen=0x87a4aa8) at xf86cmap.c:215 #14 0x0809734f in DPMSClose (i=0, pScreen=0x87a4aa8) at xf86DPMS.c:100 #15 0x0830a800 in ?? () #16 0x4011a4df in ?? () #17 0x08193b94 in RRCloseScreen (i=0, pScreen=0x87a4aa8) at randr.c:159 #18 0x08096f8f in xf86RandRCloseScreen (index=0, pScreen=0x87a4aa8) at xf86RandR.c:235 #19 0x080b79f3 in VidModeClose (i=0, pScreen=0x87a4aa8) at xf86VidMode.c:100 #20 0x0818f9e8 in LbxCloseScreen (i=0, pScreen=0x87a4aa8) at lbxcmap.c:159 #21 0x081a2775 in AnimCurCloseScreen (index=0, pScreen=0x87a4aa8) at animcur.c:126 #22 0x080e16e9 in main (argc=3, argv=0xbfffea74, envp=0xbfffea84) at main.c:459 #23 0x420154a4 in __libc_start_main () from /lib/tls/libc.so.6
The only other thing I've managed to capture is this fragment of strace output. Running X under strace to start with ends up looping with signals, so I had to attach it at the instant before it crashed; not easy. write(0, "[drm] unmapping 8192 bytes of SA"..., 61) = 61 munmap(0x4001b000, 8192) = 0 fstat64(7, {st_mode=S_IFCHR|0666, st_rdev=makedev(226, 0), ...}) = 0 fstat64(7, {st_mode=S_IFCHR|0666, st_rdev=makedev(226, 0), ...}) = 0 close(7) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
I put this in section 'device' (mga driver): Option "HWCursor" "off" That makes the problem go away. Some hwcursor bug I guess.
Created attachment 90268 [details] XFree86-revert-some.patch This patch (which reverts a change in 0217->0218) seems to make the problem go away, unless I tested wrong.
This patch, which was checked into CVS by Alan, should fix this problem. 939. Check pScrn->vtSema before calling xf86SetCursor() from xf86CursorCloseScreen(). This avoids a segfault at exit with some drivers (Alan Hourihane). --- xc/programs/Xserver/hw/xfree86/ramdac/xf86Cursor.c:1.18 Tue Feb 18 10:42:13 2003 +++ xc/programs/Xserver/hw/xfree86/ramdac/xf86Cursor.c Fri Feb 21 17:40:33 2003 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/xf86Cursor.c,v 1.17tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/xf86Cursor.c,v 1.18 2003/02/18 15:42:13 tsi Exp $ */ #include "xf86.h" #include "xf86_ansic.h" @@ -122,7 +122,7 @@ xf86CursorScreenPtr ScreenPriv = pScreen->devPrivates[xf86CursorScreenIndex].ptr; - if (ScreenPriv->isUp) + if (ScreenPriv->isUp && pScrn->vtSema) xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); pScreen->CloseScreen = ScreenPriv->CloseScreen;
Setting to MODIFIED, please test XFree86-4.2.99.902-20030223.0 build and set to RAWHIDE if fixed or ASSIGNED if broken still.
Yes, seems to fix it here. Thanks.