Subject: Re: [PATCH] CYGWIN: Use a TCP socket for pipe()

From: Mark Levedahl <[email-masked]>
Date: Thu, 27 Jun 2013 22:46:55 -0400

On 06/27/2013 01:38 PM, Junio C Hamano wrote:
> Torsten Bögershausen <[email-masked]> writes:
>
>> Work around issues that git hangs when doing fetch or pull under
>> various protocols under CYGWIN.
>>
>> Replace pipe() with a socket connection using a TCP/IP.
>> Introduce a new function socket_pipe() in compat/socket_pipe.c
> Sounds like sweeping the real problem, whatever it is, under rug.
> Is it that we are assuming a pipe buffer that is sufficiently large
> and expecting a write that we deem to be small enough not to block,
> causing a deadlock on a platform with very small pipe buffer, or
> something?
>

There were issues in early v1.7 Cygwin release for overlapping I/O such 
that the pipe was sometimes terminated early resulting in data loss. If 
the pipe implementation in Cygwin is still a problem a good test case 
sent to the Cygwin developers would be the right approach rather than a 
one-off patch in git to try to work around a current platform bug.

Note - I do not see random hangs with the stat/lstat hack removed, 
rather the sole test suite hang I see is repeatable in t0008.sh. So, if 
the patch remains, we may be able to run this remaining hang to ground.

Mark