If I run these tests in a loop with these options:
-XX:+UseZGC -Xmx2g -XX:ZCollectionInterval=0.01
They get com.sun.jdi.ObjectCollectedException intermittently here:
com.sun.jdi.ObjectCollectedException
at jdk.jdi/com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:55)
at jdk.jdi/com.sun.tools.jdi.ArrayReferenceImpl.length(ArrayReferenceImpl.java:70)
at nsk.jdi.ArrayType.newInstance.newinstance002.runThis(newinstance002.java:226)
at nsk.jdi.ArrayType.newInstance.newinstance002.run(newinstance002.java:81)
at nsk.jdi.ArrayType.newInstance.newinstance002.main(newinstance002.java:76)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:832)
I don't know if this is a ZGC problem or a test problem. In the source code, it doesn't look like the array should be collected, so I'm starting it with ZGC.
I'm linking to an old issue that might not be relevant but did get an OOM once, so might be helpful.
-XX:+UseZGC -Xmx2g -XX:ZCollectionInterval=0.01
They get com.sun.jdi.ObjectCollectedException intermittently here:
com.sun.jdi.ObjectCollectedException
at jdk.jdi/com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:55)
at jdk.jdi/com.sun.tools.jdi.ArrayReferenceImpl.length(ArrayReferenceImpl.java:70)
at nsk.jdi.ArrayType.newInstance.newinstance002.runThis(newinstance002.java:226)
at nsk.jdi.ArrayType.newInstance.newinstance002.run(newinstance002.java:81)
at nsk.jdi.ArrayType.newInstance.newinstance002.main(newinstance002.java:76)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:832)
I don't know if this is a ZGC problem or a test problem. In the source code, it doesn't look like the array should be collected, so I'm starting it with ZGC.
I'm linking to an old issue that might not be relevant but did get an OOM once, so might be helpful.
- relates to
-
JDK-8269542 JDWP: EnableCollection support is no longer spec compliant after JDK-8255987
- Resolved
-
JDK-8203174 [Graal] JDI tests fail with Unexpected exception: com.sun.jdi.ObjectCollectedException
- Resolved
-
JDK-8258071 Fix for JDK-8255987 can be subverted with ObjectReference.EnableCollection
- Resolved
-
JDK-8269232 assert(!is_jweak(handle)) failed: wrong method for detroying jweak
- Resolved
-
JDK-4419450 JDWP: two ArrayType.newInstance() tests crash JVM
- Closed
(3 links to)