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

Re: [PATCH 2/2] daemon: graceful shutdown of client connection

From
Kim Gybels <kgybels@infogroep.be>
Date
Apr 15, 2018, 20:21 UTC
Message-ID
<20180415202122.GA4657@infogroep.be>
In-Reply-To
<nycvar.QRO.7.76.6.1804131440100.65@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
On (13/04/18 15:03), Johannes Schindelin wrote:
> I wonder whether you found a reliable way to trigger this? It would be
> nice to have a regression test for this.

On my system, it reproduced reliably using Oleg's example [1], below is my bash version of it.

Script to generate repository with some history:
  $ cat example.sh
  #!/bin/bash
  
  git init example
  cd example
  
  git --help > foo.txt
  
  for i in $(seq 1 12); do
      cat foo.txt foo.txt > bar.txt
      mv bar.txt foo.txt
      git add foo.txt
      git commit -m v$i
  done
  
  $ ./example.sh
  Initialized empty Git repository in C:/git/bug/example/.git/
  [master (root-commit) 2e44b4a] v1
   1 file changed, 84 insertions(+)
   create mode 100644 foo.txt
  [master 9791332] v2
   1 file changed, 84 insertions(+)
  [master 524e672] v3
   1 file changed, 168 insertions(+)
  [master afec6ef] v4
   1 file changed, 336 insertions(+)
  [master 1bcd9cc] v5
   1 file changed, 672 insertions(+)
  [master 2f38a8e] v6
   1 file changed, 1344 insertions(+)
  [master 33382fe] v7
   1 file changed, 2688 insertions(+)
  [master 6c2cbd6] v8
   1 file changed, 5376 insertions(+)
  [master 8d0770f] v9
   1 file changed, 10752 insertions(+)
  [master 517d650] v10
   1 file changed, 21504 insertions(+)
  [master 9e12406] v11
   1 file changed, 43008 insertions(+)
  [master 4c4f600] v12
   1 file changed, 86016 insertions(+)
Server side:
  $ git daemon --verbose --reuseaddr --base-path=$(pwd) --export-all
  [4760] Ready to rumble
  [696] Connection from 127.0.0.1:2054
  [696] unable to set SO_KEEPALIVE on socket: No such file or directory
  [696] Extended attribute "host": 127.0.0.1
  [696] Request upload-pack for '/example'
Client side:
  $ git clone git://127.0.0.1/example
  Cloning into 'example'...
  remote: Counting objects: 36, done.
  remote: Compressing objects: 100% (24/24), done.
  fatal: read error: Invalid argument
  fatal: early EOF
  fatal: index-pack failed
System information:
  $ git --version --build-options
  git version 2.17.0.windows.1
  cpu: x86_64
  built from commit: e7621d891d081acff6acd1f0ba6ae0adce06dd09
  sizeof-long: 4
  
  $ cmd.exe /c ver
  
  Microsoft Windows [Version 10.0.16299.371]

Best regards, Kim

[1] https://github.com/git-for-windows/git/issues/304#issuecomment-274266897
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 14 of 15 in “Fix early EOF with GfW daemon”
  1. 0/2 Fix early EOF with GfW daemonKim Gybels, Apr 12, 2018
  2. 1/2 daemon: use timeout for uninterruptible pollKim Gybels, Apr 12, 2018
  3. Johannes SchindelinApr 13, 2018
  4. Kim GybelsApr 15, 2018
  5. Johannes SchindelinApr 18, 2018
  6. Junio C HamanoApr 15, 2018
  7. Junio C HamanoApr 15, 2018
  8. Johannes SchindelinApr 18, 2018
  9. Junio C HamanoApr 18, 2018
  10. Kim GybelsApr 19, 2018
  11. Junio C HamanoApr 19, 2018
  12. 2/2 daemon: graceful shutdown of client connectionKim Gybels, Apr 12, 2018
  13. Johannes SchindelinApr 13, 2018
  14. Kim GybelsApr 15, 2018
  15. Johannes SchindelinApr 18, 2018

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.