How to debug the xserver?

Bill Spitzak spitzak at
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: =========
======= Memory map: ========
00110000-0013a000 r-xp 00000000 08:01 4325425 

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