-
Notifications
You must be signed in to change notification settings - Fork 18k
x/crypto/ssh: data race if session.Stdout and Stderr are the same writer #5582
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
Labels
Milestone
Comments
I had a quick look this afternoon and although they share the same API, os/exec an ssh share a different underlying implementation. When os/exec detects that stdout and stderr are the same writer, it passes the pipe representing stdout to the underlying exec as stderr. ssh is a little different, we have two handlers for stdout and strerr, this goes all the way up to the channel level, and they are established quite early. The easiest thing will probably be to keep kr's singleWriter but make it internal. |
sarahhodne
added a commit
to travis-ci/worker
that referenced
this issue
Sep 22, 2015
Apparently there's a data race when stdout and stderr is the same writer: golang/go#5582. We're gonna attempt to work around it by letting the library generate pipes for both stdout and stderr and then using io.Copy to copy all of the data back to the log writer.
@hanwen @davecheney @rsc any thoughts on this bug? |
I'm pretty this is obsolete, but if you can repro a race, I can look into fixing it. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: