<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - glXSwapBuffers() can cause BadMatch or lock X when performed repeatedly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=88354">88354</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>glXSwapBuffers() can cause BadMatch or lock X when performed repeatedly
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.4
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

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

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

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

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>GLX
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>leftmostcat@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=112152" name="attach_112152" title="Test program demonstrating crash/lock">attachment 112152</a> <a href="attachment.cgi?id=112152&action=edit" title="Test program demonstrating crash/lock">[details]</a></span>
Test program demonstrating crash/lock

When running a simple program to test window and GL context creation, I
experience program crashes or X lockups when the main loop calls
glXSwapBuffers() too rapidly. When the swap interval is not set, this appears
to always cause X to lock, with only the mouse responding. (n.b. When
attempting to drag windows, the cursor changes appropriately but the windows do
not respond.) If glXSwapIntervalMESA(1) is called, this occasionally merely
results in a program crash after some number of loops. In both cases, the
following error appears in the output and the program stops execution:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  147 ()
  Minor opcode of failed request:  1
  Serial number of failed request:  163
  Current serial number in output stream:  1034

After the end of execution, if X is locked, it remains locked until restarted.
Putting a one second delay into the main loop prevents the crash and programs
using GLX while rendering real results have not yet elicited any crashes,
suggesting this is a race condition somewhere. The test program I am using to
reproduce this is attached.

I am using mesa 10.4.1 with the i965 drivers on an Intel HD 3000 with kernel
3.17.8. All packages are from the Fedora 21 repositories.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>