RFR: 8317808: HTTP/2 stream cancelImpl may leave subscriber registered

Daniel Fuchs dfuchs at openjdk.org
Wed Oct 11 10:33:50 UTC 2023


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.

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

Commit messages:
 - 8317808

Changes: https://git.openjdk.org/jdk/pull/16144/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16144&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8317808
  Stats: 36 lines in 4 files changed: 29 ins; 4 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/16144.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16144/head:pull/16144

PR: https://git.openjdk.org/jdk/pull/16144


More information about the net-dev mailing list