com/sun/jdi/MethodInvokeWithTraceOnTest.java can fail with ObjectCollectedException when run with a small heap

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • 27
    • Affects Version/s: 26
    • Component/s: core-svc
    • None
    • Fix Understood

      This test was problemlisted as part of JDK-8373023, which lowered the default size of the java heap, resulting in earlier GC's that can affect some tests. In this case a debuggee object was unexpectedly collect resulting in an ObjectCollectedException:

      [JDI: EventSet: SUSPEND_NONE]
      [JDI: Looking up Class, signature='Ljdk/internal/event/VirtualThreadEndEvent;', id=231]
      [JDI: Sending Command(id=443) JDWP.ThreadReference.Name]
      [JDI: Sending: thread(ThreadReferenceImpl): ref=151]
      [1080ms] FAILED: Exception occured in eventHandler: com.sun.jdi.ObjectCollectedException
      at java.base/java.lang.Thread.getStackTrace(Thread.java:2220)
      at TestScaffold.failure(TestScaffold.java:498)
      at TestScaffold$EventHandler.run(TestScaffold.java:305)
      at java.base/java.lang.Thread.run(Thread.java:1516)
      com.sun.jdi.ObjectCollectedException
      at jdk.jdi/com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:56)
      at jdk.jdi/com.sun.tools.jdi.ThreadReferenceImpl.name(ThreadReferenceImpl.java:197)
      at jdk.jdi/com.sun.tools.jdi.EventSetImpl$ThreadedEventImpl.toString(EventSetImpl.java:223)
      at java.base/java.lang.String.valueOf(String.java:4817)
      at jdk.jdi/com.sun.tools.jdi.EventSetImpl.build(EventSetImpl.java:669)
      at jdk.jdi/com.sun.tools.jdi.EventQueueImpl.removeUnfiltered(EventQueueImpl.java:212)
      at jdk.jdi/com.sun.tools.jdi.EventQueueImpl.removeInternal(EventQueueImpl.java:125)
      at jdk.jdi/com.sun.tools.jdi.InternalEventHandler.run(InternalEventHandler.java:61)
      at java.base/java.lang.Thread.run(Thread.java:1516)
      com.sun.jdi.ObjectCollectedException
      at jdk.jdi/com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:56)
      at jdk.jdi/com.sun.tools.jdi.ThreadReferenceImpl.name(ThreadReferenceImpl.java:197)
      at jdk.jdi/com.sun.tools.jdi.EventSetImpl$ThreadedEventImpl.toString(EventSetImpl.java:223)
      at java.base/java.lang.String.valueOf(String.java:4817)
      at jdk.jdi/com.sun.tools.jdi.EventSetImpl.build(EventSetImpl.java:669)
      at jdk.jdi/com.sun.tools.jdi.EventQueueImpl.removeUnfiltered(EventQueueImpl.java:212)
      at jdk.jdi/com.sun.tools.jdi.EventQueueImpl.remove(EventQueueImpl.java:97)
      at jdk.jdi/com.sun.tools.jdi.EventQueueImpl.remove(EventQueueImpl.java:83)
      at TestScaffold$EventHandler.run(TestScaffold.java:260)
      at java.base/java.lang.Thread.run(Thread.java:1516)

            Assignee:
            Chris Plummer
            Reporter:
            Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: