[tolj@wapme-systems.de: Re: Problem with accept?!! (was: Re: apache cygwin package hangs when MaxRequestsPerChild reached!)]

Christopher Faylor cgf@redhat.com
Mon Jun 2 19:33:00 GMT 2003


On Mon, Jun 02, 2003 at 09:23:37PM +0200, Corinna Vinschen wrote:
>On Mon, Jun 02, 2003 at 02:36:05PM -0400, Christopher Faylor wrote:
>> On Mon, Jun 02, 2003 at 07:55:50PM +0200, Corinna Vinschen wrote:
>> >Chris, could you trigger a new snapshot?  I'd like to have Stipe and
>> >friends testing this with apache.
>> 
>> I've triggered a new snapshot but I noticed that you are using the same
>> technique that I'm using for pipes which is known to leak memory, if not
>> resources.  I hope the cure here isn't worse than the disease.
>
>Where does it leak memory?  Is that the TerminateThread itself or
>the cygthread stuff?  I did carefully clean up after the dirty work
>has been done so I'm wondering...

There was a long discussion with Joe Buehler about the way TerminateThread
seems to leak memory in some cases, specifically for the pipe termination
case.  The leak is outside of cygwin's control, AFAICT.

This technique is also racy in that you could be terminating a thread which
has successfully accepted a connection.  Pipes have the same problem.  I
closed the hole on the race to some degree but you can't fix it entirely
since the race exists in kernel space.

I haven't seen many complaints about pipes though so maybe this will be
an ok solution.

cgf



More information about the Cygwin-developers mailing list