-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Fix memory leak in HTTP request security handshake cancellation #28971
Conversation
Is there any way we can add a test for this? |
Outside of finding the right concurrency settings in the test to tickle the race more frequently, we could probably coordinate the race with a mock channel creds. I haven't gotten to that yet but I'll look into that. |
You probably don't need a mock channel creds, just a mock handshaker. You can register a handshaker directly without going through channel creds (example). |
I put together the mock handshake approach, but I realized that the handshake manager also has shutdown logic which needed to be overridden too, in order to trigger the race. I went with a different approach which I think winds up being simpler. PTAL |
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.
Looks great!
failures are pre-existing |
The caller of the Handshake API, owns output arguments if the handshake completes successfully. So there's currently a potential race where a handshake completion can be scheduled successfully but the HTTP request is cancelled before the completion runs.
b/220992477