git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Unable to clone via git protocol / early EOF / index-pack failed

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Mar 26, 2011, 17:58 UTC
Message-ID
<vpq8vw1epc1.fsf@bauges.imag.fr>
In-Reply-To
<loom.20110326T183100-349@post.gmane.org>
Holger Freyther <zecke@selfish.org> writes:
Show 23 quoted lines
> Holger Freyther <zecke <at> selfish.org> writes:
>
>
>> It is a bit difficult to track all the processes that get started and what they
>> should do and to figure out at which point the fd for the tcp socket is really
>> closed.
>
> If I do the below hack it is working fine. Adding a fflush(NULL).. or a
> close(fileno(stdout)).. fsync... sched_yield() is not fixing it though.
>
> diff --git a/upload-pack.c b/upload-pack.c
> index 72aa661..4cd12c9 100644
> --- a/upload-pack.c
> +++ b/upload-pack.c
> @@ -695,6 +695,8 @@ static void upload_pack(void)
>                 get_common_commits();
>                 create_pack_file();
>         }
> +
> +       sleep(1);
>  }
>  
>  int main(int argc, char **argv)

That reminds me an issue I had with git over SSH. The problem was indeed not Git-related:

  http://readlist.com/lists/securityfocus.com/secureshell/0/3071.html

In short, when sending 196481 bytes or more, _and_ if the server did not consume the data fast enough, then the connection was closed after 65536=2^16 bytes.

That was on RHEL, and upgrading the kernel solved the issue. Scary...
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Holger FreytherNext: Holger Freyther
Message 5 of 6 in “Unable to clone via git protocol / early EOF / index-pack failed”
  1. Harald WelteMar 24, 2011
  2. Harald WelteMar 24, 2011
  3. Holger FreytherMar 26, 2011
  4. Holger FreytherMar 26, 2011
  5. Matthieu MoyMar 26, 2011
  6. Holger FreytherMar 26, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.