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]
Other format: [Raw text]

Re: cygthread::cygthread() hang


On Wed, 9 Apr 2003, Joe Buehler wrote:

> Christopher Faylor wrote:
>
> > ?  I've never noticed this and I've debugged this function hundreds
> > of times.
>
> There's no problem setting a break at the current line, but setting
> a break at file:line in the constructor before running anything
> failed for me for the reason I gave.  There are actually two constructors,
> "in-charge" and "not-in-charge", so the mapping from file:line to address
> is not unique.
>
> > I have made a major restructuring the code, though.  It's not working
> > right now but it should be simple to fix.  I just have real world and
> > real job constraints right now so I can't devote much time to it.
>
> I found the problem -- CreateThread() is failing with error 8 -- not enough memory.
> So I presume that there is a thread leak.  The continual SIGALARM while a pipe
> is waiting for a long running command to return output is probably causing
> a leak when read_pipe() is terminated.  I'll get to it later today.

If you want more detail on what's being leaked, use Process Explorer from
www.sysinternals.com. Alternately, you can see less specific information
in Task Manager, go to the Processes tab and select View->Select Columns,
then check Handle Count and Thread Count.

Process Explorer is better, because it color-codes handles to give you an
idea of which are probably leaks.

--
http://www.clock.org/~matt


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