From: Hector Santos <hsantos@isdg.net>
To: git@vger.kernel.org
Subject: Git Daemon on Windows fatal error.
Date: Wed, 31 May 2017 15:10:50 -0400 [thread overview]
Message-ID: <592F153A.7020403@isdg.net> (raw)
Hi, I am relatively new to GIT (coming from CVS and SVN) and I am
trying to setup "Git Daemon" on windows.
I got it working for Local network communications:
d:\local\wc5\testgit>git clone git://localhost/http clone10
Cloning into 'clone10'...
remote: Counting objects: 526, done.
remote: Compressing objects: 100% (520/520), done.
Receiving objects: 100% (526/526), 1.38 MiB | 0 bytes/s, done.
remote: Total 526 (delta 81), reused 0 (delta 0)
Resolving deltas: 100% (81/81), done.
but it fails over the wire when using the public host domain:
d:\local\wc5\testgit>git clone git://public.example.dom/http clone11
Cloning into 'clone11'...
remote: Counting objects: 526, done.
remote: Compressing objects: 100% (520/520), done.
remote: Total 526 (delta 81), reused 0 (delta 0)
fatal: read error: Invalid argument
fatal: early EOF
fatal: index-pack failed
Sometimes its a different initial fatal error but generally the same.
Once or twice, a repeat MAY work, but often not.
Short of digging into the git source code, I did as much research
online and tried the various config options suggestions, changing the
packet size, etc, to no avail.
To me, this seems like a "Socket Half Close" problem. If anyone is
aware of what appears to be a long time "known" problem, and have a
real solution, it would be greatly appreciated. Otherwise, I am very
interesting in exploring the Half Close solution as I've seen similar
behavior in other internet hosting servers in the past. A simple
closesocket() wrapper funciton did the trick:
// HalfCloseSocket() performs a TCP Half Close by calling shutdown()
// which signals the remote that no more data is going to be
// sent (FIN signal). HalfCloseSocket() then goes into a
// recv() loop to wait for the remote to acknowledge the close.
// This acknowledgment comes as a recv() return value
// of zero (less).
BOOL HalfCloseSocket(SOCKET socket)
{
if (shutdown(socket,SD_SENT) != 0) {
return FALSE;
}
int ret = 0;
int msecs = 10; // poor man sanity check
char buf[8*1024];
while ((ret = recv(socket, buf,sizeof(buf),0)) > 0) {
buf[0] = 0;
buf[1] = 0;
msecs--;
if (msecs == 0) break;
}
return closesocket(socket);
}
While I rather not get into the source, I am willing to explore the
effort if there is no other option.
Thanks for any input you can provide
Hector Santos
Santronics Software, Inc.
--
HLS
next reply other threads:[~2017-05-31 19:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 19:10 Hector Santos [this message]
2017-06-01 6:53 ` Git Daemon on Windows fatal error Torsten Bögershausen
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=592F153A.7020403@isdg.net \
--to=hsantos@isdg.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.