[jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" [v2]

Mark Sheppard msheppar at openjdk.java.net
Wed Jun 16 22:10:56 UTC 2021


> JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory"
> 
> The test java/net/MulticastSocket/Promiscuous.java has been observed to fail on a regular basis on macosx-aarch.
> This is typically under heavy test load on a test machine. Analysis of the problem have
> shown that the setsockopt for joining a multicast group will intermittently fail with ENOMEM.
> 
> While analysis of test environment shows significant memory usage and some memory pressure, it is
> not excessive and as such it is deemed transition or temporary condition, such that a retry of the
> setsockopt system call, has been seen to mitigate the issue. This adds to the stability of the
> Promiscuous.java test and reduces test failure noise.
> 
> The proposed fix is in open/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c
> in the mcast_join_leave function.  That is, if setsockopt to join an mcast group fails, and the errno == ENOMEM, 
> then re-invoke the setsockopt system call for joining a mcast group.
> The change has been applied as a conditional compilation.
> Additionally this change result in the Promiscuous.java test being removed from the
> ProblemList.txt.
> 
> Please oblige and review the changes for a fix of the issue JDK-8265369

Mark Sheppard has updated the pull request incrementally with one additional commit since the last revision:

  JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory"
  amendments as per suggestion from Chris Hegarty

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk17/pull/44/files
  - new: https://git.openjdk.java.net/jdk17/pull/44/files/2e940bc0..ac82b8df

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk17&pr=44&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk17&pr=44&range=00-01

  Stats: 58 lines in 1 file changed: 9 ins; 34 del; 15 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/44.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/44/head:pull/44

PR: https://git.openjdk.java.net/jdk17/pull/44


More information about the net-dev mailing list