-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
scp giving EOF and exit status 1 #8592
Comments
Addendum: this is not happening when using
|
#8405 looks similar and went in after 1.44.0 was released. It would be in the current https://pkgs.tailscale.com/unstable/ build. |
I believe this symptom occurred when scp runs in the "new style" mode (in which it is a wrapper around an sftp session), and I was able to work around it using |
Unfortunately, this is still broken in 1.44.2 😞 |
It was not expected to be fixed in 1.44.2, the fix is expected in 1.46.0. |
Still broken with 1.46.0 😞 |
In case it helps…
|
Alright, I'm able to reproduce on v1.46, but I had to do:
where the |
If the connection provided to sftp.NewServer is closed, Serve returns the io.EOF error verbatim from io.Reader.Read. This is an odd error since this is an expected situation, so we manually ignore io.EOF. This is somewhat buggy since the sftp package itself incorrectly reports io.EOF in cases where it should actually be reporting io.ErrUnexpectedEOF. See pkg/sftp#554 which patches Serve to return nil on clean closes and fixes buggy uses of io.ReadFull. Fixes #8592 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
Yes. For OpenSSH specifically (which covers the majority of SSH deployments at this point), there was a switch of the default at some relatively recent version. |
If the connection provided to sftp.NewServer is closed, Serve returns the io.EOF error verbatim from io.Reader.Read. This is an odd error since this is an expected situation, so we manually ignore io.EOF. This is somewhat buggy since the sftp package itself incorrectly reports io.EOF in cases where it should actually be reporting io.ErrUnexpectedEOF. See pkg/sftp#554 which patches Serve to return nil on clean closes and fixes buggy uses of io.ReadFull. Fixes #8592 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
If the connection provided to sftp.NewServer is closed, Serve returns the io.EOF error verbatim from io.Reader.Read. This is an odd error since this is an expected situation, so we manually ignore io.EOF. This is somewhat buggy since the sftp package itself incorrectly reports io.EOF in cases where it should actually be reporting io.ErrUnexpectedEOF. See pkg/sftp#554 which patches Serve to return nil on clean closes and fixes buggy uses of io.ReadFull. Fixes #8592 Signed-off-by: Joe Tsai <joetsai@digital-static.net> (cherry picked from commit bb4b35e)
If the connection provided to sftp.NewServer is closed, Serve returns the io.EOF error verbatim from io.Reader.Read. This is an odd error since this is an expected situation, so we manually ignore io.EOF. This is somewhat buggy since the sftp package itself incorrectly reports io.EOF in cases where it should actually be reporting io.ErrUnexpectedEOF. See pkg/sftp#554 which patches Serve to return nil on clean closes and fixes buggy uses of io.ReadFull. Fixes #8592 Signed-off-by: Joe Tsai <joetsai@digital-static.net> (cherry picked from commit bb4b35e)
Confirmed fixed in 1.46.1. Thanks! |
If the connection provided to sftp.NewServer is closed, Serve returns the io.EOF error verbatim from io.Reader.Read. This is an odd error since this is an expected situation, so we manually ignore io.EOF. This is somewhat buggy since the sftp package itself incorrectly reports io.EOF in cases where it should actually be reporting io.ErrUnexpectedEOF. See pkg/sftp#554 which patches Serve to return nil on clean closes and fixes buggy uses of io.ReadFull. Fixes tailscale#8592 Signed-off-by: Joe Tsai <joetsai@digital-static.net> Signed-off-by: Alex Paguis <alex@windscribe.com>
What is the issue?
When using
scp
, files are transferring correctly, but I'm seeing "EOF" printed, and the exit status is 1.This seems to be a similar issue to #6054, but I'm using a version of tailscale that should include that fix.
Steps to reproduce
Are there any recent changes that introduced the issue?
No response
OS
Linux, macOS
OS version
MacOS 13.4.1, Ubuntu lunar
Tailscale version
1.44.0
Other software
No response
Bug report
BUG-81de7171c9e0067342e4f496695f36375a66716b746a105ef7adbc1a3cb0677f-20230712125627Z-e136de65bfae2555
The text was updated successfully, but these errors were encountered: