Skip to content
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

8273553: sun.security.ssl.SSLEngineImpl.closeInbound also has similar error of JDK-8253368 #1422

Closed
wants to merge 3 commits into from

Conversation

GoeLin
Copy link
Member

@GoeLin GoeLin commented Oct 9, 2022

I backport this for parity with 11.0.18-oracle.

I had to resolve closeInbound() in SSLEngineImpl.java because
"8221882: Use fiber-friendly java.util.concurrent.locks in JSSE"
is not in 11.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 2 Reviewers)

Issue

  • JDK-8273553: sun.security.ssl.SSLEngineImpl.closeInbound also has similar error of JDK-8253368

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1422

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 9, 2022

👋 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 openjdk bot changed the title Backport 0b09f70a730404ceb827673f1d3c82fbf495bb41 8273553: sun.security.ssl.SSLEngineImpl.closeInbound also has similar error of JDK-8253368 Oct 9, 2022
@openjdk
Copy link

openjdk bot commented Oct 9, 2022

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

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Oct 9, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 9, 2022

Webrevs

Copy link
Member

@MBaesken MBaesken left a comment

Choose a reason for hiding this comment

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

looks okay to me, but have you considered to change
src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java
in a way more close to jdk17 ?

public void closeInbound() throws SSLException {

try {
  ...
} finally {
    conContext.closeInbound();
}

?

@GoeLin
Copy link
Member Author

GoeLin commented Oct 11, 2022

You are right. In JDK-8253368, a try was added, too.

Copy link
Member

@MBaesken MBaesken left a comment

Choose a reason for hiding this comment

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

@openjdk
Copy link

openjdk bot commented Oct 11, 2022

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

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

8273553: sun.security.ssl.SSLEngineImpl.closeInbound also has similar error of JDK-8253368

Reviewed-by: mbaesken, mbalao

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

  • 16a4bd3: 8288599: com/sun/management/OperatingSystemMXBean/TestTotalSwap.java: Expected total swap size ... but getTotalSwapSpaceSize returned ...
  • 523ef55: 8282777: Create a Regression test for JDK-4515031
  • 957a888: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray
  • e864cfc: 8282778: Create a regression test for JDK-4699544
  • 74bc485: 8287091: aarch64 : guarantee(val < (1ULL << nbits)) failed: Field too big for insn
  • 31d178b: 8281297: TestStressG1Humongous fails with guarantee(is_range_uncommitted)
  • c064dce: 8274597: Some of the dnd tests time out and fail intermittently
  • 9ffc4b3: 8284752: Zero does not build on Mac OS X due to missing os::current_thread_enable_wx implementation
  • fb08d9d: 8282937: Write a regression test for JDK-4820080
  • 1d9108f: 8282345: handle latest VS2022 in abstract_vm_version
  • ... and 39 more: https://git.openjdk.org/jdk11u-dev/compare/9014a180dc9656099a89e597c4dba31a41b68ad1...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 openjdk bot added the ready Pull request is ready to be integrated label Oct 11, 2022
@GoeLin
Copy link
Member Author

GoeLin commented Oct 11, 2022

Hi,
I am not sure whether closeInbound() is needed if isInboundDone() is true.
I placed it according to https://github.com/openjdk/jdk17u-dev/blob/master/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java#L826
I don't think 8273553 will be backported, as it is a preparation for fibres / virtual threads.

@GoeLin
Copy link
Member Author

GoeLin commented Oct 12, 2022

@martinuy, I would appreciate if you also could have a look on this!

@martinuy
Copy link
Contributor

/reviewers 2 reviewer

@openjdk
Copy link

openjdk bot commented Oct 13, 2022

@martinuy
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 2 Reviewers).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Oct 13, 2022
Copy link
Contributor

@martinuy martinuy left a comment

Choose a reason for hiding this comment

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

Thanks @GoeLin for proposing this backport. Looks good to me.

I think that calling conContext.closeInbound as part of the finally block is right. I also prefer that refactorings related to fibers are done separately -if it's ever decided to backport them, which I doubt.

One very minor detail (optional): there is an extra space in "throw new SSLException". The only reason I might fix this is to grep text easier. I'd also indent the line below 8 spaces.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 13, 2022
@GoeLin
Copy link
Member Author

GoeLin commented Oct 13, 2022

Hi @martinuy, thanks for looking at this!

@GoeLin
Copy link
Member Author

GoeLin commented Oct 14, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Oct 14, 2022

Going to push as commit 243a55e.
Since your change was applied there have been 55 commits pushed to the master branch:

  • 58ac929: 8254976: Re-enable swing jtreg tests which were broken due to samevm mode
  • 6acfa07: 8244557: test/jdk/javax/swing/JTabbedPane/TestBackgroundScrollPolicy.java failed
  • 1ff1f0c: 8172269: When checking the default behaviour for a scroll tab layout and checking the 'opaque' checkbox, the area behind tabs is not red.
  • 7b3b204: 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative
  • fb364db: 8285921: serviceability/dcmd/jvmti/AttachFailed/AttachReturnError.java fails on Alpine
  • 8fadf3d: 8292158: AES-CTR cipher state corruption with AVX-512
  • 16a4bd3: 8288599: com/sun/management/OperatingSystemMXBean/TestTotalSwap.java: Expected total swap size ... but getTotalSwapSpaceSize returned ...
  • 523ef55: 8282777: Create a Regression test for JDK-4515031
  • 957a888: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray
  • e864cfc: 8282778: Create a regression test for JDK-4699544
  • ... and 45 more: https://git.openjdk.org/jdk11u-dev/compare/9014a180dc9656099a89e597c4dba31a41b68ad1...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 14, 2022

@GoeLin Pushed as commit 243a55e.

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

@GoeLin GoeLin deleted the goetz_backport_8273553 branch October 14, 2022 15:44
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
3 participants