Reading subprocess stdout susceptible to deadlock
Roger.Riggs at Oracle.com
Wed Mar 30 14:09:28 UTC 2016
I haven't seen that before, please create a bug and include the stack
On 3/30/2016 9:56 AM, Vitaly Davidovich wrote:
> It seems that doing a blocking read on a subprocess's stdout can lead to
> deadlock between the thread doing the read and the process reaper thread.
> The deadlock occurs because the reader is synchronized on the
> ProcessPipeInputStream, blocks for more data to consume, and process reaper
> comes along trying to call processExited, which also synchronizes on the
> same PPIS. The reader appears stuck because it's not seeing the EOF due to
> process reaper not being able to close the stream.
> I couldn't find any existing reports of this via quick search, which makes
> me wonder if I'm missing something. Is this a known issue?
More information about the core-libs-dev