<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - [linux] I/O over pty arrives asynchronously, which confuses LLDB"
   href="https://llvm.org/bugs/show_bug.cgi?id=25652">25652</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[linux] I/O over pty arrives asynchronously, which confuses LLDB
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

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

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>labath@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>According to this <<a href="https://lkml.org/lkml/2015/11/3/795">https://lkml.org/lkml/2015/11/3/795</a>> discussion, there is
basically no guarantee about when will I/O from the inferior process arrive.
Specifically, it can arrive after we have it has stopped and we think we have
forwarded all of its input. This can cause two problems:
- the test suite sometimes checks the output of the process to verify it has
done the right thing. The late arrival of this text can cause flakyness.
- gdb-remote protocol does not support forwarding I/O when the process is
stopped. Currently, we will still attempt to do that and then things will
break.

The possible fixes for this would be: patching the kernel (which is a
possibility they seemed opened (or at least not opposed) to), inserting sleeps
or stopping using stdio in tests.

Although it is possible to reliably reproduce it with a specially crafted
program, I have seen this happen on the buildbot only once. Given that this
does not seem to happen very often, it does not seem like a big priority.

However, we should do something about the protocol forwarding issue, because
when this happens, and we are forwarding I/O, the entire debug session will
break down, which is not good.</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>