git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] Halt during fetch on MacOS
@ 2014-02-28 23:26 Conley Owens
  2014-03-01  6:15 ` Jeff King
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Conley Owens @ 2014-02-28 23:26 UTC (permalink / raw)
  To: git

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

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/master
    rm -rf $1
}

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

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
63314 ttys004    0:00.01 git fetch aosp
+refs/heads/master:refs/remotes/aosp/master
63319 ttys004    0:00.01 git fetch aosp
+refs/heads/master:refs/remotes/aosp/master
63407 ttys004    0:00.00 git fetch aosp
+refs/heads/master:refs/remotes/aosp/master
63414 ttys004    0:00.00 git fetch aosp
+refs/heads/master:refs/remotes/aosp/master
63420 ttys004    0:00.00 git fetch aosp
+refs/heads/master:refs/remotes/aosp/master
...

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

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.

~cco3

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-03-06 23:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 23:26 [BUG] Halt during fetch on MacOS Conley Owens
2014-03-01  6:15 ` Jeff King
2014-03-02  2:02   ` Kyle J. McKay
2014-03-04 22:21     ` Jacopo Notarstefano
2014-03-04  1:03   ` Conley Owens
2014-03-02 14:36 ` Max Horn
2014-03-03 22:50   ` Conley Owens
2014-03-05 21:56 ` Conley Owens
2014-03-06 18:24   ` Junio C Hamano
2014-03-06 21:16     ` Jeff King
2014-03-06 23:12       ` Conley Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).