Bug 14029 - xcb "Lock assertion failure" in XkbRefreshKeyboardMapping/XkbGetMapChanges
Summary: xcb "Lock assertion failure" in XkbRefreshKeyboardMapping/XkbGetMapChanges
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: 7.3 (2007.09)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: xorg-7.4
  Show dependency treegraph
 
Reported: 2008-01-11 12:57 UTC by Jim Ramsay
Modified: 2008-02-24 16:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jim Ramsay 2008-01-11 12:57:07 UTC
I have encountered a double 'LockDisplay' situation inside XkbRefreshKeyboardMapping.  It calls LockDisplay, then XkbGetMapChanges:

        ...
        LockDisplay(dpy);
        if ((rtrn=XkbGetMapChanges(dpy,xkbi->desc,&changes))!=Success) {
        ...

Then XKBGetMapChanges *also* calls LockDisplay:

Status
XkbGetMapChanges(Display *dpy,XkbDescPtr xkb,XkbMapChangesPtr changes)
{
    xkbGetMapReq *req;

    if ((dpy->flags & XlibDisplayNoXkb) ||
        (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL)))
        return BadAccess;
    LockDisplay(dpy);
    ...

This only really is a problem when using xcb, due to the more strict  locking assertions.

The actual situation which led me to this discovery occurred in the 'synergys' application (http://synergy2.sourceforge.net/) which gave me the following traceback:

Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0x2aff31e949ec]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x15) [0x2aff31e94a77]
#2 /usr/lib/libX11.so.6 [0x2aff30ee8e32]
#3 /usr/lib/libX11.so.6(XkbGetMapChanges+0x3e) [0x2aff30f2bb08]
#4 /usr/lib/libX11.so.6(XkbRefreshKeyboardMapping+0xc7) [0x2aff30f28b4d]
#5 synergys [0x42f4a0]
#6 synergys [0x4311c8]
#7 synergys [0x457ac9]
#8 synergys [0x409206]
#9 synergys [0x4094ab]
#10 synergys [0x409ced]
#11 /lib/libc.so.6(__libc_start_main+0xf4) [0x2aff319681f4]
#12 synergys(__gxx_personality_v0+0x1e9) [0x4063c9]
synergys: xcb_xlib.c:73: xcb_xlib_lock: Assertion `!c->xlib.lock' failed.
Aborted
Comment 1 Adam Jackson 2008-02-24 16:58:19 UTC
I had this patched in Fedora, thought I'd fixed it upstream too, but I guess not.

Fixed now anyway.  Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.