Date: Sat, 8 Apr 2017 10:03:40 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: ????????? <redraiment@gmail.com> Cc: freebsd-java@freebsd.org, vangyzen@freebsd.org Subject: Re: OpenJDK8 Thread.sleep will deadlock while turn down system date time. Message-ID: <20170408070340.GD1788@kib.kiev.ua> In-Reply-To: <CAPRzLQSOfySJWqN8CoLNchRs_JgHkeQz57ZNB9E__Meip3zmOQ@mail.gmail.com> References: <CAPRzLQSOfySJWqN8CoLNchRs_JgHkeQz57ZNB9E__Meip3zmOQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 07, 2017 at 08:12:42PM -0700, ????????? wrote: > Hi all, > > I found a Java process deadlock issue, and can be reproduced in FreeBSD > 10.3 and 11.0 . > > My environment: > > * VirutalBox 5.1.16 r113841 on Mac OS X 10.12.4 > * FreeBSD-11.0-RELEASE-amd64.vhd.xz > > Reproduction steps: > > 1. install openjdk8 > > ```sh > pkg install openjdk8 > ``` > > 2. Java source code > > ```java > public class Main { > public static void main(String[] args) { > while (true) { > System.out.println("tick"); > Thread.sleep(3000); > } > } > } > ``` > > 3. Run java > > ```sh > $ javac Main.java > $ java Main > tick > tick > ... > ``` > > 4. Turn down system date time. > > ```sh > $ date '+%Y-%m-%d %H:%M:%S' > 20170408 11:09:11 > $ date 201001010000 > Fri Jan 1 00:00:00 CST 2010 > ``` > > Then, the java process will hung. Hang != deadlock, why do you claim that the process deadlocked. > > The issue will reproduce while turn "DOWN" the date time. It's OK while > turn up the date time. If JVM sets timeouts using absolute times than it might be fixed in latest HEAD and stable/11.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170408070340.GD1788>