Thread hangs reading from process output streams, even though process has terminated. (possible JDK bug?)

2014-04-16 Thread Bruno Medeiros
I have some code where I start an external process (ProcessBuilder.start() ,etc.) and then I spawn two worker threads to read the stdout and stderr of the external process. I directly read the streams provided by process.getInputStream() and process.getErrorStream() , I'm not wrapping them with my

Re: Thread hangs reading from process output streams, even though process has terminated. (possible JDK bug?)

2014-04-23 Thread Bruno Medeiros
After exploring this bug when running my full application, I have a lead on what seems to be a necessary condition/cause for it, and possibly a way to create a short reproducible case. The isolated code I posted originally is not enough. Here is what I found out. First lets call the process my Jav

Re: Thread hangs reading from process output streams, even though process has terminated. (possible JDK bug?)

2014-05-06 Thread Bruno Medeiros
After much chopping, I have finally narrowed it down to a single source file, and no external dependencies (other than starting Windows' cmd.exe process) : https://github.com/bruno-medeiros/Scratchpad/blob/jvm-processio-issue/jvm_process_bug/src/JVMProcessBug.java In this final form, I am now able

Re: Thread hangs reading from process output streams, even though process has terminated. (possible JDK bug?)

2014-05-29 Thread Bruno Medeiros
Any update on this? Has it been placed in the JVM bug database and/or have people tried to replicated it? (again note, it only appears to happen on JVM 7) On Tue, May 6, 2014 at 9:20 PM, Bruno Medeiros wrote: > After much chopping, I have finally narrowed it down to a single source > file, and n

Re: Thread hangs reading from process output streams, even though process has terminated. (possible JDK bug?)

2014-05-29 Thread roger riggs
Hi Bruno, Create an issue: JDK-8044321 EOF does not occur reading input from spawned cmd.exe process I was able to reproduce it on java 7 but not java 8. The implementation of Process does not mix handling of one Process instance with anothe

Re: Thread hangs reading from process output streams, even though process has terminated. (possible JDK bug?)

2014-05-29 Thread Bruno Medeiros
On Thu, May 29, 2014 at 2:32 PM, roger riggs wrote: > Hi Bruno, > > Create an issue: > JDK-8044321 EOF does > not occur reading input from spawned cmd.exe process > > I was able to reproduce it on java 7 but not java 8. > > Cool, thanks. > The

Re: Thread hangs reading from process output streams, even though process has terminated. (possible JDK bug?)

2014-05-29 Thread roger riggs
Thanks, feel free to add any additional information to the issue. Roger On 5/29/2014 9:41 AM, Bruno Medeiros wrote: On Thu, May 29, 2014 at 2:32 PM, roger riggs > wrote: Hi Bruno, Create an issue: JDK-8044321

Re: Thread hangs reading from process output streams, even though process has terminated. (possible JDK bug?)

2014-05-29 Thread Alan Bateman
On 29/05/2014 14:32, roger riggs wrote: Hi Bruno, Create an issue: JDK-8044321 EOF does not occur reading input from spawned cmd.exe process I was able to reproduce it on java 7 but not java 8. Bruno - I just had a brief chat with Roger about

Re: Thread hangs reading from process output streams, even though process has terminated. (possible JDK bug?)

2014-05-30 Thread Bruno Medeiros
Indeed, I gave it a try with 7u60 and I couldn't replicated it. Seems like it was a dup of that one. On Thu, May 29, 2014 at 3:38 PM, Alan Bateman wrote: > On 29/05/2014 14:32, roger riggs wrote: > >> Hi Bruno, >> >> Create an issue: >> JDK-8044321