Oracle JDK 8u91; OpenJDK 1.8.0_91 and OpenJfx 8
ADDITIONAL OS VERSION INFORMATION :
Debian 8.5 (64 bit); Ubuntu 15.10 (64 bit and 32 bit); Ubuntu 16.04 (64 bit); Manjaro (64 bit)
EXTRA RELEVANT SYSTEM CONFIGURATION :
Tested Hardware: Intel CPU with Intel CPU graphics; Intel CPU and AMD graphic card
A DESCRIPTION OF THE PROBLEM :
Symptom: Running a JavaFx application under Linux causes Xorg Resource Leaks and as a consequence increasing CPU load by the java process and by the process Xorg.
The resource leak can be observed using the Linux tool xrestop
When stopping the application the resources are freed and the CPU load of the Xorg process is normal.
On Windows machines On Windows machines the JavaFx application run without problems. Even on a Linux guest running in VmWare under a windows host, the JavaFx application run without a resource leak.
The resource leak appears on every change on the GUI, even if you use constants objects and change the visibility of these objects.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start a JavaFx application, that changes some GUI items frequently (see example application) and monitor Xorg resources with tool "xrestop" and monitor CPU load with tool "top".
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected result would be a constant resource usage and a constant cpu load of the JavaFx application and of the process Xorg.
ACTUAL -
The resource usage increases constantly and the cpu load too. This leads at the end to a system with 100% cpu load.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
There are no error messages.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class HelloWorld extends Application {
public static void main(String[] args) {
Application.launch(args);
}
@Override
public void start(Stage stage) {
Label lblTick = new Label("Tick");
GridPane pane = new GridPane();
pane.add(lblTick, 0, 0);
KeyFrame kf = new KeyFrame(Duration.millis(100), e -> lblTick.setVisible(!lblTick.isVisible()));
Timeline tl = new Timeline(kf);
tl.setCycleCount(Animation.INDEFINITE);
tl.play();
Scene scene = new Scene(pane, 30, 30);
stage.setScene(scene);
stage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Until now, I don't know any workaround.
- duplicates
-
JDK-8177310 JavaFX metaspace leak quickly consumes all resident mem
- Closed
- relates to
-
JDK-8156051 Memory leak when running javafx on Linux
- Open
-
JDK-8161911 [Linux] Memory leak when using indefinite transitions on Label
- Closed
-
JDK-8188094 Memory leak running JavaFX on Linux observed using jmalloc
- Open
-
JDK-8214212 When repeating PopupControl.show and hide, XID collision messages appears
- Open
-
JDK-8168832 javafx consumes all system memory - memory leak
- Closed
-
JDK-8177310 JavaFX metaspace leak quickly consumes all resident mem
- Closed