JDK-8342638 : [Windows] java/awt/Robot/InfiniteLoopException.java fails with OOME after JEP486
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows
  • CPU: generic
  • Submitted: 2024-10-18
  • Updated: 2024-11-17
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 24
24Unresolved
Related Reports
Relates :  
Description
This test was seen to fail initially on jep486 branch, Now fails in mainline too.

There seems to be some kind of side effect of SM removal on this test although the test wasn't modified as part of SM removal.

It happens on windows platform only. Locally the issue is reproducible when heap space is reduced to 128m and seems to pass when heap space is increased. But fixing the test by just increasing heap size will mask the real issue which may be a regression caused by SM changes.

To replicate it locally on windows run with the following jtreg tag:
 @run main/othervm -Xmx128m InfiniteLoopException
Comments
If the test is running in AgentVM mode it may be changes to other tests (affected by the SM removal) that now cause this test to fail. It could even be reduced interference causing the infinite loop threads to run much more frequently and so outpace the GC.
17-11-2024

Now failing in mainline too.
17-11-2024

It throws OOME exception for two different cases. 1) robot.waitForIdle() is slow: Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-2" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-1" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-3" java.lang.RuntimeException: Too slow:47 at InfiniteLoopException.test(InfiniteLoopException.java:65) at InfiniteLoopException.main(InfiniteLoopException.java:42) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:572) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:1491) JavaTest Message: Test threw exception: java.lang.RuntimeException: Too slow:47 -------------------- 2) OOME: Java heap space error Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-2" java.lang.OutOfMemoryError: Java heap space at java.desktop/java.awt.Component.repaint(Component.java:3493) at java.desktop/java.awt.Component.repaint(Component.java:3395) at InfiniteLoopException.lambda$test$0(InfiniteLoopException.java:52) at InfiniteLoopException$$Lambda/0x0000013db9001208.run(Unknown Source) at java.base/java.lang.Thread.runWith(Thread.java:1504) at java.base/java.lang.Thread.run(Thread.java:1491) java.lang.OutOfMemoryError: Java heap space at java.desktop/java.awt.Component.repaint(Component.java:3493) at java.desktop/java.awt.Component.repaint(Component.java:3395) at InfiniteLoopException.lambda$test$0(InfiniteLoopException.java:52) at InfiniteLoopException$$Lambda/0x0000013db9001208.run(Unknown Source) at java.base/java.lang.Thread.runWith(Thread.java:1504) at java.base/java.lang.Thread.run(Thread.java:1491) STATUS:Failed.STATUS:Failed.`main' threw exception: java.lang.OutOfMemoryError: Java heap space `main' threw exception: java.lang.OutOfMemoryError: Java heap space
12-11-2024