Re: [BUG] Halt during fetch on MacOS
- From
Jeff King <peff@peff.net>
- Date
- Mar 1, 2014, 06:15 UTC
- Message-ID
- <20140301061532.GC20397@sigill.intra.peff.net>
- In-Reply-To
- <CAFFUb6X455R4OD5FKnVFHFmvTyRqtV300bc=a8Xs03agM+=uLQ@mail.gmail.com>
On Fri, Feb 28, 2014 at 03:26:28PM -0800, Conley Owens wrote:
Show 11 quoted lines
> test.sh
> """""""""""""""""""""""""""""""""""""
> #!/bin/bash
> rungit() {
> mkdir $1
> GIT_DIR=$1 git init --bare
> echo '[remote "aosp"]' > $1/config
> echo ' url =
> https://android.googlesource.com/platform/external/tinyxml2' >>
> $1/config
> GIT_DIR=$1 git fetch aosp +refs/heads/master:refs/remotes/aosp/masterI don't think this is affecting your test, but you probably want ">>" to append to the config for the first line, too. Otherwise you are overwriting some of git's default settings.
Show 7 quoted lines
> When everything cools, you can see that there are some fetches hanging > (typically). > $ ps | grep 'git fetch' > ... > 63310 ttys004 0:00.01 git fetch aosp > +refs/heads/master:refs/remotes/aosp/master > [...]
I can't reproduce here on Linux. Can you find out what the processes are doing with something like strace?
Show 12 quoted lines
> You can look at the parent process of each and see that one half > spawned the other half, or you can look at the environment variables > for each to see that there are two processes operating in the same > directory for each directory where there's an issue. > $ echo "$(for pid in $(ps | grep 'git fetch' | grep -o '^[0-9]*'); do > ps -p $pid -wwwE | grep 'GIT_DIR=[^ ]*' -o; done)" | sort > GIT_DIR=testdir14 > GIT_DIR=testdir14 > GIT_DIR=testdir32 > GIT_DIR=testdir32 > GIT_DIR=testdir47 > GIT_DIR=testdir47
A fetch will start many sub-processes. Try:
GIT_TRACE=1 git fetch \
https://android.googlesource.com/platform/external/tinyxml2which shows git-fetch starting the git-remote-https helper, which in turn starts git-fetch-pack to do the actual protocol, which uses git-unpack-objects to manage the incoming pack.
-Peff