Page MenuHomePhabricator

Wait for the Git client to disconnect before exiting in Git SSH workflows
ClosedPublic

Authored by epriestley on Nov 11 2013, 5:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 2:04 PM
Unknown Object (File)
Wed, Apr 10, 5:55 AM
Unknown Object (File)
Fri, Apr 5, 9:04 PM
Unknown Object (File)
Fri, Apr 5, 9:04 PM
Unknown Object (File)
Fri, Apr 5, 8:40 PM
Unknown Object (File)
Fri, Apr 5, 8:14 PM
Unknown Object (File)
Feb 24 2024, 4:40 PM
Unknown Object (File)
Feb 14 2024, 5:18 PM
Subscribers

Details

Reviewers
btrahan
Maniphest Tasks
Restricted Maniphest Task
Commits
Restricted Diffusion Commit
rPa4e8fd228974: Wait for the Git client to disconnect before exiting in Git SSH workflows
Summary

Ref T2230. Very rarely, even though we've flushed the connection and sent all the data, we'll close the connection before Git is happy with it and it will flip out with an error like this:

fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

This is hard to reproduce because it depends on the order of read/write operations we can't directly control. I only saw it about 2% of the time, by just running git pull over and over again.

Waiting for Git to close its side of the connection seems to fix it.

Test Plan

Ran git clone a ton of times without seeing the error again. Ran git push a ton of times with new commits.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped