<html>
<head>
<base href="http://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 --- - Create test that floods target with SBProcess.PutSTDIN"
href="http://llvm.org/bugs/show_bug.cgi?id=22497">22497</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Create test that floods target with SBProcess.PutSTDIN
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Reporter</th>
<td>vince@nethacker.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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.</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>