JDK-8176499 : Dependence on java.util.Timer freezes screen when OS time resets backwards
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: 8,9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: x86
  • Submitted: 2017-03-06
  • Updated: 2018-09-05
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
OpenJDK Zero VM (build 25.66-b00, interpreted mode)

ADDITIONAL OS VERSION INFORMATION :
Local Linux build (ARM core)

A DESCRIPTION OF THE PROBLEM :
MonocleTimer relies internally on java.util.TimerTask. A well-established bug with Timer and TimerTask (see e.g. https://bugs.openjdk.java.net/browse/JDK-4290274)  means that if the OS clock gets set back a few minutes, the Timer stops scheduling.

The effect of this on Monocle applications is that in the event that the OS clock goes back, the display freezes, because QuantumToolkit stops pulsing the UI. 

The simplest fix - I think - would be to modify the internals of MonocleTimer to replace the embedded Timer with a ScheduledThreadPoolExecutor. It would also be nice if there were some way to inject my own Toolkit or Timer.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create any application, run it on an embedded platform, then move the OS clock back ten minutes, then do something that's supposed to provoke a UI update.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
UI should update
ACTUAL -
UI doesn't update

REPRODUCIBILITY :
This bug can be reproduced always.


Comments
Adding to the backlog, but we have no immediate plan to fix this since it is specific to an unsupported platform (we do not deliver binaries for linux-arm).
04-04-2017

Transferring to javafx/other. I'm not sure if this is the right place. The request seems to be to change Monocle to replace its use of Timer with a ScheduledThreadPoolExecutor.
31-03-2017

From submitter: The output of "iava -version" is OpenJDK Runtime Environment (build 1.8.0-internal-bamboo_2016_05_05_15_49-b00) OpenJDK Zero VM (build 25.66-b00, interpreted mode) (this is our own (Yocto) build).
24-03-2017

To submitter: The bug report doesn���t specify clearly if you are facing the issue with Open JDK or Oracle JDK binaries. Can you please clarify this and also provide the JDK version number ?
10-03-2017