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

bruno bossola bbossola at gmail.com
Mon Sep 2 06:47:51 PDT 2013


> Is this really a JVM hang?
>
Well let's be precise then: all the threads parked will hang, with
unpredictable/corrupted/useless results to the end user. This is a big
issue for us and for any near time application (I am thinking about banking
and trading, I have an history there)

> It's hard to understand your comments about Java versions.  Is this
> specific to JDK 6?  I wouldn't have thought so.
>
Sorry if I was not clear. This is reproducible on JDK6, JDK7, JDK8 when
using a 64bit JVM on top of a 64bit Linux

Thanks for your answer.
Cheers,

    Bruno






On Mon, Sep 2, 2013 at 1:38 PM, Andrew Haley <aph at redhat.com> wrote:

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130902/5e458481/attachment.html 


More information about the hotspot-runtime-dev mailing list