[jdk17] Integrated: 8268342: java/foreign/channels/TestAsyncSocketChannels.java fails with "IllegalStateException: This segment is already closed"

Chris Hegarty chegar at openjdk.java.net
Mon Jun 14 08:32:52 UTC 2021


On Fri, 11 Jun 2021 15:26:50 GMT, Chris Hegarty <chegar at openjdk.org> wrote:

> There is the possibility for a race in the test, where the outbound socket buffer is still being filled, after 5 seconds, when the main test thread tries to close the resource scope.
> 
> The test has been updated to set the send/receive buffer sizes in an attempt/hint to limit the accepted/connected socket buffer sizes. Actual buffer sizes in use will likely be larger due to TCP auto-tuning, but the hint typically reduces the overall scaled sizes. This is primarily to stabilize outstanding write operations. Additionally, to ameliorate the wait-for-writebuf-to-fill situation, the dumb sleep 5secs has been replaced with a heuristic that checks that the number of bytes written quiesces. With these changes, the test successfully passes several thousands of runs.

This pull request has now been integrated.

Changeset: fe48ea9d
Author:    Chris Hegarty <chegar at openjdk.org>
URL:       https://git.openjdk.java.net/jdk17/commit/fe48ea9d7975188853bc165ce29789753f4758f2
Stats:     52 lines in 1 file changed: 46 ins; 4 del; 2 mod

8268342: java/foreign/channels/TestAsyncSocketChannels.java fails with "IllegalStateException: This segment is already closed"

Reviewed-by: dfuchs

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

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


More information about the core-libs-dev mailing list