8241786: 3 DatagramChannel tests and 2 MulticastSocket tests fail due to "SocketException: No buffer space available"

Daniel Fuchs daniel.fuchs at oracle.com
Thu Apr 2 08:48:57 UTC 2020


Hi Alan,

On 01/04/2020 20:50, Alan Bateman wrote:
> The change to java.net.DefaultInterface to workaround bad configurations 
> on macOS looks good. Hopefully existing usages of the 1-arg joinGroup 
> will migrate to the 2-arg variant and avoid needing the JDK to choose on 
> multi-homed systems.

Thanks.

> DefaultInterface might be better in a test infra class (in java/net) to 
> avoid duplicate it in several tests.

I have considered that. The problem is that it requires the test that
uses it to add @modules java.base/java.net:+open directive in the test
itself. At the moment only one test uses it - so there is no
duplication (yet). Maybe we should wait until we need it elsewhere
before thinking of ways to move it to the test library?

> The updates to the DatagramChannel tests look okay but I think we should 
> change the new trace messages added to AdaptorMulticasting to be 
> consistent with the existing trace, e.g. the test cycles through the 
> families and interfaces and prints output like this following before 
> each run:
> 
> Test family=INET, multicast group=/225.4.5.6, interface=en0 >
> The changes in the patch duplicate a subset of this in a different 
> format. It might be simpler to just not duplicate it but print just 
> print the name of the sub-tests, whatever is easiest.

When I ran this test it was failing in timeout with *no* traces.
I hate that. I added traces to figure out at which point it was
failing. There might be a bit of duplication in the information,
but I'd rather have that than wonder if the test is actually
doing what I think it does. When unexplainable things happen,
I start doubting everything ;-)

If you insist I'll reluctantly remove the redundant information,
but I do think it helps.

> NetworkConfiguration looks okay although I could imagine the comment 
> added at L101-103 not being clearer for future maintainers. I think 
> we'll need to do a cleanup of this test class at some point.

I'll see if I can clarify this - or maybe I'll just remove it.
I agree it could be confusing.

best regards,

-- daniel

> 
> -Alan
> 



More information about the nio-dev mailing list