Fork problems on master branch

Ken Brown
Sun Jun 9 16:51:00 GMT 2019

On 6/8/2019 3:44 PM, Ken Brown wrote:
> Earlier today I reported on the cygwin-patches list a fork problem with a
> cygwin1.dll built from the master branch of the Cygwin source repo.  See
>  A bisection showed
> that commit f03ea8e1 was the first bad commit for the problem being discussed there.
> I've just run into a second fork problem for which I think the same commit is
> the first bad one.  I can't be positive, because the problem is sporadic, so I
> might have marked some bad commits as good if I didn't run the test enough times.
> The test case for this (attached) is one that I used when testing my new FIFO
> code.  Normally I run this program in one terminal and type
>     echo blah > /tmp/myfifo
> in a second terminal.  For the present purposes, however, you can skip the
> second part and simply terminate fifo_fork_test with C-c.
> In my testing, I found that running the test program would yield "read: Bad
> address" about 1 out of 10 times.  Occasionally I would get "read: Communication
> error on send" instead.  Both error messages indicate a problem with the child
> process reading from an fd inherited from the parent.

Never mind.  This seems to be a bug in my recently added FIFO code.  I just 
never before ran my test many times in a row, so I never saw the error before.

Sorry for the noise.


More information about the Cygwin mailing list