From: Jeff King <peff@peff.net>
To: Conley Owens <cco3@android.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG] Halt during fetch on MacOS
Date: Sat, 1 Mar 2014 01:15:32 -0500 [thread overview]
Message-ID: <20140301061532.GC20397@sigill.intra.peff.net> (raw)
In-Reply-To: <CAFFUb6X455R4OD5FKnVFHFmvTyRqtV300bc=a8Xs03agM+=uLQ@mail.gmail.com>
On Fri, Feb 28, 2014 at 03:26:28PM -0800, Conley Owens wrote:
> 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
I 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.
> 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?
> 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/tinyxml2
which 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
next prev parent reply other threads:[~2014-03-01 6:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 23:26 [BUG] Halt during fetch on MacOS Conley Owens
2014-03-01 6:15 ` Jeff King [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140301061532.GC20397@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=cco3@android.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).