Details
-
Bug
-
Resolution: Fixed
-
P4
-
14
-
b08
Description
There are various places that use os::javaTimeMillis() to calculate durations which are used for various purposes. It looks like a convenient way to get the current time in milliseconds. Unfortunately, it is (by definition) subject to external clock adjustment, making it unsuitable for most such duration calculations. (Indeed, there are several comments about it not being used because it doesn't guarantee monotonicity.) It should probably (almost) never be used for such interval calculations. Some of the current uses may be actual lurking bugs, where some timeout may either expire too early or possibly really, really late (for example, if an interval is negative because of clock adjustment).
Attachments
Issue Links
- duplicates
-
JDK-8235740 PrintVMQWaitTime broken on Windows
-
- Resolved
-
- relates to
-
JDK-8237857 LogDecorations::uptimenanos is implemented incorrectly
-
- Resolved
-
-
JDK-8237747 Build broken on macOS by JDK-8235741 - wrong format specifier
-
- Closed
-