RFR: 8349662: SSLTube SSLSubscriptionWrapper has potential races when switching subscriptions
Daniel Fuchs
dfuchs at openjdk.org
Fri Feb 7 13:54:29 UTC 2025
Hi,
Please find here a change that fixes a potential race condition in SSLTube.SSLSubscriptionWrapper.
Typically the race may get triggered if the demand increased by request() is not exhausted by the time
the subscription is switched by setSubscription.
Some synchronization is required to present a consistent view of the subscripton state, so that pending demand can be consistently transferred to the new the subscription.
This mostly affects HTTP/1.1 over TLS since each new exchange will cause the subscription to be switched to the new exchange. The race condition is elusive and hard to reproduce. when it occurs, it mostly causes tests to fail in jtreg timeout as the demand from upstream may not be transferred properly.
Some additional logging has been added to the DigestEchoClient.java test class (which is used by DigestEchoClientSSL) to help diagnosability of intermittent failures in these tests.
-------------
Commit messages:
- 8349662: SSLTube SSLSubscriptionWrapper has potential races when switching subscriptions
Changes: https://git.openjdk.org/jdk/pull/23515/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23515&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8349662
Stats: 147 lines in 3 files changed: 94 ins; 14 del; 39 mod
Patch: https://git.openjdk.org/jdk/pull/23515.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23515/head:pull/23515
PR: https://git.openjdk.org/jdk/pull/23515
More information about the net-dev
mailing list