$ git --version  # This is just the git from MacPorts
git version
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.8.5
BuildVersion:   12F45

rungit() {
    mkdir $1
    GIT_DIR=$1 git init --bare
    echo '[remote "aosp"]' > $1/config
    echo '    url =
https://android.googlesource.com/platform/external/tinyxml2' >>
    GIT_DIR=$1 git fetch aosp +refs/heads/master:refs/remotes/aosp/master
    rm -rf $1

for i in $(seq 1 100)
    rungit testdir$i &
$ ./test.sh  # Warning! This script fetches ~40MB of data

When everything cools, you can see that there are some fetches hanging
$ ps | grep 'git fetch'
63310 ttys004    0:00.01 git fetch aosp
63314 ttys004    0:00.01 git fetch aosp
63319 ttys004    0:00.01 git fetch aosp
63407 ttys004    0:00.00 git fetch aosp
63414 ttys004    0:00.00 git fetch aosp
63420 ttys004    0:00.00 git fetch aosp

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

I've searched through the mailing list, but this doesn't seem to be a
known issue.  I've only seen this occur on macs (and with a good deal
of regularity).  It doesn't occur on my Ubuntu box.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to