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

TestJcmdWithSideCar.java fails with 'sun.tools.jcmd.JCmd' missing from stdout/stderr

XMLWordPrintable

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

      The test containers/docker/TestJcmdWithSideCar.java is failing (sometimes!) in the TMP_MOUNTED_INTO_SIDECAR mode.

      It fails where the command:

      docker run --tty=true --rm --cap-add=SYS_PTRACE --sig-proxy=true --pid=container:test-container-main --cap-add=NET_BIND_SERVICE --user=10668:10668 --volumes-from test-container-main jdk-internal:test-containers-docker-TestJcmdWithSideCar-jfr-jcmd /jdk/bin/jcmd -l

      ...gets no output, where a good run would show:

      [STDOUT]
      1 EventGeneratorLoop 120
      24 jdk.jcmd/sun.tools.jcmd.JCmd -l

      e.g.

      [main-container-process] MAIN_METHOD_STARTED, argument is 120
      Attach strategy TMP_MOUNTED_INTO_SIDECAR
      [COMMAND]
      docker run --tty=true --rm --cap-add=SYS_PTRACE --sig-proxy=true --pid=container:test-container-main --cap-add=NET_BIND_SERVICE --user=10668:10668 --volumes-from test-container-main jdk-internal:test-containers-docker-TestJcmdWithSideCar-jfr-jcmd /jdk/bin/jcmd -l
      [2024-10-03T04:30:35.273416534Z] Gathering output for process 12125
      [ELAPSED: 1068 ms]
      [STDERR]

      [STDOUT]

      Full child process STDOUT was saved to docker-stdout-12125.log
      [2024-10-03T04:30:36.341378706Z] Waiting for completion for process 12125
      [2024-10-03T04:30:36.341534140Z] Waiting for completion finished for process 12125
      [COMMAND]
      docker rmi --force jdk-internal:test-containers-docker-TestJcmdWithSideCar-jfr-jcmd
      [2024-10-03T04:30:36.349399928Z] Gathering output for process 12260
      [ELAPSED: 27 ms]
      [STDERR]

      [STDOUT]
      Untagged: jdk-internal:test-containers-docker-TestJcmdWithSideCar-jfr-jcmd

      Full child process STDOUT was saved to docker-stdout-12260.log
      ----------System.err:(16/748)----------
      stdout: [];
      stderr: []
      exitValue = 0

      java.lang.RuntimeException: 'sun.tools.jcmd.JCmd' missing from stdout/stderr
      at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:253)
      at TestJcmdWithSideCar.testCase01(TestJcmdWithSideCar.java:135)
      at TestJcmdWithSideCar.main(TestJcmdWithSideCar.java:111)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      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)

            kevinw Kevin Walls
            kevinw Kevin Walls
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: