-
Notifications
You must be signed in to change notification settings - Fork 5.9k
8334670: SSLSocketOutputRecord buffer miscalculation #19862
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
Conversation
👋 Welcome back ascarpino! A progress list of the required criteria for merging this PR into |
@ascarpino 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:
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 136 new commits pushed to the
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 |
@ascarpino The following label will be automatically applied to this pull request:
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. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for fixing this!
In order to test this fix, we would need to trigger a situation where count != position
, and it seems to be impossible, because we flush after every single message. We don't need to flush that often; I'll log a ticket for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think this line needs to be changed too.
@@ -169,7 +169,8 @@ void encodeHandshake(byte[] source, | |||
for (int limit = (offset + length); offset < limit;) { | |||
|
|||
int remains = (limit - offset) + (count - position); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int remains = (limit - offset) + (count - position); | |
int remains = (limit - offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this and it caused a lockup in one of the tests. I see why your think this is the right change, but it isn't proving out in the testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's very interesting! Which test was it? Was it with or without #19465?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do run the tests layered on the current #19465, even though this PR is separate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sisahoo, thanks for making a comment in an OpenJDK project!
All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use "Add GitHub user sisahoo" for the summary.
If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.
- I agree to the OpenJDK Terms of Use for all comments I make in a project in the OpenJDK GitHub organization.
Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the change. LGTM.
Is it possible to add a Test?
I don't think it is possible; right now we flush after every handshake message. As a result, count == position
every time we enter this loop, so the change doesn't really change anything. The problem only surfaced in #19465, and only when multiple NewSessionTicket messages exceeding 16KB were sent without flushing.
/integrate |
Going to push as commit 07bc523.
Your commit was automatically rebased without conflicts. |
@ascarpino Pushed as commit 07bc523. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi,
I need a review to change the a fragment buffer size miscalculation error. This appears when there are large handshake messages and hasn't been observed during application data. This was found during testing of the NewSessionTicket change in JDK-8328608. There is no regression test as the failure hasn't shown to fail every time.
thanks
Tony
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19862/head:pull/19862
$ git checkout pull/19862
Update a local copy of the PR:
$ git checkout pull/19862
$ git pull https://git.openjdk.org/jdk.git pull/19862/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19862
View PR using the GUI difftool:
$ git pr show -t 19862
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19862.diff
Webrev
Link to Webrev Comment