* Git Daemon on Windows fatal error.
@ 2017-05-31 19:10 Hector Santos
2017-06-01 6:53 ` Torsten Bögershausen
0 siblings, 1 reply; 2+ messages in thread
From: Hector Santos @ 2017-05-31 19:10 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Git Daemon on Windows fatal error.
2017-05-31 19:10 Git Daemon on Windows fatal error Hector Santos
@ 2017-06-01 6:53 ` Torsten Bögershausen
0 siblings, 0 replies; 2+ messages in thread
From: Torsten Bögershausen @ 2017-06-01 6:53 UTC (permalink / raw)
To: Hector Santos, git
On 31/05/17 21:10, Hector Santos wrote:
> 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.
[] snip
First of all, welcome to Git.
Second, which version of Git are you using ? And which version of Windows ?
Third, I don't think that this has to do with Git Daemon.
When I look at "read error: Invalid argument", it may be fixed in the
latest version.
And that why it is important to know the version you are using.
And, there is a special place to report problems with Git for Windows:
https://github.com/git-for-windows/git/wiki (hope I got it right),
but please feel free to continue here on the mailing list.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-01 6:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-31 19:10 Git Daemon on Windows fatal error Hector Santos
2017-06-01 6:53 ` Torsten Bögershausen
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).