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

sun/tools/jstatd/TestJstatdPortAndServer.java and sun/tools/jstatd/TestJstatdServer.java miss correct check of RMI server availability

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-svc
    • Subcomponent:
    • Resolved In Build:
      b30

      Backports

        Description

        TestJstadPortAndServer starts jstad process and then jps. If jstad has not had time to launch running jps will result into: "RMI Server TestJstatdServer not available". In this case the test should wait and try again to run jps. The current test code checks only for default case "RMI Server JStatRemoteHost not available".

        Log:
        ===
        Standard Output

        Start jstatd:
        [/scratch/jenkins/workspace/jdk9-dev-build/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/jstatd -J-XX:+UsePerfData -J-Djava.security.policy=/scratch/jenkins/workspace/jdk9-dev-build/jdk/test/sun/tools/jstatd/all.policy -J-Dparent.pid.18114 -p 37618 -n TestJstatdServer]
        []:/scratch/jenkins/workspace/jdk9-dev-build/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/jstatd -J-XX:+UsePerfData -J-Djava.security.policy=/scratch/jenkins/workspace/jdk9-dev-build/jdk/test/sun/tools/jstatd/all.policy -J-Dparent.pid.18114 -p 37618 -n TestJstatdServer
        Jstatd-Thread pid: 905

        Start jps:
        [/scratch/jenkins/workspace/jdk9-dev-build/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/jps -J-XX:+UsePerfData -v scaaa115:37618/TestJstatdServer]
        ProcessThread.stopProcess() will kill process
        --- ProcessLog ---
        cmd: /scratch/jenkins/workspace/jdk9-dev-build/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/jstatd -J-XX:+UsePerfData -J-Djava.security.policy=/scratch/jenkins/workspace/jdk9-dev-build/jdk/test/sun/tools/jstatd/all.policy -J-Dparent.pid.18114 -p 37618 -n TestJstatdServer
        exitvalue: 143
        stderr:
        stdout:

            

        Standard Error

         stdout: [];
         stderr: [RMI Server TestJstatdServer not available
        ]
         exitValue = 1

        java.io.IOException: Stream closed
        at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:336)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
        at java.io.FilterInputStream.read(FilterInputStream.java:107)
        at jdk.testlibrary.StreamPumper.run(StreamPumper.java:112)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at jdk.testlibrary.StreamPumper$1.run(StreamPumper.java:191)
        at java.lang.Thread.run(Thread.java:745)
        java.io.IOException: Stream closed
        at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:336)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
        at java.io.FilterInputStream.read(FilterInputStream.java:107)
        at jdk.testlibrary.StreamPumper.run(StreamPumper.java:112)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at jdk.testlibrary.StreamPumper$1.run(StreamPumper.java:191)
        at java.lang.Thread.run(Thread.java:745)
        java.lang.RuntimeException: Expected to get exit value of [0]

        at jdk.testlibrary.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:349)
        at JstatdTest.waitForJstatdRMI(JstatdTest.java:159)
        at JstatdTest.runJps(JstatdTest.java:142)
        at JstatdTest.runToolsAndVerify(JstatdTest.java:231)
        at JstatdTest.doTest(JstatdTest.java:337)
        at TestJstatdPortAndServer.main(TestJstatdPortAndServer.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:484)
        at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
        at java.lang.Thread.run(Thread.java:745)

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

            

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ykantser Yekaterina Kantserova (Inactive)
                  Reporter:
                  ykantser Yekaterina Kantserova (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: