Uploaded image for project: 'JikesRVM'
  1. JikesRVM
  2. RVM-1028

VMProcess should use notfiyAll() instead of notify()

    Details

      Description

      Bug reported by Carl Ritson on the researchers mailing list [1]:

      I've been chasing a bug which causes benchmarks from Dacapo 2006 to
      hang [...]. I've tracked the source of the bug to VMProcess in Classpath. VMProcess performs a notify() on state changes rather than notifyAll(), this means that if one thread calls waitFor() on a Process object waiting for its 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 which calls 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.

      Carl Ritson has also provided patches to fix this issue. I'm not attaching them because they apply directly to the Classpath classes.

      [1] http://sourceforge.net/mailarchive/message.php?msg_id=30769403

        Attachments

          Activity

            People

            • Assignee:
              ebrangs Erik Brangs
              Reporter:
              ebrangs Erik Brangs
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: