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

com/sun/tools/attach/StartManagementAgent.java failed with "WaitForSingleObject failed"

XMLWordPrintable

    • x86_64
    • windows

      The following test failed in the JDK23 CI:

      com/sun/tools/attach/StartManagementAgent.java

      Here's a snippet from the log file:

      #section:main
      ----------messages:(8/329)----------
      command: main StartManagementAgent
      reason: User specified action: run main/timeout=300 StartManagementAgent
      started: Sat Jan 06 15:42:16 UTC 2024
      Mode: agentvm
      Agent id: 7
      Additional exports to unnamed modules from @modules: jdk.jartool/sun.tools.jar
      finished: Sat Jan 06 15:42:21 UTC 2024
      elapsed time (seconds): 5.187
      ----------configuration:(15/1431)*----------

      <snip>

      ----------System.out:(11/3831)*----------
      Starting test application
      Command line: [c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-23+5-219\\windows-x64-debug.jdk\\jdk-23\\fastdebug\\bin\\java.exe -cp C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\classes\\0\\com\\sun\\tools\\attach\\StartManagementAgent.d;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-23+5-219\\src.full\\open\\test\\jdk\\com\\sun\\tools\\attach;C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\classes\\0\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\jtreg.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\junit-platform-console-standalone-1.9.2.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\testng-7.3.0.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\jcommander-1.82.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\guice-5.1.0.jar -Xmx768m -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk\\21\\35\\bundles\\windows-x64\\jdk-21_windows-x64_bin.zip\\jdk-21 -Djava.io.tmpdir=c:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\tmp -XX:+CreateCoredumpOnCrash -ea -esa -XX:+UsePerfData -XX:+EnableDynamicAgentLoading -Dattach.test=true -classpath C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\classes\\0\\com\\sun\\tools\\attach\\StartManagementAgent.d;C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\classes\\0\\test\\lib Application ]
      Application started
      [runApplication]:c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-23+5-219\\windows-x64-debug.jdk\\jdk-23\\fastdebug\\bin\\java.exe -cp C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\classes\\0\\com\\sun\\tools\\attach\\StartManagementAgent.d;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-23+5-219\\src.full\\open\\test\\jdk\\com\\sun\\tools\\attach;C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\classes\\0\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\jtreg.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\junit-platform-console-standalone-1.9.2.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\testng-7.3.0.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\jcommander-1.82.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.3.1\\1\\bundles\\jtreg-7.3.1+1.zip\\jtreg\\lib\\guice-5.1.0.jar -Xmx768m -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk\\21\\35\\bundles\\windows-x64\\jdk-21_windows-x64_bin.zip\\jdk-21 -Djava.io.tmpdir=c:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\tmp -XX:+CreateCoredumpOnCrash -ea -esa -XX:+UsePerfData -XX:+EnableDynamicAgentLoading -Dattach.test=true -classpath C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\classes\\0\\com\\sun\\tools\\attach\\StartManagementAgent.d;C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\classes\\0\\test\\lib Application
      [runApplication] ready
      Starting management agent with null
      Starting management agent with bogus port
      [2024-01-06T15:42:17.850602800Z] Gathering output for process 14744
      Getting VM properties
      Starting local agent
      Agent started
      ----------System.err:(25/2290)----------
      [runApplication] Error: Invalid com.sun.management.jmxremote.port number: apa
      [runApplication] jdk.internal.agent.AgentConfigurationError: java.lang.NumberFormatException: For input string: "apa"
      [runApplication] at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:337)
      [runApplication] at jdk.management.agent/jdk.internal.agent.Agent.startRemoteManagementAgent(Agent.java:388)
      [runApplication] Caused by: java.lang.NumberFormatException: For input string: "apa"
      [runApplication] at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
      [runApplication] at java.base/java.lang.Integer.parseInt(Integer.java:588)
      [runApplication] at java.base/java.lang.Integer.parseInt(Integer.java:685)
      [runApplication] at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:335)
      [runApplication] ... 1 more
      com.sun.tools.attach.AttachOperationFailedException: java.lang.RuntimeException: jdk.internal.agent.AgentConfigurationError: java.lang.NumberFormatException: For input string: "apa"
      at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.processCompletionStatus(HotSpotVirtualMachine.java:414)
      at jdk.attach/sun.tools.attach.VirtualMachineImpl.execute(VirtualMachineImpl.java:112)
      at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:316)
      at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.executeJCmd(HotSpotVirtualMachine.java:298)
      at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.startManagementAgent(HotSpotVirtualMachine.java:244)
      at StartManagementAgent.basicTests(StartManagementAgent.java:98)
      at StartManagementAgent.runTests(StartManagementAgent.java:121)
      at StartManagementAgent.main(StartManagementAgent.java:64)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1570)
      Trying remote agent. Try #0
      Trying to connect to service:jmx:rmi:///jndi/rmi://localhost:62370/jmxrmi
      ----------stdout:(17/1062)*----------
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (c:\\sb\\prod\\1704531707\\workspace\\open\\src\\hotspot\\os\\windows\\os_windows.cpp:5357), pid=30284, tid=37508
      # assert(rv == ((((DWORD )0x00000000L) ) + 0 ) || rv == 258L) failed: WaitForSingleObject failed
      #
      # JRE version: Java(TM) SE Runtime Environment (23.0+5) (fastdebug build 23-ea+5-219)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-ea+5-219, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
      # Core dump will be written. Default location: C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\scratch\\1\\hs_err_pid30284.mdmp
      #
      # An error report file with more information is saved as:
      # C:\\sb\\prod\\1704555670\\testoutput\\test-support\\jtreg_open_test_jdk_svc_tools\\scratch\\1\\hs_err_pid30284.log
      [13.599s][warning][os] Loading hsdis library failed
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      result: Error. Agent communication error: java.net.SocketException: Connection reset; check console log for any additional details


      Here's the crashing thread's stack:

      --------------- T H R E A D ---------------

      Current thread (0x0000024279248190): JavaThread "Thread-4" daemon [_thread_blocked, id=37508, stack(0x0000008e59300000,0x0000008e59400000) (1024K)]

      Stack: [0x0000008e59300000,0x0000008e59400000]
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [jvm.dll+0xc95d51] os::win32::platform_print_native_stack+0x101 (os_windows_x86.cpp:236)
      V [jvm.dll+0xf38abb] VMError::report+0x149b (vmError.cpp:1005)
      V [jvm.dll+0xf3b10e] VMError::report_and_die+0x80e (vmError.cpp:1834)
      V [jvm.dll+0xf3b834] VMError::report_and_die+0x64 (vmError.cpp:1599)
      V [jvm.dll+0x554d0b] report_vm_error+0x5b (debug.cpp:191)
      V [jvm.dll+0xc90dc6] PlatformEvent::park+0x216 (os_windows.cpp:5357)
      V [jvm.dll+0xc67f99] ObjectMonitor::wait+0x469 (objectMonitor.cpp:1508)
      V [jvm.dll+0xe5aeb5] ObjectSynchronizer::wait+0x85 (synchronizer.cpp:732)
      V [jvm.dll+0x916ddd] JVM_MonitorWait+0x26d (jvm.cpp:643)
      C 0x0000024267b6ee70 (no source info available)

      The last pc belongs to native method entry point (kind = native) (printed below).
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j java.lang.Object.wait0(J)V+0 java.base@23-ea
      j java.lang.Object.wait(J)V+6 java.base@23-ea
      j jdk.test.lib.process.ProcessTools$BufferOutputStream.readNext()I+105
      j jdk.test.lib.process.ProcessTools$BufferInputStream.read()I+4
      j java.io.InputStream.read([BII)I+44 java.base@23-ea
      j java.io.BufferedInputStream.fill()V+185 java.base@23-ea
      J 281 c1 java.io.BufferedInputStream.read1([BII)I java.base@23-ea (121 bytes) @ 0x000002426069c114 [0x000002426069bf20+0x00000000000001f4]
      J 279 c1 java.io.BufferedInputStream.implRead([BII)I java.base@23-ea (112 bytes) @ 0x0000024260695a74 [0x00000242606958a0+0x00000000000001d4]
      J 278 c1 java.io.BufferedInputStream.read([BII)I java.base@23-ea (69 bytes) @ 0x00000242606a273c [0x00000242606a2380+0x00000000000003bc]
      j java.io.FilterInputStream.read([B)I+5 java.base@23-ea
      j jdk.test.lib.process.StreamPumper.run()V+34
      j java.util.concurrent.Executors$RunnableAdapter.call()Ljava/lang/Object;+4 java.base@23-ea
      j java.util.concurrent.FutureTask.run()V+39 java.base@23-ea
      j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@23-ea
      j java.lang.Thread.run()V+19 java.base@23-ea
      v ~StubRoutines::call_stub 0x0000024267b6107d

        1. hs_err_pid106276.log
          175 kB
        2. hs_err_pid133168.log
          117 kB
        3. hs_err_pid138124.log
          127 kB
        4. hs_err_pid39104.log
          170 kB

            dholmes David Holmes
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: