JDK-7117303 : VM uses non-monotonic time source and complains that it is non-monotonic
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs20,hs23
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-12-02
  • Updated: 2012-10-01
  • Resolved: 2012-01-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Duplicate :  
Relates :  
Description
VM uses gettimeofday for os::javaTimeMillis which is non-monotonic.

in void ReferenceProcessor::update_soft_ref_master_clock
VM complains if this time goes back.

It is needed to use source which is monotonic or not produce warning.

I've filed this CR against GC because in this particular case it is a GC part.
However it would be nice to check if there are any similar issues.
See e-mail thread in comments.

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/e7dead7e90af
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/e7dead7e90af
19-12-2011

EVALUATION os::javaTimeMillis() is not monotonic - use os::javaTimeNanos() (with a suitable conversion factor constant) instead. Leave the warnings.
07-12-2011