-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8317808: HTTP/2 stream cancelImpl may leave subscriber registered #16144
Conversation
👋 Welcome back dfuchs! A progress list of the required criteria for merging this PR into |
Webrevs
|
} | ||
return true; | ||
return false; | ||
} |
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.
Is this change here actually part of the fix, or something else that needed to be fixed?
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.
A bit of both. I was looking at why the subscriber didn't get properly unregistered and stumbled on this small issue. Tests showed that it wasn't sufficient to fix the issue so I continued debugging.
The semantics of the method is that it should return true
only if the subscriber was added to the list, so it really should have returned false
here, and true
only if subscribers.add
was called and returned true
.
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.
Seems straight forward. LGTM
@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:
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 42 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 |
/integrate |
Going to push as commit 6273ab9.
Your commit was automatically rebased without conflicts. |
Some of the ThrowingSubscriberXxx tests (typically those that use a streaming body) have been observed failing intermittently (though rarely) in timeout. The error message printed at the end showed that some HTTP/2 stream subscribers had not been properly deregistered when an exception was thrown in GET_BODY.
The issue appears to be a race condition between
cancelImpl
andschedule
where the schedulersched
may get stopped before the subscriber is exceptionally completed.A simple fix is to ensure that
cancelImpl
will complete the subscriber, if needed.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16144/head:pull/16144
$ git checkout pull/16144
Update a local copy of the PR:
$ git checkout pull/16144
$ git pull https://git.openjdk.org/jdk.git pull/16144/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 16144
View PR using the GUI difftool:
$ git pr show -t 16144
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16144.diff
Webrev
Link to Webrev Comment