[lldb-dev] [Bug 22497] New: Create test that floods target with SBProcess.PutSTDIN
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Feb 6 10:46:09 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22497
Bug ID: 22497
Summary: Create test that floods target with SBProcess.PutSTDIN
Product: lldb
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: lldb-dev at cs.uiuc.edu
Reporter: vince at nethacker.com
Classification: Unclassified
SBProcess.PutSTDIN naively sends stdin to a remote process. This fixes many
use cases. I think that if you flood the remote target with stdin, the remote
debug server will eventually block, which will potentially cause a deadlock.
There are two ways to improve this in remote debugging scenarios:
1) change the pty master file handle on the remote debug server to non-blocking
(if possible) and just return an error if there is a partial write
2) the better and much more complicated fix is for the debug server to create a
thread that reads from a circular buffer and writes it to a the pty master file
handle in blocking mode and advertises available space in the circular buffer
after every successful write. When SBProcess.PutSTDIN is called on a remote
host with insufficient window space, the thread calling SBProcess.PutSTDIN
blocks until there is sufficient window space.
--
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/20150206/a1141e65/attachment.html>
More information about the lldb-dev
mailing list