threads / discuss / 41780

git fails updating submodule only if --quiet is specified

Subject: git fails updating submodule only if --quiet is specified

## tl;dr

8 messages between Mar 22, 2016 and Mar 22, 2016.

replies: 7people: 3as markdown or json

Marcus T· Mar 22, 2016, 15:02 UTC · lore
Hello,
I’m running into a nasty issue where “git submodule update —init” fails if I add “—quiet”
Following you can find the output with GIT_TRACE=1:
WITHOUT --quiet:

GIT_TRACE=1 git submodule update --init --recursive 15:51:48.248945 git.c:561 trace: exec: 'git-submodule' 'update' '--init' '--recursive' 15:51:48.249023 run-command.c:334 trace: run_command: 'git-submodule' 'update' '--init' '--recursive' 15:51:48.256626 git.c:344 trace: built-in: git 'rev-parse' '--git-dir' 15:51:48.258494 git.c:344 trace: built-in: git 'rev-parse' '--git-path' 'objects' 15:51:48.260406 git.c:344 trace: built-in: git 'rev-parse' '-q' '--git-dir' 15:51:48.262940 git.c:344 trace: built-in: git 'rev-parse' '--show-prefix' 15:51:48.264156 git.c:344 trace: built-in: git 'rev-parse' '--show-toplevel' 15:51:48.266637 git.c:344 trace: built-in: git 'submodule--helper' 'list' '--prefix' '' 15:51:48.268074 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'buildroot' 15:51:48.269913 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.url' 15:51:48.271168 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.update' 15:51:48.272422 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'dl' 15:51:48.274179 git.c:344 trace: built-in: git 'config' 'submodule.dl.url' 15:51:48.275445 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.dl.update' 15:51:48.276779 git.c:344 trace: built-in: git 'submodule--helper' 'list' '--prefix' '' 15:51:48.278362 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'buildroot' 15:51:48.279819 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.url' 15:51:48.281192 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.branch' 15:51:48.282473 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.branch' 15:51:48.283788 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.update' 15:51:48.285269 git.c:344 trace: built-in: git 'submodule--helper' 'clone' '--prefix' '' '--path' 'buildroot' '--name' 'buildroot' '--url' 'git://git.busybox.net/buildroot' '' '' 15:51:48.285337 run-command.c:334 trace: run_command: 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' 15:51:48.285687 exec_cmd.c:120 trace: exec: 'git' 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' 15:51:48.286453 git.c:344 trace: built-in: git 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' Cloning into 'buildroot'... 15:51:49.177856 run-command.c:334 trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected' 15:51:49.178244 exec_cmd.c:120 trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected' 15:51:49.179806 git.c:344 trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected' remote: Counting objects: 200277, done. remote: Compressing objects: 100% (62420/62420), done. ...

WITH --quite:

GIT_TRACE=1 git submodule update --init --recursive --quiet 15:52:26.900568 git.c:561 trace: exec: 'git-submodule' 'update' '--init' '--recursive' '--quiet' 15:52:26.900652 run-command.c:334 trace: run_command: 'git-submodule' 'update' '--init' '--recursive' '--quiet' 15:52:26.907761 git.c:344 trace: built-in: git 'rev-parse' '--git-dir' 15:52:26.909877 git.c:344 trace: built-in: git 'rev-parse' '--git-path' 'objects' 15:52:26.911766 git.c:344 trace: built-in: git 'rev-parse' '-q' '--git-dir' 15:52:26.914279 git.c:344 trace: built-in: git 'rev-parse' '--show-prefix' 15:52:26.915488 git.c:344 trace: built-in: git 'rev-parse' '--show-toplevel' 15:52:26.917983 git.c:344 trace: built-in: git 'submodule--helper' 'list' '--prefix' '' 15:52:26.919504 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'buildroot' 15:52:26.921244 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.url' 15:52:26.922619 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.update' 15:52:26.923888 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'dl' 15:52:26.925650 git.c:344 trace: built-in: git 'config' 'submodule.dl.url' 15:52:26.926892 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.dl.update' 15:52:26.928230 git.c:344 trace: built-in: git 'submodule--helper' 'list' '--prefix' '' 15:52:26.929709 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'buildroot' 15:52:26.931220 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.url' 15:52:26.932597 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.branch' 15:52:26.933867 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.branch' 15:52:26.935170 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.update' 15:52:26.936660 git.c:344 trace: built-in: git 'submodule--helper' 'clone' '--quiet' '--prefix' '' '--path' 'buildroot' '--name' 'buildroot' '--url' 'git://git.busybox.net/buildroot' '' '' 15:52:26.936732 run-command.c:334 trace: run_command: 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' 15:52:26.936965 exec_cmd.c:120 trace: exec: 'git' 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' 15:52:26.937803 git.c:344 trace: built-in: git 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' 15:52:27.958503 run-command.c:334 trace: run_command: 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected' 15:52:27.958870 exec_cmd.c:120 trace: exec: 'git' 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected' 15:52:27.960447 git.c:344 trace: built-in: git 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected' fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed fatal: clone of 'git://git.busybox.net/buildroot' into submodule path 'buildroot' failed

--------- git --version git version 2.7.4

Any help in tracking down the reason for this would be greatly appreciated.

Thanks, Marcus

Marcus T· Mar 22, 2016, 15:51 UTC · re: Marcus T · lore

Re: git fails updating submodule only if --quiet is specified

I did a bunch more investigation:
My original problem was that it would work on a terminal, but not when running under jenkins.
Turns out the “-v” in the "index-pack” step is whats leading to the error.
I can reproduce the issue with the command "git submodule update --init --recursive > out.txt 2>&1"
It seems that the “-v” is dropped automatically by git if its not connected to a terminal.
This is only an issue for “git://“ urls. ssh and https seem to not be affected.
Show 87 quoted lines
> On 22 Mar 2016, at 16:02, Marcus T <maddimax@googlemail.com> wrote:
> 
> Hello,
> 
> I’m running into a nasty issue where “git submodule update —init” fails if I add “—quiet”
> 
> Following you can find the output with GIT_TRACE=1:
> 
> WITHOUT --quiet:
> 
> GIT_TRACE=1 git submodule update --init --recursive
> 15:51:48.248945 git.c:561               trace: exec: 'git-submodule' 'update' '--init' '--recursive'
> 15:51:48.249023 run-command.c:334       trace: run_command: 'git-submodule' 'update' '--init' '--recursive'
> 15:51:48.256626 git.c:344               trace: built-in: git 'rev-parse' '--git-dir'
> 15:51:48.258494 git.c:344               trace: built-in: git 'rev-parse' '--git-path' 'objects'
> 15:51:48.260406 git.c:344               trace: built-in: git 'rev-parse' '-q' '--git-dir'
> 15:51:48.262940 git.c:344               trace: built-in: git 'rev-parse' '--show-prefix'
> 15:51:48.264156 git.c:344               trace: built-in: git 'rev-parse' '--show-toplevel'
> 15:51:48.266637 git.c:344               trace: built-in: git 'submodule--helper' 'list' '--prefix' ''
> 15:51:48.268074 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'buildroot'
> 15:51:48.269913 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.url'
> 15:51:48.271168 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.update'
> 15:51:48.272422 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'dl'
> 15:51:48.274179 git.c:344               trace: built-in: git 'config' 'submodule.dl.url'
> 15:51:48.275445 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.dl.update'
> 15:51:48.276779 git.c:344               trace: built-in: git 'submodule--helper' 'list' '--prefix' ''
> 15:51:48.278362 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'buildroot'
> 15:51:48.279819 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.url'
> 15:51:48.281192 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.branch'
> 15:51:48.282473 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.branch'
> 15:51:48.283788 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.update'
> 15:51:48.285269 git.c:344               trace: built-in: git 'submodule--helper' 'clone' '--prefix' '' '--path' 'buildroot' '--name' 'buildroot' '--url' 'git://git.busybox.net/buildroot' '' ''
> 15:51:48.285337 run-command.c:334       trace: run_command: 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
> 15:51:48.285687 exec_cmd.c:120          trace: exec: 'git' 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
> 15:51:48.286453 git.c:344               trace: built-in: git 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
> Cloning into 'buildroot'...
> 15:51:49.177856 run-command.c:334       trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected'
> 15:51:49.178244 exec_cmd.c:120          trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected'
> 15:51:49.179806 git.c:344               trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected'
> remote: Counting objects: 200277, done.
> remote: Compressing objects: 100% (62420/62420), done.
> ...
> 
> WITH --quite:
> 
> GIT_TRACE=1 git submodule update --init --recursive --quiet
> 15:52:26.900568 git.c:561               trace: exec: 'git-submodule' 'update' '--init' '--recursive' '--quiet'
> 15:52:26.900652 run-command.c:334       trace: run_command: 'git-submodule' 'update' '--init' '--recursive' '--quiet'
> 15:52:26.907761 git.c:344               trace: built-in: git 'rev-parse' '--git-dir'
> 15:52:26.909877 git.c:344               trace: built-in: git 'rev-parse' '--git-path' 'objects'
> 15:52:26.911766 git.c:344               trace: built-in: git 'rev-parse' '-q' '--git-dir'
> 15:52:26.914279 git.c:344               trace: built-in: git 'rev-parse' '--show-prefix'
> 15:52:26.915488 git.c:344               trace: built-in: git 'rev-parse' '--show-toplevel'
> 15:52:26.917983 git.c:344               trace: built-in: git 'submodule--helper' 'list' '--prefix' ''
> 15:52:26.919504 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'buildroot'
> 15:52:26.921244 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.url'
> 15:52:26.922619 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.update'
> 15:52:26.923888 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'dl'
> 15:52:26.925650 git.c:344               trace: built-in: git 'config' 'submodule.dl.url'
> 15:52:26.926892 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.dl.update'
> 15:52:26.928230 git.c:344               trace: built-in: git 'submodule--helper' 'list' '--prefix' ''
> 15:52:26.929709 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'buildroot'
> 15:52:26.931220 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.url'
> 15:52:26.932597 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.branch'
> 15:52:26.933867 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.branch'
> 15:52:26.935170 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.update'
> 15:52:26.936660 git.c:344               trace: built-in: git 'submodule--helper' 'clone' '--quiet' '--prefix' '' '--path' 'buildroot' '--name' 'buildroot' '--url' 'git://git.busybox.net/buildroot' '' ''
> 15:52:26.936732 run-command.c:334       trace: run_command: 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
> 15:52:26.936965 exec_cmd.c:120          trace: exec: 'git' 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
> 15:52:26.937803 git.c:344               trace: built-in: git 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
> 15:52:27.958503 run-command.c:334       trace: run_command: 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected'
> 15:52:27.958870 exec_cmd.c:120          trace: exec: 'git' 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected'
> 15:52:27.960447 git.c:344               trace: built-in: git 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected'
> fatal: The remote end hung up unexpectedly
> fatal: early EOF
> fatal: index-pack failed
> fatal: clone of 'git://git.busybox.net/buildroot' into submodule path 'buildroot' failed
> 
> ---------
> git --version
> git version 2.7.4
> 
> Any help in tracking down the reason for this would be greatly appreciated.
> 
> Thanks,
> Marcus
> 
Stefan Beller· Mar 22, 2016, 18:22 UTC · re: Marcus T · lore

Re: git fails updating submodule only if --quiet is specified

On Tue, Mar 22, 2016 at 8:51 AM, Marcus T <maddimax@googlemail.com> wrote:

git submodule was partially rewritten in v2.7 so I would assume that is some fallout from there. (passing the wrong arguments at the wrong time/place)

However lookingat your logs, I would suspect it is an error in git clone instead, as that is the last command which has the --quiet flag passed through the stack.

Show 10 quoted lines
> I did a bunch more investigation:
>
> My original problem was that it would work on a terminal, but not when running under jenkins.
>
> Turns out the “-v” in the "index-pack” step is whats leading to the error.
>
> I can reproduce the issue with the command "git submodule update --init --recursive > out.txt 2>&1"
>
> It seems that the “-v” is dropped automatically by git if its not connected to a terminal.
> This is only an issue for “git://“ urls. ssh and https seem to not be affected.

That is what the transport protocol determines at https://github.com/git/git/blob/master/transport.c#L743

I would expect that index-pack just works without -v instead of crashing.
Show 91 quoted lines
>
>
>
>> On 22 Mar 2016, at 16:02, Marcus T <maddimax@googlemail.com> wrote:
>>
>> Hello,
>>
>> I’m running into a nasty issue where “git submodule update —init” fails if I add “—quiet”
>>
>> Following you can find the output with GIT_TRACE=1:
>>
>> WITHOUT --quiet:
>>
>> GIT_TRACE=1 git submodule update --init --recursive
>> 15:51:48.248945 git.c:561               trace: exec: 'git-submodule' 'update' '--init' '--recursive'
>> 15:51:48.249023 run-command.c:334       trace: run_command: 'git-submodule' 'update' '--init' '--recursive'
>> 15:51:48.256626 git.c:344               trace: built-in: git 'rev-parse' '--git-dir'
>> 15:51:48.258494 git.c:344               trace: built-in: git 'rev-parse' '--git-path' 'objects'
>> 15:51:48.260406 git.c:344               trace: built-in: git 'rev-parse' '-q' '--git-dir'
>> 15:51:48.262940 git.c:344               trace: built-in: git 'rev-parse' '--show-prefix'
>> 15:51:48.264156 git.c:344               trace: built-in: git 'rev-parse' '--show-toplevel'
>> 15:51:48.266637 git.c:344               trace: built-in: git 'submodule--helper' 'list' '--prefix' ''
>> 15:51:48.268074 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'buildroot'
>> 15:51:48.269913 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.url'
>> 15:51:48.271168 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.update'
>> 15:51:48.272422 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'dl'
>> 15:51:48.274179 git.c:344               trace: built-in: git 'config' 'submodule.dl.url'
>> 15:51:48.275445 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.dl.update'
>> 15:51:48.276779 git.c:344               trace: built-in: git 'submodule--helper' 'list' '--prefix' ''
>> 15:51:48.278362 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'buildroot'
>> 15:51:48.279819 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.url'
>> 15:51:48.281192 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.branch'
>> 15:51:48.282473 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.branch'
>> 15:51:48.283788 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.update'
>> 15:51:48.285269 git.c:344               trace: built-in: git 'submodule--helper' 'clone' '--prefix' '' '--path' 'buildroot' '--name' 'buildroot' '--url' 'git://git.busybox.net/buildroot' '' ''
>> 15:51:48.285337 run-command.c:334       trace: run_command: 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
>> 15:51:48.285687 exec_cmd.c:120          trace: exec: 'git' 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
>> 15:51:48.286453 git.c:344               trace: built-in: git 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
>> Cloning into 'buildroot'...
>> 15:51:49.177856 run-command.c:334       trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected'
>> 15:51:49.178244 exec_cmd.c:120          trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected'
>> 15:51:49.179806 git.c:344               trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected'
>> remote: Counting objects: 200277, done.
>> remote: Compressing objects: 100% (62420/62420), done.
>> ...
>>
>> WITH --quite:
>>
>> GIT_TRACE=1 git submodule update --init --recursive --quiet
>> 15:52:26.900568 git.c:561               trace: exec: 'git-submodule' 'update' '--init' '--recursive' '--quiet'
>> 15:52:26.900652 run-command.c:334       trace: run_command: 'git-submodule' 'update' '--init' '--recursive' '--quiet'
>> 15:52:26.907761 git.c:344               trace: built-in: git 'rev-parse' '--git-dir'
>> 15:52:26.909877 git.c:344               trace: built-in: git 'rev-parse' '--git-path' 'objects'
>> 15:52:26.911766 git.c:344               trace: built-in: git 'rev-parse' '-q' '--git-dir'
>> 15:52:26.914279 git.c:344               trace: built-in: git 'rev-parse' '--show-prefix'
>> 15:52:26.915488 git.c:344               trace: built-in: git 'rev-parse' '--show-toplevel'
>> 15:52:26.917983 git.c:344               trace: built-in: git 'submodule--helper' 'list' '--prefix' ''
>> 15:52:26.919504 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'buildroot'
>> 15:52:26.921244 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.url'
>> 15:52:26.922619 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.update'
>> 15:52:26.923888 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'dl'
>> 15:52:26.925650 git.c:344               trace: built-in: git 'config' 'submodule.dl.url'
>> 15:52:26.926892 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.dl.update'
>> 15:52:26.928230 git.c:344               trace: built-in: git 'submodule--helper' 'list' '--prefix' ''
>> 15:52:26.929709 git.c:344               trace: built-in: git 'submodule--helper' 'name' 'buildroot'
>> 15:52:26.931220 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.url'
>> 15:52:26.932597 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.branch'
>> 15:52:26.933867 git.c:344               trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.branch'
>> 15:52:26.935170 git.c:344               trace: built-in: git 'config' 'submodule.buildroot.update'
>> 15:52:26.936660 git.c:344               trace: built-in: git 'submodule--helper' 'clone' '--quiet' '--prefix' '' '--path' 'buildroot' '--name' 'buildroot' '--url' 'git://git.busybox.net/buildroot' '' ''
>> 15:52:26.936732 run-command.c:334       trace: run_command: 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
>> 15:52:26.936965 exec_cmd.c:120          trace: exec: 'git' 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
>> 15:52:26.937803 git.c:344               trace: built-in: git 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot'
>> 15:52:27.958503 run-command.c:334       trace: run_command: 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected'
>> 15:52:27.958870 exec_cmd.c:120          trace: exec: 'git' 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected'
>> 15:52:27.960447 git.c:344               trace: built-in: git 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected'
>> fatal: The remote end hung up unexpectedly
>> fatal: early EOF
>> fatal: index-pack failed
>> fatal: clone of 'git://git.busybox.net/buildroot' into submodule path 'buildroot' failed
>>
>> ---------
>> git --version
>> git version 2.7.4
>>
>> Any help in tracking down the reason for this would be greatly appreciated.
>>
>> Thanks,
>> Marcus
>>
>
Stefan Beller· Mar 22, 2016, 21:38 UTC · re: Stefan Beller · lore

Re: git fails updating submodule only if --quiet is specified

On Tue, Mar 22, 2016 at 11:22 AM, Stefan Beller <sbeller@google.com> wrote:
> However lookingat your logs, I would suspect it is an error in git
> clone instead, as that is the
> last command which has the --quiet flag passed through the stack.

git clone --no-checkout --quiet --separate-git-dir tmp_gitdir git://git.busybox.net/buildroot tmp_workdir fails as a standalone program as well, so let's debug that.

Stefan Beller· Mar 22, 2016, 21:43 UTC · re: Stefan Beller · lore

Re: git fails updating submodule only if --quiet is specified

On Tue, Mar 22, 2016 at 2:38 PM, Stefan Beller <sbeller@google.com> wrote:
Show 8 quoted lines
> On Tue, Mar 22, 2016 at 11:22 AM, Stefan Beller <sbeller@google.com> wrote:
>> However lookingat your logs, I would suspect it is an error in git
>> clone instead, as that is the
>> last command which has the --quiet flag passed through the stack.
>
> git clone --no-checkout --quiet --separate-git-dir tmp_gitdir
> git://git.busybox.net/buildroot tmp_workdir
> fails as a standalone program as well, so let's debug that.

GIT_TRACE_PACKET=2 git clone --quiet --no-checkout --separate-git-dir tmp_gitdir git://git.busybox.net/buildroot tmp_workdir

14:40:17.369362 pkt-line.c:80 packet: clone> git-upload-pack /buildroot\0host=git.busybox.net\0 14:40:17.405792 pkt-line.c:80 packet: clone< 7e4dab488594021b012b1ef3b49772eece97b760 HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed symref=HEAD:refs/heads/master agent=git/2.7.3 14:40:17.406765 pkt-line.c:80 packet: clone< 1264adda0ec0ec5edaff5e372b97972cee6ae33c refs/heads/2012.11.x 14:40:17.406799 pkt-line.c:80 packet: clone< 8ab57bf9338f3a47683294aed6425f39828cbf80 refs/heads/2013.08.x 14:40:17.406813 pkt-line.c:80 packet: clone< e009e7d8615eec10d2c0c2676ef5a276f0a6a5e2 refs/heads/2015.08.x 14:40:17.406826 pkt-line.c:80 packet: clone< 9f0610c188007ee481508d453b062d77614c153d refs/heads/2015.11.x 14:40:17.406838 pkt-line.c:80 packet: clone< 7e4dab488594021b012b1ef3b49772eece97b760 refs/heads/master 14:40:17.406851 pkt-line.c:80 packet: clone< 2dfabd10d1e484d84c0e6b5a58ab43d131ca3230 refs/heads/next 14:40:17.406863 pkt-line.c:80 packet: clone< 72169f4a90a86b613a0d2be6217ccda5abf0b956 refs/tags/0_0 14:40:17.406876 pkt-line.c:80 packet: clone< ffde94bd2ca21542ae0b4518348f8e986b9d92e0 refs/tags/0_0^{} ... lots of ref advertisement... 14:40:17.432352 pkt-line.c:80 packet: clone< ac0194b3d63f07bd7379f1f7ddfc2bbc69ab3272 refs/tags/2016.02-rc3 14:40:17.432356 pkt-line.c:80 packet: clone< 100ba0f6d6b8020dd4d3ea8ffbfc7f1f3219a650 refs/tags/2016.02-rc3^{} 14:40:17.432360 pkt-line.c:80 packet: clone< 09d8764e8ce7d00c3f2028e65187f5ff31155583 refs/tags/gcc3_legacy 14:40:17.432365 pkt-line.c:80 packet: clone< 961229caf56a6a3e3bc9fd58805d8e83dd6a84ae refs/tags/gcc3_legacy^{} 14:40:17.432369 pkt-line.c:80 packet: clone< 0000 14:40:17.436239 pkt-line.c:80 packet: clone> want 7e4dab488594021b012b1ef3b49772eece97b760 multi_ack_detailed side-band-64k thin-pack no-progress ofs-delta agent=git/2.7.4.1.g33fcf9d 14:40:17.436258 pkt-line.c:80 packet: clone> want 1264adda0ec0ec5edaff5e372b97972cee6ae33c 14:40:17.436268 pkt-line.c:80 packet: clone> want 8ab57bf9338f3a47683294aed6425f39828cbf80 14:40:17.436277 pkt-line.c:80 packet: clone> want e009e7d8615eec10d2c0c2676ef5a276f0a6a5e2 ...lots of wants... 14:40:17.437114 pkt-line.c:80 packet: clone> want 4a5e4d74cbd91a4d9a166d38a90b5c444722cc92 14:40:17.437121 pkt-line.c:80 packet: clone> want 2977653121ad046e8a229f22552d3ce547bfb511 14:40:17.437128 pkt-line.c:80 packet: clone> want 834f73774a296a178b1ee550752abaa5dfcde29a 14:40:17.437135 pkt-line.c:80 packet: clone> want 44eca8025060071a410e18df6eba446821ad9a5a 14:40:17.437143 pkt-line.c:80 packet: clone> want ac0194b3d63f07bd7379f1f7ddfc2bbc69ab3272 14:40:17.437150 pkt-line.c:80 packet: clone> want 09d8764e8ce7d00c3f2028e65187f5ff31155583 14:40:17.437156 pkt-line.c:80 packet: clone> 0000 14:40:17.437387 pkt-line.c:80 packet: clone> done 14:40:17.488562 pkt-line.c:80 packet: clone< NAK fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

When not giving --quiet, you'll see the client ask not for no-progress capability in the first want line.

Jeff King· Mar 22, 2016, 22:25 UTC · re: Stefan Beller · lore

Re: git fails updating submodule only if --quiet is specified

On Tue, Mar 22, 2016 at 02:38:34PM -0700, Stefan Beller wrote:
Show 8 quoted lines
> On Tue, Mar 22, 2016 at 11:22 AM, Stefan Beller <sbeller@google.com> wrote:
> > However lookingat your logs, I would suspect it is an error in git
> > clone instead, as that is the
> > last command which has the --quiet flag passed through the stack.
> 
> git clone --no-checkout --quiet --separate-git-dir tmp_gitdir
> git://git.busybox.net/buildroot tmp_workdir
> fails as a standalone program as well, so let's debug that.
I think you can simplify this quite a bit to just:
  git clone --quiet git://git.busybox.net/buildroot

That breaks, but works without --quiet. Presumably the problem is on the server side, as we see the remote end hang up (and using different versions of git on the client does not seem to help).

It seems to fail consistently for me around 2.4s, which makes me think we're hitting some kind of timeout. I'd suspect a bug in the keep-alive code in upload-pack, but that shouldn't have kicked in by then.

I guess the next step is to try to reproduce with a local client/server, and then bisect the server version.

-Peff
Jeff King· Mar 22, 2016, 22:35 UTC · re: Jeff King · lore

Re: git fails updating submodule only if --quiet is specified

On Tue, Mar 22, 2016 at 06:25:01PM -0400, Jeff King wrote:
Show 14 quoted lines
> I think you can simplify this quite a bit to just:
> 
>   git clone --quiet git://git.busybox.net/buildroot
> 
> That breaks, but works without --quiet. Presumably the problem is on the
> server side, as we see the remote end hang up (and using different
> versions of git on the client does not seem to help).
> 
> It seems to fail consistently for me around 2.4s, which makes me think
> we're hitting some kind of timeout. I'd suspect a bug in the keep-alive
> code in upload-pack, but that shouldn't have kicked in by then.
> 
> I guess the next step is to try to reproduce with a local client/server,
> and then bisect the server version.

That server advertises that it's running v2.7.3. So I pulled down the repo and tried reproducing with a local v2.7.3 run, but I can't get it to fail.

I also tried tweaking uploadpack.keepalive down to 1 second to see if that triggered anything, but again, nothing interesting.

So I'm not sure what the trick is to stimulating the failure. Is there any special config set up on that server or in that repository? Is it possible to get a tarball of the server repository, in case something in the packing is relevant? I guess both of those would require contact with the busybox.net admins.

-Peff
Stefan Beller· Mar 22, 2016, 22:02 UTC · lore

Re: git fails updating submodule only if --quiet is specified

On Tue, Mar 22, 2016 at 2:59 PM, Marcus T <maddimax@googlemail.com> wrote:
> I should mention that I first ran into the issue in Git 2.5.0. I updated to
> 2.7.4 in the hopes that it had been fixed already.
>
Does that ring a bell for anyone?

← back to recent threads