Skip to content

8293562: KeepAliveCache Blocks Threads while Closing Connections #1890

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

PoojaDP-23
Copy link

@PoojaDP-23 PoojaDP-23 commented May 22, 2023

fix: https://bugs.openjdk.org/browse/JDK-8293562


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

Issue

  • JDK-8293562: KeepAliveCache Blocks Threads while Closing Connections (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1890

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

Using diff file

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

Webrev

Link to Webrev Comment

Pooja-DP added 2 commits May 12, 2023 00:10
Signed-off-by: Pooja.D.P <Pooja.D.P1@ibm.com>
Signed-off-by: Pooja.D.P <Pooja.D.P1@ibm.com>
@bridgekeeper
Copy link

bridgekeeper bot commented May 22, 2023

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

Signed-off-by: Pooja.D.P <Pooja.D.P1@ibm.com>
@PoojaDP-23 PoojaDP-23 changed the title KeepAliveCache Blocks Threads while Closing Connections. JDK-8293562: KeepAliveCache Blocks Threads while Closing Connections. May 22, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label May 22, 2023
@mlbridge
Copy link

mlbridge bot commented May 22, 2023

Webrevs

@jerboaa
Copy link
Contributor

jerboaa commented May 22, 2023

Seems a duplicate of #1825

@alograg
Copy link

alograg commented May 24, 2023

Hi @PoojaDP-23,
I was working on the backporting of the fix. #1825
But after the @jerboaa reviews, I realized that your code is closer to the original fix commit than the mine.
I offer you all my support, I remain at your disposal.

@jerboaa
Copy link
Contributor

jerboaa commented May 24, 2023

@PoojaDP-23 Please use Backport 03f25a9c6924430ec4063b801b2b6ca55b9067c9 as the PR title so that bots recognize it as a backport. Also, please enable Github Action testing on your fork.

@PoojaDP-23
Copy link
Author

Hi @PoojaDP-23, I was working on the backporting of the fix. #1825 But after the @jerboaa reviews, I realized that your code is closer to the original fix commit than the mine. I offer you all my support, I remain at your disposal.

Thanks

@PoojaDP-23 PoojaDP-23 changed the title JDK-8293562: KeepAliveCache Blocks Threads while Closing Connections. Backport 03f25a9c6924430ec4063b801b2b6ca55b9067c9 May 25, 2023
@openjdk openjdk bot changed the title Backport 03f25a9c6924430ec4063b801b2b6ca55b9067c9 8293562: KeepAliveCache Blocks Threads while Closing Connections May 25, 2023
@openjdk
Copy link

openjdk bot commented May 25, 2023

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

@openjdk openjdk bot added the backport label May 25, 2023
@jerboaa
Copy link
Contributor

jerboaa commented May 25, 2023

@PoojaDP-23 Please also merge latest master tree into the PR branch so as to trigger GHA checks for this PR. Thanks!

@PoojaDP-23
Copy link
Author

@jerboaa - Yes, I have enabled Github Action testing on my fork

@PoojaDP-23
Copy link
Author

PoojaDP-23 commented May 30, 2023

@jerboaa - I have performed below steps to merge latest master into PR branch. Could you please take a look?

git checkout master
git pull https://github.com/openjdk/jdk11u-dev master
git checkout <Your_BRANCH_NAME>
git merge master
git push origin HEAD

@alograg
Copy link

alograg commented Jun 9, 2023

Hi @jerboaa
Can you do the review ?
Thrnaks,

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

This seems OK to me. A few minor comments. What testing have you done?

@@ -268,8 +290,8 @@ private void readObject(ObjectInputStream stream)
}
}

/* FILO order for recycling HttpClients, should run in a thread
* to time them out. If > maxConns are in use, block.
/* LIFO order for reusing HttpClients. Most recent entries at the front.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Extraneous space in front of /*.

"Wait for second request was interrupted"));
}
} else {
System.out.println("name of the thread" +threadName);
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't part of the original change. Please remove.

"Close invoked from unexpected thread"));
}
System.out.println("Connection closed");
System.out.println(threadName);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here. Extraneous debug println()?

@darinhoward
Copy link

darinhoward commented Jun 15, 2023

The docs at https://www.oracle.com/java/technologies/javase/11-0-17-relnotes.html indicate this fix was done in 11.0.17.0.3. I'm assuming this is in error based on this PR still being open.

@alograg
Copy link

alograg commented Jun 16, 2023

Hi @darinhoward
The bug is fixed in version JDK 11.0.17.0.3 (Oracle) not in OpenJDK 11.0.17

@jerboaa
Copy link
Contributor

jerboaa commented Jun 16, 2023

The docs at https://www.oracle.com/java/technologies/javase/11-0-17-relnotes.html indicate this fix was done in 11.0.17.0.3. I'm assuming this is in error based on this PR still being open.

Yes, those are Oracle JDK release notes. This PR is for OpenJDK.

Signed-off-by: Pooja.D.P <Pooja.D.P1@ibm.com>
@PoojaDP-23
Copy link
Author

@jerboaa - I have addressed review comments and I have enabled GHA actions to test and I have separately run the testcase "B8293562.java" with(passes) and without(fails) the fix to test these changes. Thanks

@openjdk
Copy link

openjdk bot commented Jun 19, 2023

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

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

8293562: KeepAliveCache Blocks Threads while Closing Connections

Reviewed-by: sgehwolf

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

  • 2cc4596: 8293858: Change PKCS7 code to use default SecureRandom impl instead of SHA1PRNG
  • c1f759e: 8305815: Update Libpng to 1.6.39
  • d981db8: 8255348: NPE in PKIXCertPathValidator event logging code
  • d5d3981: 8297523: Various GetPrimitiveArrayCritical miss result - NULL check
  • 0b7efe4: 8023980: JCE doesn't provide any class to handle RSA private key in PKCS#1
  • 09685c8: 8155246: Throw error if default java.security file is missing
  • c1939dd: 8260274: Cipher.init(int, key) does not use highest priority provider for random bytes
  • d7701cd: 8242897: KeyFactory.generatePublic( x509Spec ) failed with java.security.InvalidKeyException
  • ad283ae: 8268457: XML Transformer outputs Unicode supplementary character incorrectly to HTML
  • c1bb926: 8309138: Fix container tests for jdks with symlinked conf dir
  • ... and 29 more: https://git.openjdk.org/jdk11u-dev/compare/9eded681616aa0f926001dc93e4f397512ad0cd4...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 (@jerboaa) 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 openjdk bot added the ready Pull request is ready to be integrated label Jun 19, 2023
@PoojaDP-23
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jun 19, 2023
@openjdk
Copy link

openjdk bot commented Jun 19, 2023

@PoojaDP-23
Your change (at version 0e9c050) is now ready to be sponsored by a Committer.

@jerboaa
Copy link
Contributor

jerboaa commented Jun 19, 2023

@PoojaDP-23 Please only integrate once you have approval from maintainers for this release. See Step 6 in https://wiki.openjdk.org/display/JDKUpdates/How+to+contribute+or+backport+a+fix

@PoojaDP-23
Copy link
Author

/label

@openjdk
Copy link

openjdk bot commented Jun 21, 2023

@PoojaDP-23 Usage: /label <add|remove> [label[, label, ...]] or /label [<+|->label[, <+|->label, ...]] where label is an additional classification that should be applied to this PR. These labels are valid:

@PoojaDP-23
Copy link
Author

@jerboaa - Could you please add the fix request to the jbs issue? Please let me know if there are any actions from my side. Thanks

@jerboaa
Copy link
Contributor

jerboaa commented Jun 22, 2023

@jerboaa - Could you please add the fix request to the jbs issue? Please let me know if there are any actions from my side. Thanks

Done. Please mention what extra testing of the patch you've done here (other than the regtest). Thanks!

@GoeLin
Copy link
Member

GoeLin commented Jun 22, 2023

Hi @PoojaDP-23
You should not integrate before you have the fix-yes label!!!

I assume JDK-8296438, which is listed as related issue, is a follow up.

@jerboaa
Copy link
Contributor

jerboaa commented Jun 22, 2023

Please check https://bugs.openjdk.org/browse/JDK-8296943 before this gets sponsored.

@PoojaDP-23
Copy link
Author

@GoeLin - Apologies for commenting integrate. @jerboaa - I have enabled GHA actions and also I have ran the TIER1 and TIER2 tests and all are passing and I have ran the jtreg test test/jdk/sun/net/www/http/KeepAliveCache/B8293562.java which passes with this fix and fails without the fix
TIER: 1
Test summary

   TEST                                              TOTAL  PASS  FAIL ERROR
   jtreg:test/hotspot/jtreg:tier1                     1482  1482     0     0
   jtreg:test/jdk:tier1                               1881  1881     0     0
   jtreg:test/langtools:tier1                         3934  3934     0     0
   jtreg:test/nashorn:tier1                              0     0     0     0
   jtreg:test/jaxp:tier1                                 0     0     0     0

TEST SUCCESS

TIER: 2
Test summary

 TEST                                              TOTAL  PASS  FAIL ERROR
 jtreg:test/hotspot/jtreg:tier2                      325   325     0     0
 jtreg:test/jdk:tier2                               3468  3468     0     0
 jtreg:test/langtools:tier2                           11    11     0     0
 jtreg:test/nashorn:tier2                             36    36     0     0
 jtreg:test/jaxp:tier2                               440   440     0     0

TEST SUCCESS

@PoojaDP-23
Copy link
Author

@jerboaa - I have checked https://bugs.openjdk.org/browse/JDK-8296943 and I have validated the test sun/net/www/http/HttpClient/MultiThreadTest.java with this fix and test is passing. Please take a look on below screenshot.

Java-version:
image

Test-result
image

@jerboaa
Copy link
Contributor

jerboaa commented Jun 27, 2023

OK, thanks!

@jerboaa
Copy link
Contributor

jerboaa commented Jun 27, 2023

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 27, 2023

Going to push as commit 770c1f6.
Since your change was applied there have been 70 commits pushed to the master branch:

  • ccbb928: 8260878: com/sun/jdi/JdbOptions.java fails without jfr
  • 193dc76: 8259796: timed CompletableFuture.get may swallow InterruptedException
  • 97c07a1: 8234808: jdb quoted option parsing broken
  • 5506ecf: 8254350: CompletableFuture.get may swallow InterruptedException
  • cc88f4c: 8303511: C2: assert(get_ctrl(n) == cle_out) during unrolling
  • 4dd85cb: 8297587: Upgrade JLine to 3.22.0
  • e0b98bc: 8292033: Move jdk.X509Certificate event logic to JCA layer
  • b2e04df: 8289508: Improve test coverage for XPath Axes: ancestor, ancestor-or-self, preceding, and preceding-sibling
  • 7f1047e: 8297955: LDAP CertStore should use LdapName and not String for DNs
  • 4a7557e: 8236045: [TESTBUG] MismatchedWhiteBox test fails with missing WhiteBox$WhiteBoxPermission.class
  • ... and 60 more: https://git.openjdk.org/jdk11u-dev/compare/9eded681616aa0f926001dc93e4f397512ad0cd4...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 27, 2023
@openjdk openjdk bot closed this Jun 27, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jun 27, 2023
@openjdk
Copy link

openjdk bot commented Jun 27, 2023

@jerboaa @PoojaDP-23 Pushed as commit 770c1f6.

💡 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 integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

6 participants