-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8305906: HttpClient may use incorrect key when finding pooled HTTP/2 connection for IPv6 address #13456
Conversation
…connection for IPv6 address
👋 Welcome back jpai! A progress list of the required criteria for merging this PR into |
Webrevs
|
This patch improves the situation, but is not sufficient to address all cases. For example, |
…equestImpl.getURI()
Thank you for catching that, Daniel. You are indeed right, the fix missed this part. I updated the new I have now updated the PR to use With this change the |
Thanks for the fix, that looks better. Now that we always use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@jaikiran 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:
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 4 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
@jaikiran This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
(can't believe it's already 4 weeks) |
Hello @dfuch, @djelinski, I've done some minor changes to this PR to have |
Thank you both for the reviews. |
/integrate |
Going to push as commit 3ccb3c0.
Your commit was automatically rebased without conflicts. |
Thanks for your change @jaikiran! We've seen this issue in my organization occurring in jdk17, and jdk11. It's nice to see that it has been fixed. Do you have any plans to backport it? |
Hello Tyler,
I haven't been involved in the 11/17 backports in recent times, so I don't have any specific plans to backport this. Having said that, I think this does look like a good candidate for backporting, so if you or anyone has done it before, please do go ahead. |
Sure. I can give it a go. |
Can I please get a review of this change which proposes to fix the issue reported in https://bugs.openjdk.org/browse/JDK-8305906?
As noted in that issue, when IPv6 hosts are involved, the HttpClient on certain occasions can end up caching the connection with a key which doesn't match with the key which is then used in a subsequent request against the same target host.
The commit in this PR now wraps the IPv6 address in a square bracket consistently so that the correct key is used both during storing the connection in the pool and when looking up.
A new jtreg test has been added which reproduces this issue without the fix and verifies the fix.
Progress
Issue
"4"
)Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13456/head:pull/13456
$ git checkout pull/13456
Update a local copy of the PR:
$ git checkout pull/13456
$ git pull https://git.openjdk.org/jdk.git pull/13456/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13456
View PR using the GUI difftool:
$ git pr show -t 13456
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13456.diff
Webrev
Link to Webrev Comment