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

tools/attach/BasicTests.java fails intermittently

XMLWordPrintable

    • x86_64
    • linux, solaris_11

      The following test failure was spotted in the JDK13 CI:

      com/sun/tools/attach/BasicTests.java

      Here's a snippet of the log file:

      ----------System.err:(88/5398)----------
      [runApplication] Error opening zip file or JAR manifest missing: SilverBullet.jar
      [runApplication] Exception in thread "Attach Listener" java.lang.reflect.InvocationTargetException
      [runApplication] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [runApplication] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [runApplication] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [runApplication] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
      [runApplication] at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:515)
      [runApplication] at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:535)
      [runApplication] Caused by: java.lang.RuntimeException: Something bad happened - Bye!
      [runApplication] at BadAgent.agentmain(BadAgent.java:33)
      [runApplication] ... 6 more
      [runApplication] Agent failed to start!
       stdout: [ - Attaching to application ...
       - Test: system properties in target VM
       - attach.test property set as expected
       - Test: agent properties in target VM
       - agent properties non-empty as expected
       - Test: Load an agent that does not exist
       - AgentLoadException thrown as expected!
       - Test: Load a bad agent
      INFO: This test will cause error messages to appear in the application log about SilverBullet.jar not being found and an agent failing to start.
       - AgentInitializationException thrown as expected!
       - Test: Detach from VM
      INFO: This test will cause error messages to appear in the application log about a BadAgent including a RuntimeException and an InvocationTargetException.
       - IOException as expected
       - Re-attaching to application ...
       - Test: End-to-end connection with agent
       - Loading Agent.jar into target VM ...
       - Waiting for agent to connect back to tool ...
       - Connected to agent.
       - Re-attaching to application ...
       - Test: End-to-end connection with RedefineAgent
       - Loading RedefineAgent.jar into target VM ...
       - Waiting for RedefineAgent to connect back to tool ...
       - Connected to RedefineAgent.
       - Test: VirtualMachine.list
      ];
       stderr: []
       exitValue = 134

      java.lang.RuntimeException: Expected to get exit value of [0]

      at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:419)
      at BasicTests.runTests(BasicTests.java:105)
      at BasicTests.main(BasicTests.java:71)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:567)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
      at java.base/java.lang.Thread.run(Thread.java:835)
      java.io.IOException: Stream closed
      at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
      at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:342)
      at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
      at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
      at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
      at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
      at jdk.test.lib.process.StreamPumper.run(StreamPumper.java:109)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.lang.Thread.run(Thread.java:835)
      java.io.IOException: Stream closed
      at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
      at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:342)
      at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
      at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
      at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
      at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
      at jdk.test.lib.process.StreamPumper.run(StreamPumper.java:109)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.lang.Thread.run(Thread.java:835)
      java.lang.RuntimeException: Expected to get exit value of [0]

      at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:419)
      at BasicTests.runTests(BasicTests.java:105)
      at BasicTests.main(BasicTests.java:71)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:567)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
      at java.base/java.lang.Thread.run(Thread.java:835)

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

      result: Error. Agent error: java.lang.Exception: Agent 6 timed out with a timeout of 1200 seconds; check console log for any additional details


      test result: Error. Agent error: java.lang.Exception: Agent 6 timed out with a timeout of 1200 seconds; check console log for any additional details


      Do not be distracted by the complaint about SilverBullet.jar.
      That is a normal part of this test. This particular sighting is
      about the "exitValue = 134" which indicates that the target
      process died due to a signal.

      Update: Since the last line in the test's output is:

           - Test: VirtualMachine.list

      I'm wondering if that's where the signal arrived.

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

              Created:
              Updated:
              Resolved: