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

AIX: sporadic unexpected errno when calling setsockopt in Net.joinOrDrop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 21, 24, 25
    • core-libs
    • None

      In our automated test we see sporadic errors with this stack:

      java.net.SocketException: Resource temporarily unavailable (setsockopt failed)
      at java.base/sun.nio.ch.Net.joinOrDrop4(Native Method)
      at java.base/sun.nio.ch.Net.join4(Net.java:654)
      at java.base/sun.nio.ch.DatagramChannelImpl.innerJoin(DatagramChannelImpl.java:1568)
      at java.base/sun.nio.ch.DatagramChannelImpl.join(DatagramChannelImpl.java:1586)
      at java.base/sun.nio.ch.DatagramSocketAdaptor.joinGroup(DatagramSocketAdaptor.java:467)
      at java.base/java.net.DatagramSocket.joinGroup(DatagramSocket.java:1199)
      at java.base/java.net.MulticastSocket.joinGroup(MulticastSocket.java:331)

      The native code calls setsockopt(fdval(env,fdo), IPPROTO_IP, opt, optval, optlen) and gets EAGAIN as errno - this is not defined on AIX as a valid return code but seem to happen anyway.
      The idea is to simply retry as it is already done for ENOMEM on macOS.

            azeller Arno Zeller
            azeller Arno Zeller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: