[Xcb] [Bug 40372] New: Thread hangs in xcb_wait_for_reply() if another thread calls xcb_poll_for_event()

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Aug 25 05:28:07 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=40372

           Summary: Thread hangs in xcb_wait_for_reply() if another thread
                    calls xcb_poll_for_event()
           Product: XCB
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Library
        AssignedTo: xcb at lists.freedesktop.org
        ReportedBy: psychon at znc.in
         QAContact: xcb at lists.freedesktop.org


Created an attachment (id=50561)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=50561)
Test case causing hang

Hi,

thanks to sroedal who described this problem on IRC, I came up with the
attached test case. The thread doing GetInputFocus requests here will hang in
recv() almost instantly.

This happens because xcb_poll_for_event() can cause two threads to read data
from the connection because this function doesn't synchronize with anything
else. This means that the main thread will read the reply, but the thread
waiting for the reply will still be struck in recv().

Uli

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the Xcb mailing list