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

com/sun/jdi/JdwpAllowTest.java fails with JDWP Can't enable vthread start events, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 24
    • core-svc
    • x86_64
    • os_x

      The following test failed in the JDK24 CI:

      com/sun/jdi/JdwpAllowTest.java

      Here's a snippet from the log file:

      #section:driver
      ----------messages:(7/221)----------
      command: driver JdwpAllowTest
      reason: User specified action: run driver JdwpAllowTest
      started: Wed Sep 18 16:24:33 GMT 2024
      Mode: agentvm
      Agent id: 7
      finished: Wed Sep 18 16:25:49 GMT 2024
      elapsed time (seconds): 75.671
      ----------configuration:(14/1899)----------

      <snip>

      ----------System.out:(63/6961)----------
      localhost address: 127.0.0.1

      Starting DefaultTest
      Command line: ['/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-24+16-1777/macosx-x64.jdk/jdk-24.jdk/Contents/Home/bin/java' '-Xmx768m' '-XX:MaxRAMPercentage=4.16667' '-Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/22/36/bundles/macos-x64/jdk-22_macos-x64_bin.tar.gz/jdk-22.jdk/Contents/Home' '-Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/tmp' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0' '-cp' '/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/classes/4/com/sun/jdi/JdwpAllowTest.d:/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/classes/4/test/lib' 'jdk.test.lib.apps.LingeredApp' '4289605f-5ecf-44cb-92ac-998b23af380c.lck']
      LingeredApp startup took 1144ms
      Check for hs_err_pid/core/mdmp files:
      None.
       LingeredApp stdout: [Listening for transport dt_socket at address: 53226
      Listening for transport dt_socket at address: 53228
      ];
       LingeredApp stderr: []
       LingeredApp exitValue = 0
      DefaultTest PASSED

      Starting ExplicitDefaultTest
      Command line: ['/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-24+16-1777/macosx-x64.jdk/jdk-24.jdk/Contents/Home/bin/java' '-Xmx768m' '-XX:MaxRAMPercentage=4.16667' '-Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/22/36/bundles/macos-x64/jdk-22_macos-x64_bin.tar.gz/jdk-22.jdk/Contents/Home' '-Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/tmp' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=*' '-cp' '/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/classes/4/com/sun/jdi/JdwpAllowTest.d:/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/classes/4/test/lib' 'jdk.test.lib.apps.LingeredApp' 'af4bb247-382c-4a5d-b579-6160fdd313ea.lck']
      LingeredApp startup took 1152ms
      Check for hs_err_pid/core/mdmp files:
      None.
       LingeredApp stdout: [Listening for transport dt_socket at address: 53229
      Listening for transport dt_socket at address: 53233
      ];
       LingeredApp stderr: []
       LingeredApp exitValue = 0
      ExplicitDefaultTest PASSED

      Starting AllowTest
      Command line: ['/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-24+16-1777/macosx-x64.jdk/jdk-24.jdk/Contents/Home/bin/java' '-Xmx768m' '-XX:MaxRAMPercentage=4.16667' '-Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/22/36/bundles/macos-x64/jdk-22_macos-x64_bin.tar.gz/jdk-22.jdk/Contents/Home' '-Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/tmp' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.0.1' '-cp' '/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/classes/4/com/sun/jdi/JdwpAllowTest.d:/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/classes/4/test/lib' 'jdk.test.lib.apps.LingeredApp' '758407a0-3ac4-4403-ab4e-5e475d6cb892.lck']
      LingeredApp startup took 2319ms
      Check for hs_err_pid/core/mdmp files:
      None.
       LingeredApp stdout: [Listening for transport dt_socket at address: 53240
      FATAL ERROR in native method: JDWP Can't enable vthread start events, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00000001083ffd1b, pid=99203, tid=32771
      #
      # JRE version: Java(TM) SE Runtime Environment (24.0+16) (build 24-ea+16-1777)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (24-ea+16-1777, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
      # Problematic frame:
      # C [libjdwp.dylib+0x2bd1b]V [libjvm.dylib+0x5fd2b1] jvmtiAllocate+0x5b
      #
        jni_FatalError+0x51
      # Core dump will be written. Default location: core.99203
      #
      C [libjdwp.dylib+0x118d2] debugInit_exit+0x1b2
      C [libjdwp.dylib+0x19c7a]# An error report file with more information is saved as:
      # /System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S4655/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bea4ec5-115f-4e53-9102-164627d5bf5d/runs/1404f9f6-dcb7-4f1c-89bf-a5176e699d6c/testoutput/test-support/jtreg_open_test_jdk_tier3/scratch/3/hs_err_pid99203.log
        eventHandler_onConnect+0xaa
      C [libjdwp.dylib+0x122e7] debugLoop_run+0x77
      C [libjdwp.dylib+0x280f7] acceptThread+0x127
      V [libjvm.dylib+0x77435a] JvmtiAgentThread::start_function_wrapper(JavaThread*, JavaThread*)+0x3a
      V [libjvm.dylib+0x5a1ce4] JavaThread::thread_main_inner()+0x94
      V [libjvm.dylib+0xadc2f8] Thread::call_run()+0xa8
      V [libjvm.dylib+0x92833a] thread_native_entry(Thread*)+0x10a
      C [libsystem_pthread.dylib+0x61d3] _pthread_start+0x7d
      C [libsystem_pthread.dylib+0x1bd3] thread_start+0xf
      ];
       LingeredApp stderr: [JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): Can't enable vthread start events [open/src/jdk.jdwp.agent/share/native/libjdwp/eventHandler.c:1665]
      ]
       LingeredApp exitValue = 134
      ----------System.err:(12/658)----------
      java.io.IOException: LingeredApp terminated with non-zero exit code 134
      at jdk.test.lib.apps.LingeredApp.stopApp(LingeredApp.java:427)
      at JdwpAllowTest.positiveTest(JdwpAllowTest.java:109)
      at JdwpAllowTest.main(JdwpAllowTest.java:230)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:573)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1576)

      JavaTest Message: Test threw exception: java.io.IOException
      JavaTest Message: shutting down test

      result: Failed. Execution failed: `main' threw exception: java.io.IOException: LingeredApp terminated with non-zero exit code 134

      The first error mesg appears to be:

      FATAL ERROR in native method: JDWP Can't enable vthread start events, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)

      and then we get a SIGSEGV in jvmtiAllocate

      Since both the failure mesgs are related to JVM/TI, I'm starting
      this bug off in hotspot/jvmti for initial triage.

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

              Created:
              Updated: