Bug 8581 - xcb locking assertion
Summary: xcb locking assertion
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xi (show other bugs)
Version: git
Hardware: All Linux (All)
: highest critical
Assignee: Jamey Sharp
QA Contact:
URL:
Whiteboard:
Keywords:
: 9392 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-10 03:04 UTC by Lars Knoll
Modified: 2006-12-19 16:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Lars Knoll 2006-10-10 03:04:11 UTC
I get an assertion failure in xcb_xlib_lock when calling XGetExtensionVersion 
in libXi (happens when starting any Qt application). Patch below fixes it.

diff --git a/src/XGetVers.c b/src/XGetVers.c
index 1f4fd7a..18dd6d8 100644
--- a/src/XGetVers.c
+++ b/src/XGetVers.c
@@ -67,10 +67,8 @@ XGetExtensionVersion(register Display *

     LockDisplay(dpy);
     ext = _XiGetExtensionVersion(dpy, name);
-    if (ext != (XExtensionVersion *) NoSuchExtension) {
-       UnlockDisplay(dpy);
-       SyncHandle();
-    }
+    UnlockDisplay(dpy);
+    SyncHandle();
     return (ext);
 }

@@ -80,7 +78,11 @@ _XiGetExtensionVersion(register Display
     xGetExtensionVersionReq *req;
     xGetExtensionVersionReply rep;
     XExtensionVersion *ext;
-    XExtDisplayInfo *info = XInput_find_display(dpy);
+    XExtDisplayInfo *info;
+
+    UnlockDisplay(dpy);
+    info = XInput_find_display(dpy);
+    LockDisplay(dpy);

     if (_XiCheckExtInit(dpy, Dont_Check) == -1)
        return ((XExtensionVersion *) NoSuchExtension);


Ok to commit?

Lars
Comment 1 Jamey Sharp 2006-10-15 12:55:23 UTC
Please re-test with libXi's git master branch. I think I just fixed this issue.

Oh, and thanks much for testing! :-)
Comment 2 Daniel Stone 2006-10-16 01:00:49 UTC
if this is still an issue, please feel free to commit directly.
Comment 3 Jamey Sharp 2006-10-16 02:10:48 UTC
But, er, don't commit *this* patch. :-) The first hunk is, I think, wrong, and
the second hunk drops the lock at a point it probably shouldn't.
Comment 4 Jamey Sharp 2006-11-15 16:07:26 UTC
In the absence of any feedback to the contrary, I'm considering this fixed.
Comment 5 Jamey Sharp 2006-12-19 16:40:15 UTC
*** Bug 9392 has been marked as a duplicate of this bug. ***


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.