Homec4science

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

Authored by epriestley <git@epriestley.com> on Nov 11 2013, 21:27.

Description

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.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2230

Differential Revision: https://secure.phabricator.com/D7558

Details

Committed
epriestley <git@epriestley.com>Nov 11 2013, 21:27
Pushed
aubortJan 31 2017, 17:16
Parents
rPH85f505465e53: Support serving SVN repositories over SSH
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHa4e8fd228974: Wait for the Git client to disconnect before exiting in Git SSH workflows (authored by epriestley <git@epriestley.com>).Nov 11 2013, 21:27