Skip to content

8335181: Incorrect handling of HTTP/2 GOAWAY frames in HttpClient #3783

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

Closed
wants to merge 5 commits into from

Conversation

GoeLin
Copy link
Member

@GoeLin GoeLin commented Jul 24, 2025

I backport this for parity with 17.0.17-oracle based on the push to 21.

Resolved Coipyright in src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java

I had to adapt the test as it again depends on AutoClosable of HttpClient.
Here it seems ok to just not shut down the Client as it is done in other tests.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8335181 needs maintainer approval

Issue

  • JDK-8335181: Incorrect handling of HTTP/2 GOAWAY frames in HttpClient (Bug - P3 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3783/head:pull/3783
$ git checkout pull/3783

Update a local copy of the PR:
$ git checkout pull/3783
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3783/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3783

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3783.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 24, 2025

👋 Welcome back goetz! 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.

@openjdk
Copy link

openjdk bot commented Jul 24, 2025

@GoeLin 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:

8335181: Incorrect handling of HTTP/2 GOAWAY frames in HttpClient

Reviewed-by: rschmelter, abakhtin
Backport-of: 209939a90e9b804da4c37ebd978b088cb8f41ead

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 5 new commits pushed to the master branch:

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 openjdk bot changed the title backport 209939a90e9b804da4c37ebd978b088cb8f41ead 8335181: Incorrect handling of HTTP/2 GOAWAY frames in HttpClient Jul 24, 2025
@openjdk
Copy link

openjdk bot commented Jul 24, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base rfr Pull request is ready for review labels Jul 24, 2025
@mlbridge
Copy link

mlbridge bot commented Jul 24, 2025

Webrevs

@GoeLin
Copy link
Member Author

GoeLin commented Jul 28, 2025

GHA failure: build failed, unrelated:
E: Couldn't download packages: libc6-dev

Copy link
Contributor

@schmelter-sap schmelter-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@openjdk
Copy link

openjdk bot commented Jul 28, 2025

⚠️ @GoeLin This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Jul 28, 2025
@alexeybakhtin
Copy link

Hello, thank you for the backport.
Shouldn't we update the copyright year in src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java as described in the overview and the JDK 21 backport?
The rest looks good to me.

@GoeLin
Copy link
Member Author

GoeLin commented Jul 28, 2025

Hi @alexeybakhtin , thanks for the catch, fixed!

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Jul 29, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Jul 30, 2025
@GoeLin
Copy link
Member Author

GoeLin commented Jul 30, 2025

Our nighttests showed

STARTED H2GoAwayTest::testUnprocessedRaisesException 'testUnprocessedRaisesException()'
java.lang.SecurityException: access denied ("java.net.URLPermission" "https://127.0.0.1:55295/test" "HEAD:")
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:892)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133)
at H2GoAwayTest.testUnprocessedRaisesException(H2GoAwayTest.java:173)

Locally, the test passes. I assume this is a inference with other tests, as we can not shutdown the HttpClient in 17. Other, similar tests all run in othervm mode. Adding othervm mode fixes the issue in our nightly tests.

Copy link
Contributor

@schmelter-sap schmelter-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 1, 2025
@GoeLin
Copy link
Member Author

GoeLin commented Aug 1, 2025

Again thanks for the reviews!

@GoeLin
Copy link
Member Author

GoeLin commented Aug 1, 2025

/integrate

@openjdk
Copy link

openjdk bot commented Aug 1, 2025

Going to push as commit 4b2d777.
Since your change was applied there have been 5 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Aug 1, 2025
@openjdk openjdk bot closed this Aug 1, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 1, 2025
@openjdk
Copy link

openjdk bot commented Aug 1, 2025

@GoeLin Pushed as commit 4b2d777.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Port of a pull request already in a different code base integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants