jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8373409: java/net/httpclient/http3/H3ErrorHandlingTest.java failed due to deadlock

Open djelinski opened this issue 1 month ago • 6 comments

This PR fixes a deadlock between the localConnectionIdManager and the connections map by closing the manager before calling connections.compute.

No new tests; the issue requires a complex setup to reproduce, and the new code is easy enough to reason about. Existing tests continue to pass.


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Issue

  • JDK-8373409: java/net/httpclient/http3/H3ErrorHandlingTest.java failed due to deadlock (Bug - P3)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28788/head:pull/28788
$ git checkout pull/28788

Update a local copy of the PR:
$ git checkout pull/28788
$ git pull https://git.openjdk.org/jdk.git pull/28788/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28788

View PR using the GUI difftool:
$ git pr show -t 28788

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28788.diff

Using Webrev

Link to Webrev Comment

djelinski avatar Dec 12 '25 12:12 djelinski

:wave: Welcome back djelinski! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Dec 12 '25 12:12 bridgekeeper[bot]

@djelinski This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8373409: java/net/httpclient/http3/H3ErrorHandlingTest.java failed due to deadlock

Reviewed-by: dfuchs

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 85 new commits pushed to the master branch:

  • 87d881fee01c42f5847031a63d50873b3d438f7a: 8368493: Disable most test JSSE debug output by default, and increase the test default maximum output log size
  • 30be94086aad42b99a15a05fe5115f552e8efb8b: 8373625: CPUTimeCounters creates a total counter for unsupported GCs
  • 2241218ef64ed6cb51f962f3ab6db1a766f1744f: 8373631: Improve classes in the "jdk.jpackage.internal.util.function" package
  • ... and 82 more: https://git.openjdk.org/jdk/compare/b60ac710bebf195972436da324983e61b51484ef...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

openjdk[bot] avatar Dec 12 '25 12:12 openjdk[bot]

@djelinski The following label will be automatically applied to this pull request:

  • net

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

openjdk[bot] avatar Dec 12 '25 12:12 openjdk[bot]

I checked all other uses of CHM.compute in the java.net.http module; most of them are trivially correct. The ones in AltServiceRegistry are not trivial, and might need to be replaced with something easier to reason about. I'll look into that.

EDIT - checked the AltServiceRegistry; compute is only used on a (non-concurrent) HashMap while holding a lock, and the lambdas only use functions internal to the registry. This should be fine as well.

djelinski avatar Dec 12 '25 12:12 djelinski

Webrevs

mlbridge[bot] avatar Dec 12 '25 12:12 mlbridge[bot]

I checked all other uses of CHM.compute in the java.net.http module; most of them are trivially correct. The ones in AltServiceRegistry are not trivial, and might need to be replaced with something easier to reason about. I'll look into that.

EDIT - checked the AltServiceRegistry; compute is only used on a (non-concurrent) HashMap while holding a lock, and the lambdas only use functions internal to the registry. This should be fine as well.

Thanks for checking the other uses of CHM.compute @djelinski !

dfuch avatar Dec 15 '25 09:12 dfuch

Thanks @dfuch for the review!

/integrate

djelinski avatar Dec 17 '25 07:12 djelinski

Going to push as commit 386ad61458a3901622b92ca56982d728c11b846a. Since your change was applied there have been 89 commits pushed to the master branch:

  • 94c51ce314eea7a4f188fa0db1bae0e3f3dbd230: 8372635: Lambdas do not copy over SYNTHETIC flag for local variables
  • e9b4696acc966d96d42880e840c8fe27434e4e1b: 8373097: Save command should create missing parent directories
  • e635330ae17fd2ce653ec75fd57fdd72d2512bba: 8373069: RISC-V: implement GHASH intrinsic
  • ... and 86 more: https://git.openjdk.org/jdk/compare/b60ac710bebf195972436da324983e61b51484ef...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Dec 17 '25 07:12 openjdk[bot]

@djelinski Pushed as commit 386ad61458a3901622b92ca56982d728c11b846a.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar Dec 17 '25 07:12 openjdk[bot]