How to debug the xserver?

Bill Spitzak spitzak at gmail.com
Wed Aug 29 23:03:33 PDT 2012


The xserver crashes immediately on me in realloc. So far all the 
information I can get is a backtrace and event messages (this is just 
after attempting to launch "xev" which caused weston to run Xorg):

I recompiled with --enable-debug but there is hardly any more information:

[22:53:35.626] xfixes version: 4.0
[22:53:35.682] created wm
[22:53:35.682] XCB_CREATE_NOTIFY (window 2097152, width 10, height 10, ours)
[22:53:35.682] XCB_PROPERTY_NOTIFY: window 305, 
_NET_SUPPORTING_WM_CHECK: WINDOW/32, length 4 (value_len 1): huh?
[22:53:35.683] XCB_PROPERTY_NOTIFY: window 305, _NET_SUPPORTED: ATOM/32, 
length 4 (value_len 1): _NET_WM_MOVERESIZE
[22:53:35.683] XCB_CREATE_NOTIFY (window 2097153, width 10, height 10, ours)
*** glibc detected *** /home/spitzak/install/bin/Xorg: realloc(): 
invalid next size: 0x0a30c9f0 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x73e42)[0x5d0e42]
/lib/i386-linux-gnu/libc.so.6(+0x7698f)[0x5d398f]
/lib/i386-linux-gnu/libc.so.6(realloc+0xe7)[0x5d5347]
/home/spitzak/install/bin/Xorg(ListenOnOpenFD+0xf0)[0x81c27c0]
/home/spitzak/install/lib/xorg/modules/extensions/libxwayland.so(+0x21a3)[0x8411a3]
/usr/lib/i386-linux-gnu/libffi.so.6(ffi_call_SYSV+0x1a)[0xa7135a]
/usr/lib/i386-linux-gnu/libffi.so.6(ffi_call+0x6f)[0xa7108f]
/home/spitzak/install/lib/libwayland-client.so.0(+0x4b03)[0xe8bb03]
/home/spitzak/install/lib/libwayland-client.so.0(wl_display_iterate+0x1a6)[0xe8a0b6]
/home/spitzak/install/lib/xorg/modules/extensions/libxwayland.so(+0x244b)[0x84144b]
/home/spitzak/install/bin/Xorg(WakeupHandler+0x65)[0x807aae5]
/home/spitzak/install/bin/Xorg(WaitForSomething+0x1a5)[0x81bd775]
/home/spitzak/install/bin/Xorg[0x8076702]
/home/spitzak/install/bin/Xorg[0x80643aa]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x5764d3]
/home/spitzak/install/bin/Xorg[0x80646d9]
======= Memory map: ========
00110000-0013a000 r-xp 00000000 08:01 4325425 
/lib/i386-linux-gnu/libm-2.15.s...

Any ideas on how to perhaps get the x server running in a debugger? I 
tried changing the launch line to "gdb --args Xorg ..." but it did not 
work because it appears the tty is disconnected.

Since this is memory corruption it may be that running valgrind might 
find something?

Also it may be a good idea if weston gave up trying to run the X server 
if it crashes more than a few times. For me it runs and crashes 
continuously (and quite rapidly) until I kill weston.


More information about the wayland-devel mailing list