Thank you David
On 12.03.2014 8:46, David Holmes wrote:
On 11/03/2014 10:24 PM, Ivan Gerasimov wrote:
Hello everybody!
The test java/lang/ProcessBuilder/CloseRace.java was reported to
intermittently fail.
The test timed out, which should mean that at least one of the child
threads was never interrupted.
I couldn't reproduce the failure, but I suspect it might happen due to
call to interrupt() before the child thread became alive (I'm not really
sure if it's possible to be non-alive after call to start()).
It isn't. There's no reason the interrupt() would not be sent. More
likely problem is that the thread gets stuck in those busy-loops for
some reason; or the process.waitFor does not respond to the interrupt
(not sure how that is handled).
Yes, you are right!
The problem was with the loop in the child thread - please see my
response to Martin's message above.
Need a stack-dump of a hung process.
Here's the updated webrev with the checks for the thread to be
interrupted in the loops and stack dumping in the case of a failure:
http://cr.openjdk.java.net/~igerasim/8034262/2/webrev/
Sincerely yours,
Ivan
David
-----
The fix is to explicitly synchronize children with the parent.
Would you please help review the fix?
BUGURL: https://bugs.openjdk.java.net/browse/JDK-8034262
WEBREV: http://cr.openjdk.java.net/~igerasim/8034262/0/webrev/
Sincerely yours,
Ivan