4 tests from JDK-8203174 fail with com.sun.jdi.ObjectCollectedException thrown from nsk.share.jdi.EventTestTemplates.isEventFromNSK() method:
vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq002/TestDescription.java
vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest001/TestDescription.java
vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest002/TestDescription.java
vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassExclusionFilter/TestDescription.java
# ERROR: Exception occured in eventHandler thread: null
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Exception occured in eventHandler thread: null
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:428)
at nsk.share.Log.complain(Log.java:399)
at nsk.share.jdi.EventHandler.run(EventHandler.java:200)
at java.base/java.lang.Thread.run(Thread.java:832)
com.sun.jdi.ObjectCollectedException
at jdk.jdi/com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:55)
at jdk.jdi/com.sun.tools.jdi.ObjectReferenceImpl.referenceType(ObjectReferenceImpl.java:174)
at jdk.jdi/com.sun.tools.jdi.ObjectReferenceImpl.type(ObjectReferenceImpl.java:163)
at nsk.share.jdi.EventTestTemplates.isEventFromNSK(EventTestTemplates.java:455)
at nsk.share.jdi.EventTestTemplates$EventFilterTest.shouldSaveEvent(EventTestTemplates.java:142)
at nsk.share.jdi.JDIEventsDebugger$EventListener.eventReceived(JDIEventsDebugger.java:194)
at nsk.share.jdi.EventHandler.run(EventHandler.java:172)
at java.base/java.lang.Thread.run(Thread.java:832)
# ERROR: binder> Debugee VM has not exited correctly: trying to kill it
The following stacktrace is for failure analysis.
nsk.share.TestFailure: binder> Debugee VM has not exited correctly: trying to kill it
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:428)
at nsk.share.Log.complain(Log.java:399)
at nsk.share.jpda.DebugeeProcess.complain(DebugeeProcess.java:415)
at nsk.share.jpda.DebugeeProcess.close(DebugeeProcess.java:395)
at nsk.share.jpda.DebugeeProcess.finalize(DebugeeProcess.java:424)
at nsk.share.FinalizableObject.finalizeAtExit(FinalizableObject.java:48)
at nsk.share.Finalizer$FinalizerThread.run(Finalizer.java:122)
The problem here is that in some cases by the time the test decides whether the JDI event should be saved for further analysis the object this event refers to might be already collected in the debuggee VM.
vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq002/TestDescription.java
vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest001/TestDescription.java
vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest002/TestDescription.java
vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassExclusionFilter/TestDescription.java
# ERROR: Exception occured in eventHandler thread: null
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Exception occured in eventHandler thread: null
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:428)
at nsk.share.Log.complain(Log.java:399)
at nsk.share.jdi.EventHandler.run(EventHandler.java:200)
at java.base/java.lang.Thread.run(Thread.java:832)
com.sun.jdi.ObjectCollectedException
at jdk.jdi/com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:55)
at jdk.jdi/com.sun.tools.jdi.ObjectReferenceImpl.referenceType(ObjectReferenceImpl.java:174)
at jdk.jdi/com.sun.tools.jdi.ObjectReferenceImpl.type(ObjectReferenceImpl.java:163)
at nsk.share.jdi.EventTestTemplates.isEventFromNSK(EventTestTemplates.java:455)
at nsk.share.jdi.EventTestTemplates$EventFilterTest.shouldSaveEvent(EventTestTemplates.java:142)
at nsk.share.jdi.JDIEventsDebugger$EventListener.eventReceived(JDIEventsDebugger.java:194)
at nsk.share.jdi.EventHandler.run(EventHandler.java:172)
at java.base/java.lang.Thread.run(Thread.java:832)
# ERROR: binder> Debugee VM has not exited correctly: trying to kill it
The following stacktrace is for failure analysis.
nsk.share.TestFailure: binder> Debugee VM has not exited correctly: trying to kill it
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:428)
at nsk.share.Log.complain(Log.java:399)
at nsk.share.jpda.DebugeeProcess.complain(DebugeeProcess.java:415)
at nsk.share.jpda.DebugeeProcess.close(DebugeeProcess.java:395)
at nsk.share.jpda.DebugeeProcess.finalize(DebugeeProcess.java:424)
at nsk.share.FinalizableObject.finalizeAtExit(FinalizableObject.java:48)
at nsk.share.Finalizer$FinalizerThread.run(Finalizer.java:122)
The problem here is that in some cases by the time the test decides whether the JDI event should be saved for further analysis the object this event refers to might be already collected in the debuggee VM.
- relates to
-
JDK-8203174 [Graal] JDI tests fail with Unexpected exception: com.sun.jdi.ObjectCollectedException
-
- Resolved
-