bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/57070] New: VMProcess needs to notifyAll() instead of not


From: c.g.ritson at kent dot ac.uk
Subject: [Bug classpath/57070] New: VMProcess needs to notifyAll() instead of notify()
Date: Thu, 25 Apr 2013 16:45:44 +0000


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57070



             Bug #: 57070

           Summary: VMProcess needs to notifyAll() instead of notify()

    Classification: Unclassified

           Product: classpath

           Version: unspecified

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: classpath

        AssignedTo: address@hidden

        ReportedBy: address@hidden





Created attachment 29940

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29940

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().



reply via email to

[Prev in Thread] Current Thread [Next in Thread]