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

Linked stack watermarks don't support nesting

XMLWordPrintable

    • b03
    • x86_64
    • generic

        The following tests fail in the JDK20 CI:

        vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter001/TestDescription.java
        vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter004/TestDescription.java

        Here's a snippet from the instancefilter001 log file:

        #section:main
        ----------messages:(6/1066)----------
        command: main nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001 -verbose -arch=linux-x64 -waittime=5 -debugee.vmkind=java -transport.address=dynamic -debugee.vmkeys="-XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/19/36/bundles/linux-x64/jdk-19_linux-x64_bin.tar.gz/jdk-19 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S17299/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5bdab714-fb1e-4abf-adee-73e6b99ed892/runs/54b049eb-ac3a-4a0d-b682-d731820ab9ca/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/tmp -XX:+UseZGC"
        reason: User specified action: run main/othervm nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001 -verbose -arch=${os.family}-${os.simpleArch} -waittime=5 -debugee.vmkind=java -transport.address=dynamic -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"
        started: Sat Dec 03 06:23:31 UTC 2022
        Mode: othervm [/othervm specified]
        finished: Sat Dec 03 06:23:48 UTC 2022
        elapsed time (seconds): 16.379
        ----------configuration:(0/0)----------
        ----------System.out:(161/12703)*----------
        binder> VirtualMachineManager: version 20.0
        binder> Finding connector: default
        binder> LaunchingConnector:
        binder> name: com.sun.jdi.CommandLineLaunch
        binder> description: Launches target using Sun Java VM command line and attaches to it
        binder> transport: com.sun.tools.jdi.SunCommandLineLauncher$2@11df7b34
        binder> Connector arguments:
        binder> main=nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001a \u0000-verbose\u0000 \u0000-arch=linux-x64\u0000 \u0000-waittime=5\u0000 \u0000-debugee.vmkind=java\u0000 \u0000-transport.address=dynamic\u0000 \u0000-debugee.vmkeys="-XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/19/36/bundles/linux-x64/jdk-19_linux-x64_bin.tar.gz/jdk-19 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S17299/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5bdab714-fb1e-4abf-adee-73e6b99ed892/runs/54b049eb-ac3a-4a0d-b682-d731820ab9ca/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/tmp -XX:+UseZGC"\u0000 \u0000-pipe.port=34371\u0000
        binder> includevirtualthreads=y
        binder> quote=\u0000
        binder> home=/opt/mach5/mesos/work_dir/jib-master/install/jdk-20+27-2055/linux-x64-debug.jdk/jdk-20/fastdebug
        binder> vmexec=java
        binder> suspend=true
        binder> options=-XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/19/36/bundles/linux-x64/jdk-19_linux-x64_bin.tar.gz/jdk-19 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S17299/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5bdab714-fb1e-4abf-adee-73e6b99ed892/runs/54b049eb-ac3a-4a0d-b682-d731820ab9ca/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/tmp -XX:+UseZGC
        binder> Launching debugee
        binder> Waiting for VM initialized
        Initial VMStartEvent received: VMStartEvent in thread main
        EventHandler> Adding listener nsk.share.jdi.EventHandler$1@620b4c99
        EventHandler> Adding listener nsk.share.jdi.EventHandler$2@3c30ea1d
        EventHandler> Adding listener nsk.share.jdi.EventHandler$3@625d200a
        EventHandler> Adding listener nsk.share.jdi.EventHandler$4@5d4cf655
        EventHandler> Adding listener nsk.share.jdi.EventHandler$5@5a9ea209
        EventHandler> waitForRequestedEvent: enabling remove of listener nsk.share.jdi.EventHandler$6@8543d1
        EventHandler> Adding listener nsk.share.jdi.EventHandler$6@8543d1
        EventHandler> waitForRequestedEvent: vm.resume called
        EventHandler> Received event set with policy = SUSPEND_EVENT_THREAD
        EventHandler> Event: ClassPrepareEventImpl req class prepare request (enabled)
        EventHandler> waitForRequestedEvent: Received event(ClassPrepareEvent in thread main) for request(class prepare request (enabled))
        EventHandler> Removing listener nsk.share.jdi.EventHandler$6@8543d1
        debugger> Received ClassPrepareEvent for debuggee class: nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001a
        binder> Breakpoint set:
        breakpoint request nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001a:75 (disabled)
        EventHandler> Adding listener nsk.share.jdi.TestDebuggerType1$1@6ba6795a
        debugger> TESTING BEGINS
        debugger> RESUME DEBUGGEE VM
        debugger> shouldRunAfterBreakpoint: entered
        debugger> shouldRunAfterBreakpoint: waiting for breakpoint event during 1 sec.
        debugee.stderr> **> debuggee: debuggee started!
        debugee.stderr> **> debuggee: methodForCommunication();
        EventHandler> Received event set with policy = SUSPEND_ALL
        EventHandler> Event: BreakpointEventImpl req breakpoint request nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001a:75 (enabled)
        debugger> Received communication breakpoint event.
        debugger> shouldRunAfterBreakpoint: received breakpoint event.
        debugger> shouldRunAfterBreakpoint: exited with true.
        debugger> :::::: case: # 0
        debugger> ......setting up ExceptionRequest:
        debugger> thread: instance of java.lang.Thread(name='thread1', id=291); class: class nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001aTestClass (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=293)); property: ExceptionRequest1
        debugger> ExceptionRequest has been set up
        debugger> ......setting up ExceptionRequest:
        debugger> thread: instance of java.lang.Thread(name='thread2', id=297); class: class nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001aTestClass (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=293)); property: ExceptionRequest2
        debugger> ExceptionRequest has been set up
        debugger> ......waiting for ExceptionEvent in expected thread
        EventHandler> waitForRequestedEvent: enabling remove of listener nsk.share.jdi.EventHandler$6@5884b135
        EventHandler> Adding listener nsk.share.jdi.EventHandler$6@5884b135
        EventHandler> waitForRequestedEvent: vm.resume called
        debugee.stderr> **> debuggee: 'run': enter :: threadName == thread1
        debugee.stderr> **> debuggee: 'run': enter :: threadName == thread2
        debugee.stderr> **> debuggee: objTC[tNumber].method(); :: threadName == thread1 tNumber == 0
        debugee.stderr> **> debuggee: objTC[tNumber].method(); :: threadName == thread2 tNumber == 1
        debugee.stderr> **> debuggee: instancefilter001aTestClass.method() : thread1
        debugee.stderr> **> debuggee: instancefilter001aTestClass.method() : thread2
        debugee.stdout> # To suppress the following error report, specify this argument
        debugee.stdout> # after -XX: or in .hotspotrc: SuppressErrorAt=/stackWatermark.cpp:254
        debugee.stdout> #
        debugee.stdout> # A fatal error has been detected by the Java Runtime Environment:
        debugee.stdout> #
        debugee.stdout> # Internal Error (/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S137526/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/41cd15c8-7bc9-4b55-84c5-41044574a751/runs/f2fad46b-6b5f-48a7-8b77-e63b6eb32fa8/workspace/open/src/hotspot/share/runtime/stackWatermark.cpp:254), pid=2186378, tid=2186633
        debugee.stdout> # assert(watermark == __null || _linked_watermark == __null) failed: nesting not supported
        debugee.stdout> #
        debugee.stdout> # JRE version: Java(TM) SE Runtime Environment (20.0+27) (fastdebug build 20-ea+27-2055)
        debugee.stdout> # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-ea+27-2055, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
        debugee.stdout> # Problematic frame:
        debugee.stdout> # V [libjvm.so+0x19155e0] StackWatermark::link_watermark(StackWatermark*)+0x40
        debugee.stdout> #
        debugee.stdout> # Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S17299/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5bdab714-fb1e-4abf-adee-73e6b99ed892/runs/54b049eb-ac3a-4a0d-b682-d731820ab9ca/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/scratch/5/core.2186378)
        debugee.stdout> #
        debugee.stdout> # An error report file with more information is saved as:
        debugee.stdout> # /opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S17299/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5bdab714-fb1e-4abf-adee-73e6b99ed892/runs/54b049eb-ac3a-4a0d-b682-d731820ab9ca/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/scratch/5/hs_err_pid2186378.log
        debugee.stdout> #
        debugee.stdout> # If you would like to submit a bug report, please visit:
        debugee.stdout> # https://bugreport.java.com/bugreport/crash.jsp
        debugee.stdout> #
        EventHandler> Received event set with policy = SUSPEND_NONE
        EventHandler> Event: VMDisconnectEventImpl req null
        EventHandler> receieved VMDisconnect
        EventHandler> Removing listener nsk.share.jdi.EventHandler$4@5d4cf655
        EventHandler> finished
        # ERROR: debugger> Unexpected exception : waitForRequestedEvent: no requested events have been received.
        The following stacktrace is for failure analysis.
        nsk.share.TestFailure: debugger> Unexpected exception : waitForRequestedEvent: no requested events have been received.
        at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:432)
        at nsk.share.Log.complain(Log.java:403)
        at nsk.share.jdi.TestDebuggerType1.complain(TestDebuggerType1.java:78)
        at nsk.share.jdi.TestDebuggerType1.setFailedStatus(TestDebuggerType1.java:85)
        at nsk.share.jdi.TestDebuggerType1.runThis(TestDebuggerType1.java:147)
        at nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001.run(instancefilter001.java:78)
        at nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001.main(instancefilter001.java:73)
        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:125)
        at java.base/java.lang.Thread.run(Thread.java:1599)
        nsk.share.Failure: waitForRequestedEvent: no requested events have been received.
        at nsk.share.jdi.EventHandler.waitForRequestedEvent(EventHandler.java:431)
        at nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001.testRun(instancefilter001.java:145)
        at nsk.share.jdi.TestDebuggerType1.runThis(TestDebuggerType1.java:119)
        at nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001.run(instancefilter001.java:78)
        at nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001.main(instancefilter001.java:73)
        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:125)
        at java.base/java.lang.Thread.run(Thread.java:1599)
        debugger> Forcing debuggee to exit...
        # 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:432)
        at nsk.share.Log.complain(Log.java:403)
        at nsk.share.jpda.DebugeeProcess.complain(DebugeeProcess.java:455)
        at nsk.share.jpda.DebugeeProcess.close(DebugeeProcess.java:435)
        at nsk.share.jpda.DebugeeProcess.finalize(DebugeeProcess.java:464)
        at nsk.share.FinalizableObject.finalizeAtExit(FinalizableObject.java:48)
        at nsk.share.Finalizer$FinalizerThread.run(Finalizer.java:122)
        ------------ Try to print debuggee threads before killing process ------------
        The following stacktrace is for failure analysis.
        nsk.share.TestFailure:
        at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:432)
        at nsk.share.Log.complain(Log.java:403)
        at nsk.share.jdi.Debugee.printThreadsInfo(Debugee.java:629)
        at nsk.share.jdi.Debugee.killDebugee(Debugee.java:640)
        at nsk.share.jdi.LocalLaunchedDebugee.killDebugee(Binder.java:1052)
        at nsk.share.jpda.DebugeeProcess.close(DebugeeProcess.java:436)
        at nsk.share.jpda.DebugeeProcess.finalize(DebugeeProcess.java:464)
        at nsk.share.FinalizableObject.finalizeAtExit(FinalizableObject.java:48)
        at nsk.share.Finalizer$FinalizerThread.run(Finalizer.java:122)
        com.sun.jdi.VMDisconnectedException: connection is closed
        at jdk.jdi/com.sun.tools.jdi.TargetVM.send(TargetVM.java:293)
        at jdk.jdi/com.sun.tools.jdi.VirtualMachineImpl.sendToTarget(VirtualMachineImpl.java:1172)
        at jdk.jdi/com.sun.tools.jdi.PacketStream.send(PacketStream.java:79)
        at jdk.jdi/com.sun.tools.jdi.JDWP$VirtualMachine$AllThreads.enqueueCommand(JDWP.java:319)
        at jdk.jdi/com.sun.tools.jdi.JDWP$VirtualMachine$AllThreads.process(JDWP.java:310)
        at jdk.jdi/com.sun.tools.jdi.VMState.allThreads(VMState.java:207)
        at jdk.jdi/com.sun.tools.jdi.VirtualMachineImpl.allThreads(VirtualMachineImpl.java:458)
        at nsk.share.jdi.Debugee.printThreadsInfo(Debugee.java:598)
        at nsk.share.jdi.Debugee.killDebugee(Debugee.java:640)
        at nsk.share.jdi.LocalLaunchedDebugee.killDebugee(Binder.java:1052)
        at nsk.share.jpda.DebugeeProcess.close(DebugeeProcess.java:436)
        at nsk.share.jpda.DebugeeProcess.finalize(DebugeeProcess.java:464)
        at nsk.share.FinalizableObject.finalizeAtExit(FinalizableObject.java:48)
        at nsk.share.Finalizer$FinalizerThread.run(Finalizer.java:122)
        binder> Killing debuggee by forcing target VM to exit
        binder> Ignore VMDisconnectedException while forcing debuggee VM to exit:
        com.sun.jdi.VMDisconnectedException: connection is closed
        Killing debugee VM process


        #>
        #> SUMMARY: Following errors occured
        #> during test execution:
        #>
        # ERROR: debugger> Unexpected exception : waitForRequestedEvent: no requested events have been received.
        # ERROR: binder> Debugee VM has not exited correctly: trying to kill it
        ----------System.err:(19/1333)----------
        com.sun.jdi.VMDisconnectedException: connection is closed
        at jdk.jdi/com.sun.tools.jdi.TargetVM.send(TargetVM.java:293)
        at jdk.jdi/com.sun.tools.jdi.VirtualMachineImpl.sendToTarget(VirtualMachineImpl.java:1172)
        at jdk.jdi/com.sun.tools.jdi.PacketStream.send(PacketStream.java:79)
        at jdk.jdi/com.sun.tools.jdi.JDWP$VirtualMachine$Exit.enqueueCommand(JDWP.java:655)
        at jdk.jdi/com.sun.tools.jdi.JDWP$VirtualMachine$Exit.process(JDWP.java:641)
        at jdk.jdi/com.sun.tools.jdi.VirtualMachineImpl.exit(VirtualMachineImpl.java:644)
        at nsk.share.jdi.TestDebuggerType1.runThis(TestDebuggerType1.java:150)
        at nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001.run(instancefilter001.java:78)
        at nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001.main(instancefilter001.java:73)
        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:125)
        at java.base/java.lang.Thread.run(Thread.java:1599)

        JavaTest Message: Test threw exception: com.sun.jdi.VMDisconnectedException: connection is closed
        JavaTest Message: shutting down test

        STATUS:Failed.`main' threw exception: com.sun.jdi.VMDisconnectedException: connection is closed
        ----------rerun:(35/8632)*----------


        The failure mode for instancefilter004 appears to be very similar.

              eosterlund Erik Österlund
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: