-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
rpc: Handle closed error #100525
rpc: Handle closed error #100525
Conversation
We close the listener before closing the connection. This can result in a spurious failure due to the Listener also closing our connection. Epic: none Fixes: cockroachdb#100391 Fixes: cockroachdb#77754 Informs: cockroachdb#80034 Release note: None
d7cb57f
to
41288e1
Compare
I fixed the first issue ( I can run the test for >30min without failure with both of these fixes. |
// TODO(baptist): Better understand when this happens. It appears we can get | ||
// spurious connections to other tests on a stress run. This has been | ||
// happening for a while, but only comes out rarely when this package is | ||
// stressed. This test is very aggressive since it is calling GRPCDialNode in | ||
// a busy loop for 50ms. |
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 think this is a known problem. Test servers bind to port 0 to let the OS pick a random unused port, but as soon as we close it then a different test can be randomly assigned that very same port number, so if we later try to connect to that port we get unexpected results. This typically causes problems when we attempt to restart a stopped server reusing the same port number it was previously assigned, but someone else bound to it in the meanwhile.
bors r=erikgrinaker |
Build succeeded: |
We close the listener before closing the connection. This can result in a spurious failure due to the Listener also closing our connection.
Epic: none
Fixes: #100391
Fixes: #77754
Informs: #80034
Release note: None