Xdmx + XCB = `!c->xlib.lock' assertion failure

Alexander E. Patrakov patrakov at ums.usu.ru
Wed Jun 6 01:14:08 PDT 2007


Jamey Sharp wrote:
> On Tue, Jun 05, 2007 at 02:18:39PM +0600, Alexander E. Patrakov wrote:
>> This is reproducible both with Xorg-7.2 and with the latest released X 
>> components.
>>
>> Xnest -noreset -ac -geometry 640x480 :1 &>/dev/null &
>> Xnest -noreset -ac -geometry 512x384 :2 &>/dev/null &
>> Xdmx -display :1 -display :2 :3
>> <snip output>
>> Xdmx: xcb_xlib.c:41: xcb_xlib_lock: Assertion `!c->xlib.lock' failed.
> 
> I can't reproduce this problem: Xdmx on Xlib/XCB with two Xnest
> sessions, invoked in the above manner, works for me.

> Can you get a backtrace?

Yes:

#0  0xb7c9e867 in raise () from /lib/libc.so.6
#1  0xb7c9ff88 in abort () from /lib/libc.so.6
#2  0xb7c97f6c in __assert_fail () from /lib/libc.so.6
#3  0xb7c747c5 in xcb_xlib_lock () from /usr/lib/libxcb-xlib.so.0
#4  0xb7e81db8 in _XCBLockDisplay () from /usr/lib/libX11.so.6
#5  0xb7e5e2a6 in XFreeGC () from /usr/lib/libX11.so.6
#6  0xb7e5797d in XCloseDisplay () from /usr/lib/libX11.so.6
#7  0x081a5cff in dmxInputInit ()
#8  0x0807b4ac in InitInput ()
#9  0x08099b0f in main ()

This helped me to reduce the testcase to:

/* This is mostly a copy-and-paste from dmxinput.c */
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/XInput.h>

int dmxInputExtensionErrorHandler(Display *dsp, char *name, char *reason)
{
     return 0;
}

int main(int argc, char *argv[])
{
     XExtensionVersion    *ext;
     Display              *display;
     int                  (*handler)(Display *, char *, char *);

     if (!(display = XOpenDisplay(""))) return;

     /* Print out information about the XInput Extension. */
     handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
     ext     = XGetExtensionVersion(display, INAME);
     XSetExtensionErrorHandler(handler);

     if (!ext || ext == (XExtensionVersion *)NoSuchExtension) {
         printf("%s is not available\n", INAME);
     } else {
         printf("%s is available\n", INAME);
     }
     XCloseDisplay(display);
}

If XInputExtension is not supported by the X server, the above program will 
assert (libXi-1.1.0). I will now retest against the latest git of libXi and 
report the results.

-- 
Alexander E. Patrakov



More information about the xorg mailing list