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

java/net/Socket/UdpSocket.java fails with "java.net.BindException: Address already in use" (macos-aarch64)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b24
    • CPU:
      aarch64
    • OS:
      os_x

      Backports

        Description

        The following test fails in the JDK17 CI on macos-aarch64:

        java/net/Socket/UdpSocket.java

        Here's a snippet from the log file:

        #section:testng
        ----------messages:(4/216)----------
        command: testng -Dsun.net.maxDatagramSockets=32 UdpSocket
        reason: User specified action: run testng/othervm -Dsun.net.maxDatagramSockets=32 UdpSocket
        Mode: othervm [/othervm specified]
        elapsed time (seconds): 0.196
        ----------configuration:(0/0)----------
        ----------System.out:(52/3053)----------
        [TestNG] Running:
          java/net/Socket/UdpSocket.java

        test UdpSocket.testMaxSockets(): failure
        java.net.BindException: Address already in use
        at java.base/sun.nio.ch.Net.connect0(Native Method)
        at java.base/sun.nio.ch.Net.connect(Net.java:576)
        at java.base/sun.nio.ch.Net.connect(Net.java:565)
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:588)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:331)
        at java.base/java.net.Socket.connect(Socket.java:630)
        at java.base/java.net.Socket.connect(Socket.java:581)
        at java.base/java.net.Socket.<init>(Socket.java:505)
        at java.base/java.net.Socket.<init>(Socket.java:489)
        at UdpSocket.newUdpSocket(UdpSocket.java:137)
        at UdpSocket.testMaxSockets(UdpSocket.java:103)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
        at org.testng.TestRunner.privateRun(TestRunner.java:773)
        at org.testng.TestRunner.run(TestRunner.java:623)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
        at org.testng.SuiteRunner.run(SuiteRunner.java:259)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
        at org.testng.TestNG.run(TestNG.java:1018)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:831)
        test UdpSocket.testSendReceive(): success

        ===============================================
        java/net/Socket/UdpSocket.java
        Total tests run: 2, Failures: 1, Skips: 0
        ===============================================

        ----------System.err:(14/858)----------
        java.lang.Exception: failures: 1
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:831)

        JavaTest Message: Test threw exception: java.lang.Exception: failures: 1
        JavaTest Message: shutting down test

        STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1
        ----------rerun:(37/6444)*----------

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                msheppar Mark Sheppard
                Reporter:
                dcubed Daniel Daugherty
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: