JVM64bit running on Linux 64bit: when system time changes the JVM may hang (bug_id=6900441)

Andrew Haley aph at redhat.com
Mon Sep 2 05:38:11 PDT 2013


On 09/02/2013 12:41 PM, bruno bossola wrote:
> I'd really like to get your view on the matter.

Is this really a JVM hang?

As far as I can see, all that is happening is that park() uses
pthread_cond_timedwait(), and

       The pthread_cond_timedwait() function shall be equivalent to
       pthread_cond_wait(), except that an error is returned if the
       absolute time specified by abstime passes (that is, system time
       equals or exceeds abstime) before the condition cond is
       signaled or broadcasted, or if the absolute time specified by
       abstime has already been passed at the time of the call.

It wouldn't be hugely difficult to fix: we'd need a thread that
detected system time going backwards and unpark()ed all waiting threads.
It's a lot of work and some additional overhead, though.

It's hard to understand your comments about Java versions.  Is this
specific to JDK 6?  I wouldn't have thought so.

Andrew.


More information about the hotspot-runtime-dev mailing list