RFR: 8372198: Avoid closing PlainHttpConnection while holding a lock [v4]
Volkan Yazici
vyazici at openjdk.org
Thu Nov 27 12:36:54 UTC 2025
On Wed, 26 Nov 2025 17:43:41 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> I see the `noreg-hard` label. An approach that you might consider exploring:
>>
>> 1. Configure `jdk.httpclient.connectionPoolSize` to something really low (e.g., 1) to force `returnToPool()` to close excessive connections
>> 2. Configure an `HttpTestServer` that blocks all `HttpTestExchange::sendResponseHeaders` behind a latch
>> 3. Fire 100 `sendAsync().thenCompose(responseFutures::add)`, where `responseFutures` is an unbounded `BlockingQueue<HttpResponse>`
>> 4. Release the `sendResponseHeaders` latch
>> 5. Verify the success of the very first response, i.e., `responseFutures.enqueue()`
>> 6. Shutdown the client without waiting for the rest of the responses to arrive
>> 7. Wrap the test method in a `@RepeatedTest(50)`
>
> @vy - the test you requested is ready to be reviewed. It seems stable now even on windows. Let me know what you think.
@dfuch, I revert your changes and run the test, and it passes. I doubt if this is what you intended. Shouldn't it be failing?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28430#issuecomment-3585632873
More information about the net-dev
mailing list