On Tue, 11 Nov 2025 14:28:18 GMT, Daniel Fuchs <[email protected]> wrote:

>> Nothing looks wrong with the test or the code. The failure happens rarely - 
>> probably when the machine is under load: this test tries to saturate the 
>> socket buffers and is resource consuming.
>> 
>> The proposed fix is just to double the jtreg timeout for this test from 120 
>> to 240.
>
> Daniel Fuchs has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Fix copyright dates

@djelinski nailed the issue: the method `byteArrayOfSize(1024);` may return new 
byte[0], and if that happens the server will write nothing and the ReadEvent 
will never be fired. The server will then be blocked waiting on 
readStalled.await().

This is what happens in the failing test:

Thread[#30,Thread-3,5,MainThreadGroup]: Server wrote total 491: awaiting 
initialReadStall
Thread[#30,Thread-3,5,MainThreadGroup]: Server wrote total 491: awaiting 
readStall

the second write was of 0 bytes - since the total number of bytes did not change

I have adapted the fix accordingly.

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

PR Comment: https://git.openjdk.org/jdk/pull/28178#issuecomment-3527741220

Reply via email to