This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: I know CVS is hosed (this time for sure)


On Fri, Sep 07, 2001 at 07:09:51PM +0200, Corinna Vinschen wrote:
>>>Did this patch work?  It seems to for me.
>>
>>The last we heard, another similar patch to this one didn't work for
>>Corinna.
>>
>>I'd like to get confirmation that this one works ok.
>
>Sorry, it doesn't work for me.  I tried the plain version from CVS and
>the same including the cygheap.cc patch which you've send here.  My
>testcase is a `make' in a Cygwin build tree.  This testcase crashes now
>on a regular basis in /bin/sh.  I'm getting the following backtrace in
>gdb with and without your yesterday's patch in cygheap.cc:

Ok, I managed to duplicate this.  It didn't happen to me when building
in the winsup directory but it did in the top level.

The problem was, as I suspected, due to the zombies allocation.  The
problem is that allocating the zombies array only when needed caused the
heap to grow while the program was in the process of forking.  So,
when the parent tried to copy the heap to the child during a fork, the
heap was larger in the parent than in the child.  Boom.

That illustrates potential thread unsafety in fork() but I'm sure not
going to fix that before 1.3.3.

AFAICT, this also had nothing to do with moving buckets to cygheap.  I'm
not sure how that would have affected anything unless the alignment in
the data segment caused by having buckets there threw off the heap just
enough so that it masked the fork problem.

Corinna and Egor, can you verify if this checkin fixes things.

Btw, I did one of my periodic sweeps through the sources, getting rid
of extra white space so "cvs update" will show a lot of unrelated files.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]