-
Bug
-
Resolution: Fixed
-
P4
-
None
-
None
-
b21
Whilst investigating another issue I noticed that on at least two Ubuntu 21.04 systems java/awt/Frame/InvisibleOwner/InvisibleOwner.java always failed.
It wasn't being noticed because we automatically re-run the test and then it always passed.
I re-wrote the test to be stable but it still failed.
Debugging I saw that "paint(Graphics g)" was called literally thousands of times for no apparent reason.
After a bit of work running smaller and smaller sub-sets I got to this much shorter list
java/awt/Frame/FrameSetSizeStressTest/FrameSetSizeStressTest.java java/awt/Frame/FramesGC/FramesGC.java
java/awt/Frame/FrameSize/TestFrameSize.java
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java
java/awt/Frame/HideMaximized/HideMaximized.java
java/awt/Frame/HugeFrame/HugeFrame.java
java/awt/Frame/InvisibleOwner/InvisibleOwner.java
I then watched these running and saw that InvisibleOwner.java wasn't even showing on the screen - not even a frame - despite receiving window showing events and repaint requests.
I then noticed that the windows from tests immediately before hadn't shown either but those tests didn't fail because of it.
So I looked at java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java
which as well as creating and disposing graphics instances, also calls
Frame.removeNotify()
Frame.addNotify();
in a tight loop in one thread - whilst doing the graphics stressing in other threads.
Near as I can tell this stresses out the Xserver to the text that for some amount of time afterwards it isn't actually able to display anything.
Adding a 5 or more second sleep to the end gives the Xserver time to catch up and subsequent tests behave much better and pass.
The stabilisation of InvisibleOwner is still worth doing but that sleep looks like the important one. It is possible other stress tests may cause similar problems so that is something to monitor
It wasn't being noticed because we automatically re-run the test and then it always passed.
I re-wrote the test to be stable but it still failed.
Debugging I saw that "paint(Graphics g)" was called literally thousands of times for no apparent reason.
After a bit of work running smaller and smaller sub-sets I got to this much shorter list
java/awt/Frame/FrameSetSizeStressTest/FrameSetSizeStressTest.java java/awt/Frame/FramesGC/FramesGC.java
java/awt/Frame/FrameSize/TestFrameSize.java
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java
java/awt/Frame/HideMaximized/HideMaximized.java
java/awt/Frame/HugeFrame/HugeFrame.java
java/awt/Frame/InvisibleOwner/InvisibleOwner.java
I then watched these running and saw that InvisibleOwner.java wasn't even showing on the screen - not even a frame - despite receiving window showing events and repaint requests.
I then noticed that the windows from tests immediately before hadn't shown either but those tests didn't fail because of it.
So I looked at java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java
which as well as creating and disposing graphics instances, also calls
Frame.removeNotify()
Frame.addNotify();
in a tight loop in one thread - whilst doing the graphics stressing in other threads.
Near as I can tell this stresses out the Xserver to the text that for some amount of time afterwards it isn't actually able to display anything.
Adding a 5 or more second sleep to the end gives the Xserver time to catch up and subsequent tests behave much better and pass.
The stabilisation of InvisibleOwner is still worth doing but that sleep looks like the important one. It is possible other stress tests may cause similar problems so that is something to monitor