Re: [rvm-research] Bug in Classpath's VMProcess w.r.t. use of notify() instead of notifyAll()

Andïï <[email protected]>
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <CAFXTvn5VTmv=JfN=+jyVXhZLXqy+ZH5O_qxa=br63aiRTuk_Qw@mail.gmail.com>
On 25 April 2013 17:50, Carl Ritson <[email protected]> wrote:
> Hi,
>
> I've been chasing a bug which causes benchmarks from Dacapo 2006 to
> hang with the concurrent collector we are implementing.  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.
>
> The attached program can reproduce the bug in miniature with any
> version of Jikes compiled against Classpath.  This can be fixed by
> applying the attached patch to classpath any version.
>
> Cheers,
>
> Carl
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>

Sorry, I remember reading about this issue before and thought we'd
fixed it.  There
are very few situations where notify() is appropriate.  I know I've
never used it in my
own code.

I'll get this fix into Classpath git as soon as I can.

Thanks,
--
Andii :-)

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.