Created attachment 29940 [details] Test code to reproduce bug VMProcess performs a notify() on state change rather than notifyAll(), this means that if one thread waitFor() process termination and another calls destroy() then only one of the two will be woken up. This occurs during stress testing with Dacapo 2006's Eclipse benchmark on JikesRVM . Eclipses uses java.lang.Process to execute external commands with a timeout. Under high load the external processes do not finish within the timeout period and destroy() is called. At the same time Eclipse's process monitor thread is waiting in waitFor(). Only the waitFor() thread detects termination, the destroy() thread is never resumed. The attached program can reproduce the bug in miniature. Interestingly the javadoc suggests that VMProcess should notifyAll() already; however, no versions of the file in CVS or Git appear to have ever performed a notifyAll().
Created attachment 29941 [details] Fix for bug
In case someone views this bug report later: Andrew John Hughes has already committed the fix in revision aaf337541ddfe97dc0ff1cea1f66f06074798a74 (http://git.savannah.gnu.org/cgit/classpath.git/commit/?id=aaf337541ddfe97dc0ff1cea1f66f06074798a74).
I wasn't aware of this bug report. Now noted: http://git.savannah.gnu.org/cgit/classpath.git/commit/?h=gtk3&id=4c1b567bb1c279f343cd4b5188cd2172af960e3f