Sometimes the current Xserver (with intel 2.8.1 with KMS) crashes after
resume from RAM (or disk, but that is broken anyway ATM). I managed to
get a core and analyze it (see attached gdb log).
Long story short, sometimes after resume ScreenPriv->SavedCursor->bits
is NULL, and the server crashes.
The attached patch works around this issue, but it doesn't solve the
mysterious initial issue (why bits is actually NULL). If anybody has a
good idea, or a better idea how to actually solve this...
Thanks
Matthias
--
Matthias Hopf <[email protected]> __ __ __
Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ [email protected]
Phone +49-911-74053-715 __) |_| __) |__ R & D www.mshopf.de
(gdb) bt full
#0 0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb7a48990 in raise () from /lib/libc.so.6
No symbol table info available.
#2 0xb7a4a2c8 in abort () from /lib/libc.so.6
No symbol table info available.
#3 0x080c35b2 in ddxGiveUp () at xf86Init.c:1418
i = 0x1
#4 0x080c3681 in AbortDDX () at xf86Init.c:1463
i = 0x1
#5 0x0816edda in AbortServer () at log.c:397
No locals.
#6 0x0816f200 in FatalError (f=0x822e0ac "Caught signal %d. Server aborting\n") at log.c:522
args = 0xbfb780f4 "\v"
beenhere = 0x1
#7 0x080eae4e in xf86SigHandler (signo=0xb) at xf86Events.c:402
No locals.
#8 <signal handler called>
No symbol table info available.
#9 0x081144aa in xf86_use_hw_cursor_argb (screen=0x8297ef0, cursor=0x85cf0a8) at xf86Cursors.c:493
scrn = (ScrnInfoPtr) 0x8293fb8
xf86_config = (xf86CrtcConfigPtr) 0x82965f0
cursor_info = (xf86CursorInfoPtr) 0x8299948
#10 0x0811e6a3 in xf86CursorSetCursor (pDev=0x85dddd8, pScreen=0x8297ef0, pCurs=0x85cf0a8, x=0x200, y=0x12c) at xf86Cursor.c:330
ScreenPriv = (xf86CursorScreenPtr) 0x829d988
infoPtr = (xf86CursorInfoPtr) 0x8299948
PointPriv = (miPointerScreenPtr) 0x8298fe0
#11 0x0811e2dd in xf86CursorEnableDisableFBAccess (index=0x0, enable=0x1) at xf86Cursor.c:230
pDev = (DeviceIntPtr) 0x85dddd8
pScreen = (ScreenPtr) 0x8297ef0
ScreenPriv = (xf86CursorScreenPtr) 0x829d988
#12 0x080eb5b2 in xf86VTSwitch () at xf86Events.c:636
i = 0x0
prevSIGIO = 0x1
pInfo = (InputInfoPtr) 0x0
ih = (IHPtr) 0xbfb78728
#13 0x080eac76 in xf86Wakeup (blockData=0x0, err=0xffffffff, pReadmask=0x827ff40) at xf86Events.c:310
LastSelectMask = (fd_set *) 0x827ff40
devicesWithInput = {fds_bits = {0xb7d9f574, 0x861eae8, 0x6, 0x0, 0xb7dd1ff4, 0xb7dd1ff4, 0x6, 0xbfb78788, 0xb7d9e2b8, 0x861e880, 0xb7dd1ff4, 0xbfb78788, 0xb7d9db74, 0xabcdef, 0x0, 0x0, 0xb7db3d9f, 0x861e880, 0xb7dd1ff4, 0xbfb787b8, 0xb7d9fcde, 0xabcdef, 0x7, 0x0, 0xb7da002f, 0x0, 0x0, 0x0, 0x826dff4, 0x6d, 0xbfb789c0, 0xbfb787d8}}
pInfo = (InputInfoPtr) 0x0
#14 0x08099134 in WakeupHandler (result=0xffffffff, pReadmask=0x827ff40) at dixutils.c:418
i = 0x0
j = 0x827ff40
#15 0x0815eed0 in WaitForSomething (pClientsReady=0x8664760) at WaitFor.c:232
i = 0xffffffff
waittime = {tv_sec = 0x6d, tv_usec = 0x53974}
wt = (struct timeval *) 0xbfb789c0
timeout = 0x1ab31
clientsReadable = {fds_bits = {0x0 <repeats 32 times>}}
clientsWritable = {fds_bits = {0xb7a8b704, 0x20, 0xbfb789a0, 0x0, 0x82ab850, 0x826dff4, 0xbfb788e8, 0x8099cb5, 0xb7a8b704, 0xb7b77140, 0x0, 0x819a8e4, 0x827eb48, 0xbfb78920, 0x87ccc10, 0xb784f559, 0x87ccf90, 0xb7b77140, 0x0, 0x8932c90, 0xb7a8b704, 0x87cd010, 0x28, 0xb7b75ff4, 0xb7b77140, 0x1, 0xbfb78948, 0xbfb78958, 0x1, 0xbfb789b4, 0xb7ae7dec, 0x1}}
curclient = 0x0
selecterr = 0x4
nready = 0x9
devicesReadable = {fds_bits = {0x875dda0, 0x8297c70, 0xbfb78858, 0xb7afbd46, 0x8297ccc, 0x0, 0xbfb788a8, 0x819c099, 0x87f8e30, 0x87f8e30, 0x4, 0x8008d0, 0x8931c90, 0xbfb789a0, 0x20, 0x807274a, 0x20, 0x1, 0x8008d0, 0x4, 0x9, 0x87f8e30, 0x87f8e30, 0xbfb78920, 0x826dff4, 0x12003cb, 0xbfb788d8, 0x8099937, 0x827eb48, 0x0, 0xbfb78920, 0x80a7aac}}
now = 0x18594b
someReady = 0x0
#16 0x0808b9b7 in Dispatch () at dispatch.c:386
clientReady = (int *) 0x8664760
result = 0x0
client = (ClientPtr) 0x87f8478
nready = 0xffffffff
icheck = (HWEventQueuePtr *) 0x827f5f0
start_tick = 0x884
#17 0x08071880 in main (argc=0x9, argv=0xbfb78b74, envp=0xbfb78b9c) at main.c:397
i = 0x1
alwaysCheckForInput = {0x0, 0x1}
(gdb) f 9
#9 0x081144aa in xf86_use_hw_cursor_argb (screen=0x8297ef0, cursor=0x85cf0a8) at xf86Cursors.c:493
493 if (cursor->bits->width > cursor_info->MaxWidth ||
(gdb) p cursor->bits
$8 = (CursorBitsPtr) 0x0
>From d2b5c40a5be7f49bcd49e63ca340ffd5632b3302 Mon Sep 17 00:00:00 2001
From: Matthias Hopf <[email protected]>
Date: Fri, 4 Sep 2009 17:32:45 +0200
Subject: [PATCH] Work around ScreenPriv->SavedCursor->bits being NULL sometimes on resume.
---
hw/xfree86/ramdac/xf86Cursor.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c
index 6b71f46..95556a0 100644
--- a/hw/xfree86/ramdac/xf86Cursor.c
+++ b/hw/xfree86/ramdac/xf86Cursor.c
@@ -227,8 +227,12 @@ xf86CursorEnableDisableFBAccess(
* Re-set current cursor so drivers can react to FB access having been
* temporarily disabled.
*/
- xf86CursorSetCursor(pDev, pScreen, ScreenPriv->SavedCursor,
- ScreenPriv->x, ScreenPriv->y);
+ if (ScreenPriv->SavedCursor->bits)
+ xf86CursorSetCursor(pDev, pScreen, ScreenPriv->SavedCursor,
+ ScreenPriv->x, ScreenPriv->y);
+ else
+ xf86DrvMsg(index, X_ERROR,
+ "ScreenPriv->SavedCursor->bits is NULL. Cannot restore cursor.");
ScreenPriv->SavedCursor = NULL;
}
}
--
1.6.0.2
_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel