JDK-8286420 : gc/gctests/PhantomReference/phantom001/phantom001.java failed with "Exception in thread "Reference Handler" java.lang.OutOfMemoryError: Java heap space"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 19
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: x86_64
  • Submitted: 2022-05-09
  • Updated: 2022-05-13
  • Resolved: 2022-05-13
Related Reports
Duplicate :  
Relates :  
Description
The following test failed in the JDK19 CI:

vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java

Here's a snippet from the log file:

#section:main
----------messages:(4/250)----------
command: main gc.gctests.PhantomReference.phantom001.phantom001 -ms low
reason: User specified action: run main/othervm gc.gctests.PhantomReference.phantom001.phantom001 -ms low 
Mode: othervm [/othervm specified]
elapsed time (seconds): 121.161
----------configuration:(0/0)----------
----------System.out:(1522/83374)----------
Stress time: 120 seconds
Stress iterations factor: 1
Stress threads factor: 1
Stress runs factor: 1
Max memory: 2147483648
Sleep time: 500
Iterations: 0
Number of threads: 24
Run GC thread: false
Run mem diag thread: false
Run forever: false
Starting Thread[#35,gc.gctests.PhantomReference.phantom001.phantom001$Test@3ef1613c,5,MainThreadGroup]
Starting Thread[#36,gc.gctests.PhantomReference.phantom001.phantom001$Test@2ca0c57a,5,MainThreadGroup]
Starting Thread[#37,gc.gctests.PhantomReference.phantom001.phantom001$Test@7b744e91,5,MainThreadGroup]

<snip>

T:58 I:1 13:34:13.495473600: start code 1
T:36 I:1 13:34:13.495473600: start code 1
T:51 I:1 13:34:13.495473600: start code 1
T:47 I:0 13:34:16.997044600: [FAILED] Waiting for enqueue: byte
T:47 I:1 13:34:17.012637800: start code 1
T:48 I:0 13:34:17.028419: [FAILED] Waiting for enqueue: byte
T:48 I:1 13:34:17.215671600: start code 1
T:57 I:0 13:34:17.309475500: [FAILED] Waiting for enqueue: byte
T:45 I:1 13:34:17.434394200: start code 1
T:56 I:1 13:34:17.434394200: start code 1
T:52 I:1 13:34:17.434394200: start code 1

<snip>

T:42 I:34 13:36:12.073940500: start code 10
T:36 I:35 13:36:12.105120100: [FAILED] Waiting for finalization: class
T:35 I:33 13:36:12.199040300: start code 9
T:36 I:36 13:36:12.214622600: start code 0
T:58 I:37 13:36:12.417575600: [FAILED] Waiting for enqueue: short
T:35 I:33 13:36:12.464467: Terminated: NonbranchyTree
T:37 I:36 13:36:12.464467: Terminated: byte
T:52 I:35 13:36:12.495698900: Terminated: class
T:56 I:35 13:36:12.495698900: Terminated: class
T:38 I:35 13:36:12.495698900: Terminated: class
T:46 I:35 13:36:12.495698900: Terminated: class
T:51 I:34 13:36:12.511344: Terminated: InternedString
T:49 I:34 13:36:12.511344: Terminated: InternedString
T:53 I:34 13:36:12.511344: Terminated: InternedString
T:48 I:35 13:36:12.527057: Terminated: class
T:36 I:36 13:36:12.527057: Terminated: byte
T:41 I:34 13:36:12.527057: Terminated: InternedString
T:40 I:36 13:36:12.527057: Terminated: byte
T:54 I:36 13:36:12.527057: Terminated: byte
T:44 I:38 13:36:12.527057: Terminated: int
T:39 I:33 13:36:12.527057: Terminated: NonbranchyTree
T:43 I:32 13:36:12.527057: Terminated: Object
T:55 I:34 13:36:12.527057: Terminated: InternedString
T:57 I:36 13:36:12.527057: Terminated: byte
T:42 I:34 13:36:12.527057: Terminated: InternedString
T:50 I:34 13:36:12.527057: Terminated: InternedString
T:45 I:37 13:36:12.527057: Terminated: short
T:47 I:34 13:36:12.527057: Terminated: InternedString
No unexpected exceptions/errors are thrown
----------System.err:(15/882)----------
Exception in thread "Reference Handler" java.lang.OutOfMemoryError: Java heap space
nsk.share.TestFailure: Test exit code: 97
	at nsk.share.test.Tests$TestRunner.execute(Tests.java:90)
	at nsk.share.test.Tests$TestRunner.run(Tests.java:96)
	at nsk.share.gc.GC.runTest(GC.java:114)
	at gc.gctests.PhantomReference.phantom001.phantom001.main(phantom001.java:93)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:1585)

JavaTest Message: Test threw exception: nsk.share.TestFailure: Test exit code: 97
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: nsk.share.TestFailure: Test exit code: 97
----------rerun:(39/6436)*----------
Comments
Looks like a duplicate of JDK-8284234.
13-05-2022

The test task's JVM args for the jdk-19+22-1526-tier5 sighting are: -XX:+CreateCoredumpOnCrash -XX:+UseZGC
09-05-2022

Different failure mode for the same test: JDK-8258947 vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java timed out
09-05-2022