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

JDI VirtualMachine/dispose/dispose001 failed with FATAL ERROR in native method: JDWP cannot set thread local storage, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-svc
    • aarch64
    • linux

      The following test failed in the JDK26 CI:

      vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose001/TestDescription.java

      Here's a snippet from the log file:

      #section:driver
      ----------messages:(8/1110)----------
      command: driver nsk.jdi.VirtualMachine.dispose.dispose001 -verbose -arch=linux-aarch64 -waittime=5 -debugee.vmkind=java -transport.address=dynamic -debugee.vmkeys="-XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/24/36/bundles/linux-aarch64/jdk-24_linux-aarch64_bin.tar.gz/jdk-24 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S676623/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/f0bfc538-e0da-4950-a8ee-fa118d5f2e8d/runs/762bb94a-d3ec-4c70-ab54-d361453f1951/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/tmp -Duse.JTREG_TEST_THREAD_FACTORY=Virtual -XX:+UseZGC -XX:-VerifyContinuations"
      reason: User specified action: run driver nsk.jdi.VirtualMachine.dispose.dispose001 -verbose -arch=${os.family}-${os.simpleArch} -waittime=5 -debugee.vmkind=java -transport.address=dynamic -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"
      started: Fri Jul 11 07:39:23 UTC 2025
      Mode: agentvm
      Agent id: 11
      Process id: 860707
      finished: Fri Jul 11 07:39:33 UTC 2025
      elapsed time (seconds): 10.009
      ----------configuration:(15/2040)----------

      <snip>

      ----------System.out:(74/8168)*----------
      [7:39:24.85] binder> VirtualMachineManager: version 26.0
      [7:39:24.87] binder> Finding connector: default
      [7:39:24.87] binder> LaunchingConnector:
      [7:39:24.87] binder> name: com.sun.jdi.CommandLineLaunch
      [7:39:24.87] binder> description: Launches target using Sun Java VM command line and attaches to it
      [7:39:24.88] binder> transport: com.sun.tools.jdi.SunCommandLineLauncher$2@28437ff4
      [7:39:24.110] binder> Connector arguments:
      [7:39:24.110] binder> main=nsk.share.MainWrapper Virtual nsk.jdi.VirtualMachine.dispose.dispose001a -vbs \u0000-verbose\u0000 \u0000-arch=linux-aarch64\u0000 \u0000-waittime=5\u0000 \u0000-debugee.vmkind=java\u0000 \u0000-transport.address=dynamic\u0000 \u0000-debugee.vmkeys="-XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/24/36/bundles/linux-aarch64/jdk-24_linux-aarch64_bin.tar.gz/jdk-24 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S676623/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/f0bfc538-e0da-4950-a8ee-fa118d5f2e8d/runs/762bb94a-d3ec-4c70-ab54-d361453f1951/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/tmp -Duse.JTREG_TEST_THREAD_FACTORY=Virtual -XX:+UseZGC -XX:-VerifyContinuations"\u0000 \u0000-pipe.port=45685\u0000
      [7:39:24.110] binder> includevirtualthreads=n
      [7:39:24.110] binder> quote=\u0000
      [7:39:24.110] binder> home=/opt/mach5/mesos/work_dir/jib-master/install/jdk-26+7-597/linux-aarch64-debug.jdk/jdk-26/fastdebug
      [7:39:24.110] binder> vmexec=java
      [7:39:24.110] binder> suspend=true
      [7:39:24.110] binder> options=-XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/24/36/bundles/linux-aarch64/jdk-24_linux-aarch64_bin.tar.gz/jdk-24 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S676623/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/f0bfc538-e0da-4950-a8ee-fa118d5f2e8d/runs/762bb94a-d3ec-4c70-ab54-d361453f1951/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/tmp -Duse.JTREG_TEST_THREAD_FACTORY=Virtual -XX:+UseZGC -XX:-VerifyContinuations -Djdk.virtualThreadScheduler.parallelism=15 -classpath \u0000/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S676623/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/f0bfc538-e0da-4950-a8ee-fa118d5f2e8d/runs/762bb94a-d3ec-4c70-ab54-d361453f1951/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/classes/2/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose001/TestDescription.d:/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S676623/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/f0bfc538-e0da-4950-a8ee-fa118d5f2e8d/runs/762bb94a-d3ec-4c70-ab54-d361453f1951/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/classes/2/vmTestbase:/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S676623/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/f0bfc538-e0da-4950-a8ee-fa118d5f2e8d/runs/762bb94a-d3ec-4c70-ab54-d361453f1951/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/classes/2/test/lib\u0000
      [7:39:24.110] binder> Launching debugee
      [7:39:24.398] binder> Waiting for VM initialized
      [7:39:24.399] Initial VMStartEvent received: VMStartEvent in thread main
      [7:39:24.424] --> debugger: nsk.jdi.VirtualMachine.dispose.dispose001a debuggee launched
      [7:39:24.540] debugee.stderr> **> dispose001a: debuggee started!
      [7:39:24.717] --> debugger: 'ready' recieved
      [7:39:24.717] debugee.stderr> **> dispose001a: waiting for an instruction from the debugger ...
      [7:39:24.718]
      ==> nsk/jdi/VirtualMachine/dispose/dispose001 TESTING BEGINS
      [7:39:24.719] debugee.stderr> **> dispose001a: waiting for an instruction from the debugger ...
      [7:39:24.719] --> debugger: ......vm.dispose();
      [7:39:24.720] --> debugger: ...... try: vm.allClasses(); VMDisconnectedException is expected
      [7:39:24.720] --> debugger: : VMDisconnectedException
      [7:39:24.722] debugee.stderr> **> dispose001a: waiting for an instruction from the debugger ...
      [7:39:24.722] --> debugger: : returned string is 'checkend'
      [7:39:24.722]
      ==> nsk/jdi/VirtualMachine/dispose/dispose001 TESTING ENDS
      [7:39:24.722] --> debugger: waiting for the debuggee to finish ...
      [7:39:24.723] debugee.stderr> **> dispose001a: 'quit' recieved
      [7:39:24.729] debugee.stderr> JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): cannot set thread local storage [/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S671863/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/15ade722-bf3c-49cb-bcdc-49e10dd00945/runs/8ee33493-af57-4d38-abed-049b498e3dd1/workspace/open/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c:162]
      [7:39:24.730] debugee.stdout> FATAL ERROR in native method: JDWP cannot set thread local storage, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)
      [7:39:24.730] debugee.stdout> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      [7:39:26.455] debugee.stdout> V [libjvm.so+0xe7ea10] JavaThread::print_jni_stack()+0xcc (resourceArea.hpp:217)
      [7:39:26.458] debugee.stdout> V [libjvm.so+0xf7ffe0] jni_FatalError+0xa0 (jni.cpp:625)
      [7:39:26.464] debugee.stdout> C [libjdwp.so+0x11488] jniFatalError.constprop.0+0xdc (debugInit.c:616)
      [7:39:26.465] debugee.stdout> C [libjdwp.so+0x116b4] debugInit_exit+0x74 (debugInit.c:1340)
      [7:39:26.465] debugee.stdout> C [libjdwp.so+0x25ea8] clearThread+0x48 (threadControl.c:462)
      [7:39:26.466] debugee.stdout> C [libjdwp.so+0x2923c] threadControl_reset+0x1d8 (threadControl.c:499)
      [7:39:26.466] debugee.stdout> C [libjdwp.so+0x11554] debugInit_reset+0x68 (debugInit.c:755)
      [7:39:26.467] debugee.stdout> C [libjdwp.so+0x2a0d8] attachThread+0x4c (transport.c:387)
      [7:39:26.470] debugee.stdout> V [libjvm.so+0x119a7bc] JvmtiAgentThread::call_start_function()+0xb8 (jvmtiImpl.cpp:89)
      [7:39:26.474] debugee.stdout> V [libjvm.so+0xe791c8] JavaThread::thread_main_inner()+0x108 (javaThread.cpp:773)
      [7:39:26.478] debugee.stdout> V [libjvm.so+0x17eeb0c] Thread::call_run()+0xac (thread.cpp:243)
      [7:39:26.482] debugee.stdout> V [libjvm.so+0x14ccbbc] thread_native_entry(Thread*)+0x12c (os_linux.cpp:868)
      [7:39:26.483] debugee.stdout> C [libc.so.6+0x80b50] start_thread+0x300
      [7:39:33.789] # ERROR: ##> debugger: debuggee returned UNEXPECTED exit status: 134 != PASS_BASE
      The following stacktrace is for failure analysis.
      nsk.share.TestFailure: ##> debugger: debuggee returned UNEXPECTED exit status: 134 != PASS_BASE
      at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:309)
      at nsk.share.Log.complain(Log.java:280)
      at nsk.jdi.VirtualMachine.dispose.dispose001.log3(dispose001.java:90)
      at nsk.jdi.VirtualMachine.dispose.dispose001.runThis(dispose001.java:201)
      at nsk.jdi.VirtualMachine.dispose.dispose001.run(dispose001.java:76)
      at nsk.jdi.VirtualMachine.dispose.dispose001.main(dispose001.java:69)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:565)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)
      at java.base/java.lang.VirtualThread.run(VirtualThread.java:456)
      [7:39:33.847] # ERROR: TEST FAILED
      The following stacktrace is for failure analysis.
      nsk.share.TestFailure: TEST FAILED
      at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:309)
      at nsk.share.Log.complain(Log.java:280)
      at nsk.jdi.VirtualMachine.dispose.dispose001.runThis(dispose001.java:210)
      at nsk.jdi.VirtualMachine.dispose.dispose001.run(dispose001.java:76)
      at nsk.jdi.VirtualMachine.dispose.dispose001.main(dispose001.java:69)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:565)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)
      at java.base/java.lang.VirtualThread.run(VirtualThread.java:456)
      ----------System.err:(10/565)----------
      java.lang.RuntimeException: TEST FAILED with result 2
      at nsk.jdi.VirtualMachine.dispose.dispose001.main(dispose001.java:71)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:565)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)
      at java.base/java.lang.VirtualThread.run(VirtualThread.java:456)

      JavaTest Message: Test threw exception: java.lang.RuntimeException
      JavaTest Message: shutting down test

      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: TEST FAILED with result 2


      test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: TEST FAILED with result 2

            Unassigned Unassigned
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: