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

8284892: java/net/httpclient/http2/TLSConnection.java fails intermittently #8249

Closed
wants to merge 2 commits into from

Conversation

dfuch
Copy link
Member

@dfuch dfuch commented Apr 14, 2022

java/net/httpclient/http2/TLSConnection.java has been observed failing (even though rarely) in test jobs.

The issue is that the handler used on the the server sides maintains a volatile sslSession field which it sets when receiving a request, so that the client can check which SSLParameters were negotiated after receiving the response.
However that field is set a little too late: after writing the request body bytes. This means that sometimes the client is able to receive the last byte before the server has updated the field, and can observe the previous value, which was set by the previous request. Checking of SSL parameters on the client side then usually fails, as it is looking at the wrong session.

The proposed fix is very simple: just update the sslSession field a little earlier - before writing the response.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8284892: java/net/httpclient/http2/TLSConnection.java fails intermittently

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8249/head:pull/8249
$ git checkout pull/8249

Update a local copy of the PR:
$ git checkout pull/8249
$ git pull https://git.openjdk.java.net/jdk pull/8249/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8249

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8249.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 14, 2022

👋 Welcome back dfuchs! 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 added the rfr Pull request is ready for review label Apr 14, 2022
@openjdk
Copy link

openjdk bot commented Apr 14, 2022

@dfuch The following label will be automatically applied to this pull request:

  • net

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the net net-dev@openjdk.org label Apr 14, 2022
@mlbridge
Copy link

mlbridge bot commented Apr 14, 2022

Webrevs

Copy link
Member

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

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

Looks fine to me.

Copy link
Member

@Michael-Mc-Mahon Michael-Mc-Mahon left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk
Copy link

openjdk bot commented Apr 15, 2022

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

8284892: java/net/httpclient/http2/TLSConnection.java fails intermittently

Reviewed-by: djelinski, jpai, michaelm

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

  • ea0706d: 8284863: riscv: missing side effect for result in instruct vcount_positives
  • d970820: 8284796: sun.security.ssl.Finished::toString misses a line feed in the message format pattern
  • d41331e: 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues
  • 3084921: 8284894: Fix typos in langtools
  • fbb0916: 8283892: Compress and expand bits
  • 160eb2b: 8284891: Fix typos in build system files

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 added the ready Pull request is ready to be integrated label Apr 15, 2022
@dfuch
Copy link
Member Author

dfuch commented Apr 15, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Apr 15, 2022

Going to push as commit 1e22c70.
Since your change was applied there have been 7 commits pushed to the master branch:

  • 510003c: 8042380: Test javax/swing/JFileChooser/4524490/bug4524490.java fails with InvocationTargetException
  • ea0706d: 8284863: riscv: missing side effect for result in instruct vcount_positives
  • d970820: 8284796: sun.security.ssl.Finished::toString misses a line feed in the message format pattern
  • d41331e: 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues
  • 3084921: 8284894: Fix typos in langtools
  • fbb0916: 8283892: Compress and expand bits
  • 160eb2b: 8284891: Fix typos in build system files

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 15, 2022

@dfuch Pushed as commit 1e22c70.

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

Copy link
Contributor

@bradfordwetmore bradfordwetmore left a comment

Choose a reason for hiding this comment

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

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated net net-dev@openjdk.org
5 participants