<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Deadlock in XCB enabled libX11"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=60560">60560</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>xcb@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Deadlock in XCB enabled libX11
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>xcb@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>spaceduzi@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Library
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>XCB
          </td>
        </tr></table>
      <p>
        <div>
        <pre>OS: Ubuntu 12.04.1
libx11-1.4.99.1

I have a multi-thread application written with XLib which ends in a deadlock on
Ubuntu 12.04.1.  The app has worked fine on previous Ubuntu releases (I'm not
sure if there was an XCB enabled libX11).

I noticed the following 2 scenarios:

Thread 2 (Thread 0xb7c64b40 (LWP 23423)):
#0  0xb7e94a27 in poll_for_event (dpy=0x8182498) at ../../src/xcb_io.c:248
#1  0xb7e94bdf in poll_for_response (dpy=0x8182498) at ../../src/xcb_io.c:288
#2  0xb7e95286 in _XReadEvents (dpy=0x8182498) at ../../src/xcb_io.c:423
#3  0xb7e83cf0 in XNextEvent (dpy=0x8182498, event=0xb7c642fc) at
../../src/NextEvent.c:50
#4  0x0804cfba in xwndw_loop (unused=0x0) at ../../../bnns/src/eloop.c:370
#5  0xb7e48d4c in start_thread (arg=0xb7c64b40) at pthread_create.c:308
#6  0xb7d86d3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb7c656c0 (LWP 23422)):
#0  _XReply (dpy=0x8182498, rep=0xbffff548, extra=0, discard=1) at
../../src/xcb_io.c:623
#1  0xb7e7b598 in _XGetWindowAttributes (dpy=0x8182498, w=88080399,
attr=0xbffff5d8) at ../../src/GetWAttrs.c:114
#2  0xb7e7b6e5 in XGetWindowAttributes (dpy=0x8182498, w=88080399,
attr=0xbffff5d8) at ../../src/GetWAttrs.c:149
#3  0x08053dc2 in open_extview_xwndw (width=200, height=200) at
../../../bnns/src/vis.c:561
#4  0x0804a823 in bsh () at ../../../bnns/src/bsh.c:230
#5  0x0804a07e in bsh_init (patterns_path=0xbffffa5a
"/home/uzak/projects/bnns/patterns", log_path=0x805738b "./log",
task_name=0xbffffa82 "spiral", up=0xbffff7c0, cp=0xbffff7b8, eep=0xbffff7bc) at
../../../bnns/src/bsh.c:94
#6  0x0804e2f0 in main (argc=9, argv=0xbffff8c4) at
../../../bnns/src/main.c:299

------------------------------------

Thread 2 (Thread 0xb7c64b40 (LWP 23742)):
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb7d785f0 in __GI___poll (fds=0xb7c641f8, nfds=1, timeout=-1) at
../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb7c7f120 in ?? () from /usr/lib/i386-linux-gnu/libxcb.so.1
#3  0xb7c80da9 in xcb_wait_for_event () from
/usr/lib/i386-linux-gnu/libxcb.so.1
#4  0xb7e952d7 in _XReadEvents (dpy=0x8182498) at ../../src/xcb_io.c:400
#5  0xb7e83cf0 in XNextEvent (dpy=0x8182498, event=0xb7c642fc) at
../../src/NextEvent.c:50
#6  0x0804cfba in xwndw_loop (unused=0x0) at ../../../bnns/src/eloop.c:371
#7  0xb7e48d4c in start_thread (arg=0xb7c64b40) at pthread_create.c:308
#8  0xb7d86d3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb7c656c0 (LWP 23741)):
#0  _XReply (dpy=0x8182498, rep=0xbffff548, extra=0, discard=1) at
../../src/xcb_io.c:623
#1  0xb7e7b598 in _XGetWindowAttributes (dpy=0x8182498, w=88080399,
attr=0xbffff5d8) at ../../src/GetWAttrs.c:114
#2  0xb7e7b6e5 in XGetWindowAttributes (dpy=0x8182498, w=88080399,
attr=0xbffff5d8) at ../../src/GetWAttrs.c:149
#3  0x08053dc2 in open_extview_xwndw (width=200, height=200) at
../../../bnns/src/vis.c:565
#4  0x0804a823 in bsh () at ../../../bnns/src/bsh.c:230
#5  0x0804a07e in bsh_init (patterns_path=0xbffffa5a
"/home/uzak/projects/bnns/patterns", log_path=0x805738b "./log",
task_name=0xbffffa82 "spiral", up=0xbffff7c0, cp=0xbffff7b8, eep=0xbffff7bc) at
../../../bnns/src/bsh.c:94
#6  0x0804e2f0 in main (argc=9, argv=0xbffff8c4) at
../../../bnns/src/main.c:299</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>