Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8206086

[Graal] JDI tests fail with com.sun.jdi.ObjectCollectedException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 12
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b01

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dtitov Daniil Titov (Inactive)
              Reporter:
              dtitov Daniil Titov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: