[lldb-dev] [Bug 25652] New: [linux] I/O over pty arrives asynchronously, which confuses LLDB

via lldb-dev lldb-dev at lists.llvm.org
Thu Nov 26 02:56:30 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25652

            Bug ID: 25652
           Summary: [linux] I/O over pty arrives asynchronously, which
                    confuses LLDB
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: labath at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

According to this <https://lkml.org/lkml/2015/11/3/795> 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151126/c326d59a/attachment.html>


More information about the lldb-dev mailing list