-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8372198: Avoid closing PlainHttpConnection while holding a lock #28421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8371882: Improve documentation for JEP 526: Lazy Constants Reviewed-by: jvernee, mcimadamore
Reviewed-by: phubner, azafari
Reviewed-by: vromero
Reviewed-by: erikj
….java should check ability to create links Reviewed-by: alanb, jpai
Reviewed-by: alanb
…scribeConstable Reviewed-by: psandoz, jvernee
Reviewed-by: shade, ysr, xpeng
Reviewed-by: liach
Reviewed-by: liach
…ng is disabled Reviewed-by: shade, mgronlun
8346947: Update ICU4J to Version 78.1 Reviewed-by: joehw
Reviewed-by: thartmann, chagedorn
…ointer to non-trivially copyable type Co-authored-by: Ioi Lam <iklam@openjdk.org> Reviewed-by: iklam, asmehra
…thod handle linker Reviewed-by: kvn, roland
Reviewed-by: smarks, ogillespie
Reviewed-by: stefank, tschatzl
Reviewed-by: kcr, dholmes
Reviewed-by: kvn, asmehra
…and switch (Fourth Preview) Reviewed-by: jlahoda
Reviewed-by: fandreuzzi, iwalulya
…embler::patch_barrier_relocation Reviewed-by: aph
Reviewed-by: azvegint, serb
…rGenerator::generate_native_entry Reviewed-by: aph, shade
Reviewed-by: kvn, epeter
Reviewed-by: jvernee
…N for MoveL2D Reviewed-by: epeter, chagedorn
…ed runtime Reviewed-by: asemenyuk
Reviewed-by: rhalade
|
👋 Welcome back dfuchs! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
/issue 8372198 |
|
@dfuch The issue |
Webrevs
|
|
|
|
@dfuch |
|
Something went wrong when I tried to merge the main PR branch in the dependent PR branch. I'm going to withdraw this PR and start again. |
An experimental change to SelectorManager::shutdown unveil a potential deadlock between the SelectorManager thread trying to stop the HttpClientImpl, and an executor thread concurrently trying to return a connection to the pool.
The issue seems to be caused by the ConnectionPool::returnToPool trying to close the returned connection when stopping, while holding the ConnectionPool state lock, and the SelectorManager thread trying to close a pooled connection, holding the connection stateLock and trying to close the channel, which caused the CleanupTrigger to fire and attempt to remove the connection from the pool.
This problem was observed once with the java/net/httpclient/ThrowingSubscribersAsLimitingAsync.java test.
To avoid the problem, the proposed fix is to wait until the ConnectionPool::stateLock has been released before actually closing the connection, and to wait until the PlainHttpConnection::stateLock has been released before actually closing the channel. Indeed, there should be no need to close those while holding the lock.
Progress
Integration blocker
Warnings
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28421/head:pull/28421$ git checkout pull/28421Update a local copy of the PR:
$ git checkout pull/28421$ git pull https://git.openjdk.org/jdk.git pull/28421/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28421View PR using the GUI difftool:
$ git pr show -t 28421Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28421.diff
Using Webrev
Link to Webrev Comment