RFR: 8286597: Implement PollerProvider on AIX [v2]

Alan Bateman alanb at openjdk.org
Mon May 8 17:27:53 UTC 2023


On Mon, 8 May 2023 17:11:20 GMT, Tyler Steele <tsteele at openjdk.org> wrote:

>> test/jdk/java/net/vthread/BlockingSocketOps.java line 198:
>> 
>>> 196:                         fail("read " + n);
>>> 197:                     } else {
>>> 198:                         assertTrue(n == -1);
>> 
>> This doesn't look right, read should not return -1 here.
>
> I believe we get [here](https://github.com/openjdk/jdk/blob/master/src/java.base/unix/native/libnio/ch/SocketDispatcher.c#L44) with EAGAIN, but not ECONNRESET. So the -1 indicates that the read has failed.
> 
> My feeling is that the defined behaviour is not totally clear. [From setSockOpt](https://linux.die.net/man/3/setsockopt) (emphasis added by me):
> 
>> SO_LINGER
>>   Lingers on a close() _if data is present_.
> 
> This does not define what happens if no data is present. In my testing, AIX behaved exactly like it does in `testSocketReadPeerClose1` so my understanding is that SO_LINGER had essentially no effect because there is no data waiting to be sent. As I see it, this test reduces to `testSocketReadPeerClose1` on AIX, so the test should be the same. Another option would be to skip it entirely on AIX.

There are several tests in both the java/net and java/nio/channels tree that setup the conditions for a "hard reset", e.g. SocketChannel/ConnectionReset.java. I'm curious if these tests also fail on AIX.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13452#discussion_r1187689121


More information about the hotspot-dev mailing list