Re: [BUG] Halt during fetch on MacOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 28, 2014, at 22:15, Jeff King wrote:
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.

I replaced it with a call to git config in my version.

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?

I can't reproduce, mostly, on Mac OS X 10.5.8 or 10.6.8.

What I mean by mostly is that the very first time I ran the test script I got approximately 36 of these errors:

fatal: unable to access 'https://android.googlesource.com/platform/external/tinyxml2/' : Unknown SSL protocol error in connection to android.googlesource.com: 443

The rest of the fetches completed.  That was with Git 1.8.5.1.

However, I was never able to reproduce those errors again. All the subsequent runs completed all fetches successfully using that same Git version so I also tried Git 1.8.5.2, 1.8.5.5 and Git 1.7.6.1 on the original and another machine.

I am, however NAT'd, so it's possible the NAT was somehow responsible for the initial 36 failures.

Perhaps you are seeing a similar issue.

You might try setting these sysctl variables:

# Timeout new TCP connections after 30 seconds instead of 75
net.inet.tcp.keepinit=30000
# Always keep alive TCP connections
net.inet.tcp.always_keepalive=1
# Start keep alive checks after 30 seconds instead of 2 hours
net.inet.tcp.keepidle=30000
# Wait 5 seconds between probes instead of 75
# Note that 8 probes in a row must fail to drop the connection
net.inet.tcp.keepintvl=5000

then running your test again and see if the hanging git fetch processes die with some kind of failed connection error within about 70 seconds or so. With the default sysctl settings, even with Git enabling keep alives, it would likely take a bit over two hours for a dead connection to be noticed.

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]