-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Data race in SetDeadline #86
Comments
Hey @jjiang-stripe! Thanks for taking the time to report this. It does make sense to enable race-detection in tests and fix any failures. I will pick this up unless you want to - or someone else. |
i have tested the fix against the code sample https://github.com/jjiang-stripe/proxyproto-race/blob/master/main.go |
Fixed by #87! Thanks a lot for reporting @jjiang-stripe and bow to you @mschneider82 for another sweet contribution! |
|
Hello!
I have a test that runs with the
-race
flag that started to fail with v0.6.1. I've created a minimal repro here: https://github.com/jjiang-stripe/proxyproto-race/blob/master/main.goThat example is just running a super basic SSH server and client and it looks like Go's SSH server's running into a race when trying to update deadlines in its
readLoop
andkexLoop
goroutines:I believe this was introduced in #76 because there's a local variable being set in
SetDeadline()
.Unfortunately I'm not familiar enough with what's going on here to tell if this is actually an issue or propose a fix beyond maybe throwing a lock in there. I'd appreciate a fix here (or if this isn't actually a concern, an explanation would be nice).
Happy to provide more details, but given that I'm in very unfamiliar territory, I'm not sure how much help I can be 😅
The text was updated successfully, but these errors were encountered: