[JIRA] Created: (HUDSON-5701) FastPipedInput/OutputStream and deadlock

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Created: (HUDSON-5701) FastPipedInput/OutputStream and deadlock

Hudson issues mailing list
FastPipedInput/OutputStream and deadlock
----------------------------------------

                 Key: HUDSON-5701
                 URL: http://issues.hudson-ci.org/browse/HUDSON-5701
             Project: Hudson
          Issue Type: Bug
          Components: core
            Reporter: kohsuke


If for various reasons a thread that "owns" one end of the pipe aborts unexpectedly, the other end can block forever, and the thread dump doesn't tell anything about why it's blocking.

The worst failure mode of this bug is when the channel reader thread deadlocks because of this, as it performs I/O synchronously. In this case the channel eventually fails, yet Hudson won't even notice that it failed.

{noformat}
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:474)
hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:136)
hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:115)
hudson.remoting.ProxyOutputStream$Chunk.execute(ProxyOutputStream.java:164)
hudson.remoting.Channel$ReaderThread.run(Channel.java:863)
{noformat}

Several ideas to help diagnose this problem:

* stream pair should refer to each other via a weak reference, so that if the other end is abandoned we'd be able to tell.
* allow optional name to be set on the pipe so that thread name can be changed while blocking.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]