RFR: 8317808: HTTP/2 stream cancelImpl may leave subscriber registered [v2]
Michael McMahon
michaelm at openjdk.org
Fri Oct 13 13:44:43 UTC 2023
On Thu, 12 Oct 2023 16:47:28 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Some of the ThrowingSubscriberXxx tests (typically those that use a streaming body) have been observed failing intermittently (though rarely) in timeout. The error message printed at the end showed that some HTTP/2 stream subscribers had not been properly deregistered when an exception was thrown in GET_BODY.
>>
>> The issue appears to be a race condition between `cancelImpl` and `schedule` where the scheduler `sched` may get stopped before the subscriber is exceptionally completed.
>>
>> A simple fix is to ensure that `cancelImpl` will complete the subscriber, if needed.
>
> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
>
> Simplify the fix
src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java line 584:
> 582: }
> 583: return false;
> 584: }
Is this change here actually part of the fix, or something else that needed to be fixed?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16144#discussion_r1358283715
More information about the net-dev
mailing list