jdk11u-dev icon indicating copy to clipboard operation
jdk11u-dev copied to clipboard

8305906: HttpClient may use incorrect key when finding pooled HTTP/2 connection for IPv6 address

Open varada1110 opened this issue 1 year ago • 27 comments

Hi all,

This pull request contains a backport of commit 43956686 from the openjdk/jdk17u-dev repository.

The commit being backported was authored by Jaikiran Pai on 16 Feb 2024 and was reviewed by Paul Hohensee.

Thanks!


Progress

  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue
  • [ ] JDK-8305906 needs maintainer approval

Issue

  • JDK-8305906: HttpClient may use incorrect key when finding pooled HTTP/2 connection for IPv6 address (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2531

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

Using diff file

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

Webrev

Link to Webrev Comment

varada1110 avatar Feb 19 '24 07:02 varada1110

:wave: Welcome back varadam! 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 Feb 19 '24 07:02 bridgekeeper[bot]

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

openjdk[bot] avatar Feb 19 '24 07:02 openjdk[bot]

Webrevs

mlbridge[bot] avatar Feb 19 '24 08:02 mlbridge[bot]

Hi @varada1110 , I think you don't need the test adaptions to SimpleSSLContext. But the test will not work with jtreg 6.1 as it uses jupiter code not in jtreg 6.1. Make sure your local tests for 11 use jtreg 6.1.

test/jdk/java/net/httpclient/http2/ConnectionReuseTest.java:41: error: package org.junit.jupiter.api does not exist import org.junit.jupiter.api.AfterAll;

GoeLin avatar Feb 26 '24 14:02 GoeLin

https://github.com/openjdk/jdk11u-dev/pull/2553 solves a similar issue.

GoeLin avatar Feb 26 '24 14:02 GoeLin

Thanks @GoeLin for pointing that out. I tested with wrong jtreg version. I will fix the errors.

varada1110 avatar Feb 27 '24 06:02 varada1110

Hi @GoeLin, can you please review the changes. Test is passing now with jtreg 6.1

varada1110 avatar Mar 11 '24 13:03 varada1110

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

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

8305906: HttpClient may use incorrect key when finding pooled HTTP/2 connection for IPv6 address

Reviewed-by: jpai, phh

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

  • 69f4ac1e0d61804b1bf306ee728a4de4397aeb47: 8240226: DeflateIn_InflateOut.java test incorrectly assumes size of compressed file
  • 4556aa9d5e42a4afbc6ea749b589d4442e311d24: 8317288: [macos] java/awt/Window/Grab/GrabTest.java: Press on the outside area didn't cause ungrab
  • 7b377ac0ba396d6a1ca4f80ada2520a7f2c56082: 8329013: StackOverflowError when starting Apache Tomcat with signed jar
  • 31a780d851236a143b7c86f9c7137b67803da9c9: 8276819: javax/print/PrintServiceLookup/FlushCustomClassLoader.java fails to free
  • c35d30d6fecabcb10cd2011fca39ddee219337b0: 8331263: Bump update version for OpenJDK: jdk-11.0.25
  • 47fd86ca1c51280629b9f2b86b659c91ffeee22a: 8273153: Consolidate file_exists into os:file_exists
  • 8a489e58b37611f4088efe19b2a43a9e54f7866d: 8293887: AArch64 build failure with GCC 12 due to maybe-uninitialized warning in libfdlibm k_rem_pio2.c
  • 35333744a8f3cf25c95ee691791b00098dde9a44: 8312194: test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_ec.java cannot handle empty modules
  • b7596f3f9d0b442628272459f3f22b3d36634967: 8316138: Add GlobalSign 2 TLS root certificates
  • b8ee2aa15ab538f5a0623b391e1c64e5e63e167a: 8326591: New test JmodExcludedFiles.java fails on Windows when --with-external-symbols-in-bundles=public is used
  • ... and 64 more: https://git.openjdk.org/jdk11u-dev/compare/8b8774d1c65b7535af579f9431a597f51db4f653...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@phohensee) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

openjdk[bot] avatar Mar 13 '24 19:03 openjdk[bot]

@jaikiran @GoeLin Could you please review the code? Thank you, Varada

varada1110 avatar Mar 19 '24 07:03 varada1110

@phohensee would you be able to take a look at this, as you reviewed the head PR as well.

offamitkumar avatar Apr 05 '24 11:04 offamitkumar

Thank you @jaikiran for reviewing the changes.

varada1110 avatar Apr 10 '24 06:04 varada1110

⚠️ @varada1110 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[bot] avatar Apr 11 '24 22:04 openjdk[bot]

GHA failures appear infrastructure related.

phohensee avatar Apr 11 '24 22:04 phohensee

/approval request org.junit.jupiter.api is not supported. Therefore, I have added the similar annotations supported by org.junit.*

varada1110 avatar Apr 15 '24 06:04 varada1110

@varada1110 usage: /approval [<id>] (request|cancel) [<text>]

openjdk[bot] avatar Apr 15 '24 06:04 openjdk[bot]

/approval request The GHA failures seems to be infrastructure-related issues.

no, this is not valid reason for the approval.

You need to mention "why" you want to backport this change, what issue you're fixing here ?

offamitkumar avatar Apr 15 '24 07:04 offamitkumar

use it like this : /approval JDK-8305906 request <your reason>

offamitkumar avatar Apr 15 '24 07:04 offamitkumar

/approval request org.junit.jupiter.api is not supported. Therefore, I have added the similar annotations supported by org.junit.*

@varada1110 I think instead of editing the comment you need to post a separate new comment, so that bot picks it up again.

offamitkumar avatar Apr 15 '24 09:04 offamitkumar

@offamitkumar Only the author (@varada1110) is allowed to issue the /approval command.

openjdk[bot] avatar Apr 15 '24 09:04 openjdk[bot]

@varada1110 8305906: The approval request has been created successfully.

openjdk[bot] avatar Apr 15 '24 09:04 openjdk[bot]

/approval JDK-8305906 request org.junit.jupiter.api is not supported. Therefore, I have added the similar annotations supported by org.junit.*

varada1110 avatar Apr 15 '24 09:04 varada1110

@varada1110 JDK-8305906: The approval request was already up to date.

openjdk[bot] avatar Apr 15 '24 09:04 openjdk[bot]

Hi @varada1110 please explain how you addressed the issues that came up in the 17u backport. Also explain how you tested to show the same issues don't surface in 11. Please rerun the GHA tests.

Also, we updated jtreg in the meantime. Your changes to the test are probably unnecessary now. Please check and undo them if possible.

GoeLin avatar Apr 16 '24 10:04 GoeLin

@varada1110 Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

openjdk[bot] avatar Apr 18 '24 09:04 openjdk[bot]

Hi @varada1110 please explain how you addressed the issues that came up in the 17u backport. Also explain how you tested to show the same issues don't surface in 11. Please rerun the GHA tests.

Also, we updated jtreg in the meantime. Your changes to the test are probably unnecessary now. Please check and undo them if possible.

Hi @GoeLin , initially with the lower jtreg version, org.junit.jupiter.api was not supported and I changed the test to use the supported junit annotations. With the updated jtreg version 7.3, test is passing with the same change made in jdk17u-dev.

varada1110 avatar Apr 18 '24 09:04 varada1110

Hi @GoeLin , Could you please review the code? All checks have passed and test is passing with updated jtreg

varada1110 avatar Apr 22 '24 09:04 varada1110

This PR is clean and can apply for maintainer approval.

TheRealMDoerr avatar May 17 '24 19:05 TheRealMDoerr

/approval JDK-8305906 request test is passing with updated jtreg and PR is clean.

varada1110 avatar Jun 03 '24 05:06 varada1110

@varada1110 JDK-8305906: The approval request has been updated successfully.

openjdk[bot] avatar Jun 03 '24 05:06 openjdk[bot]

/integrate

varada1110 avatar Jun 03 '24 10:06 varada1110