Hi Mark,
On 10/08/2019 21:14, mark sheppard wrote:
It is suggested that the use of wildcard address (INADDR_ANY) is a
contributing factor, but i'm
not sure that is a correct assumption.
That certainly did fix the intermittent failure we had in
the new httpclient tests - especially on solaris, back when we
were heavily hammering them prior to integration.
Just to emphasize the reuse address option is not on the IP address but
rather on the IP address and port
combination, or at least that what is was meant to be. In the TCP
context there are other restrictions, also.
yes.
Your change is to the "server socket", but the client is a symmetric
equivalent, DatagramSocket on
wildcard and ephemeral port, so the echo send from the server could
equally be sent astray!!
That is, if the wildcard addressing is an issue.
Oh - darn. Thanks for noticing this! I should change the client too.
Looking at the overall structure of the test, is it not possible, that
the server socket has been
GCed, finalized and so closed, prior to the server's packet send having
been completed within the OS, and so the
client hangs.
I doubt this would happen with UDP since the message should already
have been sent - but just in case I'm adding a countdown latch just
to eliminate the possibility.
Here is a new webrev:
webrev: http://cr.openjdk.java.net/~dfuchs/webrev_8229348/webrev.01/
best regards,
-- daniel
8229348: java/net/DatagramSocket/UnreferencedDatagramSockets.java
fails intermittently
https://bugs.openjdk.java.net/browse/JDK-8229348