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

8290083: ResponseBodyBeforeError: AssertionError or SSLException: Unsupported or unrecognized SSL message #9454

Closed
wants to merge 2 commits into from

Conversation

dfuch
Copy link
Member

@dfuch dfuch commented Jul 11, 2022

Please find enclosed a simple test fix.
This test has been observed failing once with an SSLException. My suspicion is that some random process (other test or ...) has tried to connect to the test ReplyingServer and sent some plain text that failed the handshake.

The fix hardens the server to close the connection and proceed to accept the next one, for a limited number of times...


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-8290083: ResponseBodyBeforeError: AssertionError or SSLException: Unsupported or unrecognized SSL message

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9454/head:pull/9454
$ git checkout pull/9454

Update a local copy of the PR:
$ git checkout pull/9454
$ git pull https://git.openjdk.org/jdk pull/9454/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9454

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9454.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 11, 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 changed the title 8290083 8290083: ResponseBodyBeforeError: javax.net.ssl.SSLException: Unsupported or unrecognized SSL message Jul 11, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 11, 2022
@openjdk
Copy link

openjdk bot commented Jul 11, 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 Jul 11, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 11, 2022

Webrevs

@@ -346,7 +346,9 @@ protected ServerSocket newServerSocket() throws IOException {

@Override
public void run() {
int maxUnexpected = 2;
Copy link
Member

Choose a reason for hiding this comment

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

Hello Daniel, should we have this maxUnexpected at all? Perhaps, we keep accepting and ignoring connections/requests that don't match our expectations? The reason I ask this is, I don't think we will know the exact number of unexpected requests/connections that this server might receive when this test is going on, so with this value of 2, I guess there still would be a chance that this test fails because of those unexpected connections?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a good question. I believe this only happens occasionally, and if it happens more than once in the same test run then maybe it needs further diagnosis. That said - it's possible the rogue client will retry - so maybe we should increase the limit? My reasoning was that if the client side of the test was changed in the future to cause similar failures we might want the server to complain and see the full stack trace.

Copy link
Member Author

@dfuch dfuch Jul 12, 2022

Choose a reason for hiding this comment

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

I have increased the limit to 10

@dfuch dfuch changed the title 8290083: ResponseBodyBeforeError: javax.net.ssl.SSLException: Unsupported or unrecognized SSL message 8290083: ResponseBodyBeforeError: AssertionError or SSLException: Unsupported or unrecognized SSL message Jul 12, 2022
@openjdk
Copy link

openjdk bot commented Jul 12, 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:

8290083: ResponseBodyBeforeError: AssertionError or SSLException: Unsupported or unrecognized SSL message

Reviewed-by: jpai

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

  • f42dab8: 8289853: Update HarfBuzz to 4.4.1
  • 21db9a5: 8290065: [JVMCI] only check HotSpotCompiledCode stream is empty if installation succeeds
  • c79baaa: Merge
  • cb6e9cb: 8290004: [PPC64] JfrGetCallTrace: assert(_pc != nullptr) failed: must have PC
  • 0494291: 8289692: JFR: Thread checkpoint no longer enforce mutual exclusion post Loom integration
  • 25f4b04: 8289894: A NullPointerException thrown from guard expression
  • b542bcb: 8289729: G1: Incorrect verification logic in G1ConcurrentMark::clear_next_bitmap
  • c86c51c: 8282071: Update java.xml module-info
  • 9981c85: 8290033: ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode
  • c142fbb: 8289697: buffer overflow in MTLVertexCache.m: MTLVertexCache_AddGlyphQuad
  • ... and 12 more: https://git.openjdk.org/jdk/compare/0c37008917789e7b631b5c18e6f54454b1bfe038...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 Jul 12, 2022
@dfuch
Copy link
Member Author

dfuch commented Jul 12, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jul 12, 2022

Going to push as commit 3b9059a.
Since your change was applied there have been 22 commits pushed to the master branch:

  • f42dab8: 8289853: Update HarfBuzz to 4.4.1
  • 21db9a5: 8290065: [JVMCI] only check HotSpotCompiledCode stream is empty if installation succeeds
  • c79baaa: Merge
  • cb6e9cb: 8290004: [PPC64] JfrGetCallTrace: assert(_pc != nullptr) failed: must have PC
  • 0494291: 8289692: JFR: Thread checkpoint no longer enforce mutual exclusion post Loom integration
  • 25f4b04: 8289894: A NullPointerException thrown from guard expression
  • b542bcb: 8289729: G1: Incorrect verification logic in G1ConcurrentMark::clear_next_bitmap
  • c86c51c: 8282071: Update java.xml module-info
  • 9981c85: 8290033: ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode
  • c142fbb: 8289697: buffer overflow in MTLVertexCache.m: MTLVertexCache_AddGlyphQuad
  • ... and 12 more: https://git.openjdk.org/jdk/compare/0c37008917789e7b631b5c18e6f54454b1bfe038...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jul 12, 2022

@dfuch Pushed as commit 3b9059a.

💡 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
integrated Pull request has been integrated net net-dev@openjdk.org
2 participants