On Fri, 23 May 2025 14:35:30 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
> The java/net/httpclient/DigestEchoClient.java fails intemittently with > IOException: HTTP/1.1 header parser received no bytes. > > Analysis shows that this is caused by the CleanupTrigger which receives data > after the reused connection has been taken out of the HTTP/1.1 clear pool > (Caused by: java.io.IOException: Data received while in pool). This should > not happen. > > The fix for [JDK-8338569](https://bugs.openjdk.org/browse/JDK-8338569) has > improved the situation but apparently didn't fix the issue completely. > The issue is that the write publisher manages to come active before the read > subscriber has been switched, which opens a window in which the old read > subscriber receives the data that should have been passed to the new one. > > To fix that, this change proposes to pause reading at the selector level > before connecting the flows with the new publisher /subscriber pair. This > should ensure that data doesn't reach the "old" subscriber, if the new write > publisher manage to send data before the new read subscriber is subscribed. This pull request has now been integrated. Changeset: 0582bd29 Author: Daniel Fuchs <dfu...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/0582bd290d5a8b6344ae7ada36492cc2f33df050 Stats: 67 lines in 1 file changed: 26 ins; 30 del; 11 mod 8357639: DigestEchoClient fails intermittently due to: java.io.IOException: Data received while in pool Reviewed-by: djelinski ------------- PR: https://git.openjdk.org/jdk/pull/25416