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

DatagramSocket/ReuseAddressTest.java failed due to "RuntimeException: cannot bind second socket"

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 15, 16
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x

      Description

      The following test failed in the JDK15 CI:

      java/net/DatagramSocket/ReuseAddressTest.java

      Here's a snippet from the log file:

      #section:main
      ----------messages:(4/161)----------
      command: main ReuseAddressTest
      reason: User specified action: run main/othervm ReuseAddressTest
      Mode: othervm [/othervm specified]
      elapsed time (seconds): 0.17
      ----------configuration:(0/0)----------
      ----------System.out:(7/363)----------
       >> DatagramSocket0029: public void setReuseAddress(boolean on) throws SocketException
      OKAY
       >> DatagramSocket0030: public void setReuseAddress(boolean on) throws SocketException
      OKAY
       >> DatagramSocket0031: public void setReuseAddress(boolean on) throws SocketException
      OKAY
       >> DatagramSocket0032: public void setReuseAddress(boolean on) throws SocketException
      ----------System.err:(14/1118)----------
      java.lang.RuntimeException: cannot bind second socket to /0.0.0.0:55374 unexpected java.net.BindException: Address already in use
      at ReuseAddressTest.DatagramSocket0032(ReuseAddressTest.java:280)
      at ReuseAddressTest.main(ReuseAddressTest.java:69)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:832)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: cannot bind second socket to /0.0.0.0:55374 unexpected java.net.BindException: Address already in use
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: cannot bind second socket to /0.0.0.0:55374 unexpected java.net.BindException: Address already in use
      ----------rerun:(34/4493)*----------

        Attachments

          Activity

            People

            • Assignee:
              pconcannon Patrick Concannon
              Reporter:
              dcubed Daniel Daugherty
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: