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
fatal: sha1 file '<stdout>' write error: Broken Pipe #2428
Comments
Can you run with |
@technoweenie The total upload time of LFS objects was 22 minute, is there some SSH connections during the upload of LFS? Will this be the cause of SSH timeout? I ran |
Git LFS calls For example, if you're using GitHub, you could set it up like this: $ git remote add origin git@github.com:user/repo
$ git config remote.origin.lfsurl "https://github.com/user/repo.git/info/lfs" This way Git will use SSH, while LFS will use HTTPS. Seems complicated though, but it's an option. |
I did a test: uninstalled the
Is the case of |
I agree with this. I think the idea is that the SSH connection, which is being opened by LFS to authenticate and then not used for 20 minutes while the objects are uploaded ends up getting closed by your ssh-agent. I think there are two things we could do here:
That commit only works during @peff what do you think? |
Right, modulo s/LFS/Git/ in the first sentence (which I think then matches the rest of your comment). We have to do it that way because Git can't kick off the It's not clear to me what is killing the ssh connection. It could be that something at the network level is unhappy with the idle TCP connection. This could be GitHub-side reverse proxies, or just some firewall in the path. Increasing the frequency of ssh keepalives could help here. But it could also be an application-level timeout above the ssh layer. Git by default doesn't have any timeouts waiting for the incoming packfile, but not all servers terminate directly at actual C Git. GitHub terminates at a custom proxy layer with its own timeouts, I'm not sure what JGit does, and I have no clue what other hosts like GitLab or Atlassian do. An ssh keep-alive won't help there; you'd need something to tell the application layer that we're still chugging. The right solution is to have Git send application-level keepalives while the pre-push hook is running, to tell the other side that yes, we really are doing useful work and it should keep waiting. But implementing that is going to be hard. The existing keep-alives could be hacked into the protocol only because the sender in those cases was sending sideband-encoded data. So we can send empty sideband-0 packets. But in the phase that would need keep-alives here, the next thing to happen is the client sending the ref-update pktlines. Those are in pktline format, but there's no sideband byte. And while technically a server can distinguish between a flush packet ("0000") and an empty pktline ("0004"), existing implementations don't (and wouldn't know what to do with an empty pktline at this stage anyway). So you'd need a protocol extension to Git, that would work something like:
The only option I could come up with to hack a noop into the existing protocol was by sending meaningless So I don't think there's really anything for LFS to do here. The issue is in Git, and would apply to other long-running In the meantime, the obvious workarounds are:
|
Ah, you caught my mistake! I originally thought this was an LFS problem, and started typing my comment with that assumption. It looks like I forgot to update part of it.
@peff good idea. @canyou2014, this is possible via |
git push via ssh, I got this error Delta compression using up to 8 threads. |
@KavinduGayan The "broken pipe" on the client side generally just means that the server hung up the connection in the middle of the push. In your case, I think the interesting error is the |
Thanks, @peff. I agree with your comment above and thusly think that this is an unrelated issue. I am going to close it for now. |
fatal: the remote end hung up unexpectedly |
Hey, This is a Git error, not a Git LFS error, and would indicate that the remote side hung up unexpectedly. You should look at seeing why that would be: perhaps you have a bad connection, or something in between Git and the remote side (e.g., a firewall, antivirus, or proxy) is causing problems. |
git push
via SSH and returned this error:The text was updated successfully, but these errors were encountered: