<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 --- - Application crashes after many hours of drawing"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=71338">71338</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>Application crashes after many hours of drawing
          </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>alexander.elbs@comsoft.aero
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86 (IA32)
          </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>We have an application that does a lot of XDrawString and XDrawLine. After
several hours the application is exited by an XIOError.

The XIOError is called in libX11 in the file xcb_io.c, function _XReply.
It didn't get a response from xcb_wait_for_reply.

libxcb 1.5 is fine, libxcb 1.8.1 is not.
Bisecting libxcb points to this commit:

  commit ed37b087519ecb9e74412e4df8f8a217ab6d12a9
  Author: Jamey Sharp <<a href="mailto:jamey@minilop.net">jamey@minilop.net</a>>
  Date:   Sat Oct 9 17:13:45 2010 -0700

    xcb_in: Use 64-bit sequence numbers internally everywhere.

    Widen sequence numbers on entry to those public APIs that still take
    32-bit sequence numbers.

    Signed-off-by: Jamey Sharp <<a href="mailto:jamey@minilop.net">jamey@minilop.net</a>>

Reverting it on top of 1.8.1 helps.

Adding traces to libxcb I found that the last request numbers used for
xcb_wait_for_reply are these: 4294900463 and 4294965487 (two calls in the while
loop of the _XReply function), half a second later: 63215 (then XIOError is
called).
The widen_request is also 63215, I would have expected 63215+2^32.
Therefore it seems that the request is not correctly widened.

The commit above also changed the compares in poll_for_reply from
XCB_SEQUENCE_COMPARE_32 to XCB_SEQUENCE_COMPARE.
Maybe the widening never worked correctly, but it was never observed, because
only the lower 32bits were compared.</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>