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

java/net/SocketPermission/SocketPermissionTest.java fails intermittently

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        This failure happened once in same binaries runs with JDK 9 b38. It is an intermittent failure.

        Please refer to following part of test log:
        ...
        test SocketPermissionTest.testPositive(SocketPermissionTest$$Lambda$12/1768074411@6586498e, SocketPermissionTest$$Lambda$13/1746524665@5654da04): success
        config SocketPermissionTest.setFreePort(): success
        test SocketPermissionTest.testPositive(SocketPermissionTest$$Lambda$12/1768074411@6586498e, SocketPermissionTest$$Lambda$14/1730796861@247e500e): failure
        java.lang.RuntimeException: java.net.BindException: Address already in use
        at SocketPermissionTest.connectDatagramSocketTest(SocketPermissionTest.java:160)
        at SocketPermissionTest.lambda$positiveProvider$4(SocketPermissionTest.java:87)
        at SocketPermissionTest$$Lambda$14/1730796861.accept(Unknown Source)
        at SocketPermissionTest.lambda$testPositive$0(SocketPermissionTest.java:62)
        at SocketPermissionTest$$Lambda$24/1669766863.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at SocketPermissionTest.testPositive(SocketPermissionTest.java:61)
        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:498)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
        at org.testng.TestRunner.privateRun(TestRunner.java:767)
        at org.testng.TestRunner.run(TestRunner.java:617)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
        at org.testng.SuiteRunner.run(SuiteRunner.java:240)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
        at org.testng.TestNG.run(TestNG.java:1057)
        at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:161)
        at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:145)
        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:498)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
        at java.lang.Thread.run(Thread.java:745)
        Caused by: java.net.BindException: Address already in use
        at java.net.PlainDatagramSocketImpl.bind0(Native Method)
        at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:94)
        at java.net.DatagramSocket.bind(DatagramSocket.java:394)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:244)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:301)
        at SocketPermissionTest.connectDatagramSocketTest(SocketPermissionTest.java:154)

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/674710f62d05
            User: chegar
            Date: 2016-01-26 09:28:49 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/674710f62d05 User: chegar Date: 2016-01-26 09:28:49 +0000
            Hide
            chegar Chris Hegarty added a comment -
            In many of the test scenarios the “listening” socket can be created before the specific
            access control context and associated permission are created.

            The test has been rewritten to do just this, but kept the same test scenarios. The use
            of data providers was cute, but not workable since there is no common supertype for
            the socket classes. The test providers have been expanded out, keeping the same
            scenarios. This gives the same test coverage, but should be stable since it creates
            the sockets first, on an ephemeral port, and then constructs the permissions
            appropriately given that port.
            Show
            chegar Chris Hegarty added a comment - In many of the test scenarios the “listening” socket can be created before the specific access control context and associated permission are created. The test has been rewritten to do just this, but kept the same test scenarios. The use of data providers was cute, but not workable since there is no common supertype for the socket classes. The test providers have been expanded out, keeping the same scenarios. This gives the same test coverage, but should be stable since it creates the sockets first, on an ephemeral port, and then constructs the permissions appropriately given that port.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/674710f62d05
            User: lana
            Date: 2016-02-03 20:54:42 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/674710f62d05 User: lana Date: 2016-02-03 20:54:42 +0000
            Hide
            bcbeck Brian Beck added a comment -
            This test was observed to fail intermittently on Mach 5 on or around 12/20/16. See builds 1696, 1697 and 1701.

            Show
            bcbeck Brian Beck added a comment - This test was observed to fail intermittently on Mach 5 on or around 12/20/16. See builds 1696, 1697 and 1701.
            Hide
            xiaofeya Felix Yang added a comment -
            Closed this and filed a new issue JDK-8171827
            Show
            xiaofeya Felix Yang added a comment - Closed this and filed a new issue JDK-8171827

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                xiaofeya Felix Yang
              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: