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: 1.3.13?


On Mon, Aug 05, 2002 at 02:06:59PM +0400, Egor Duda wrote:
> The line
>    78 10339441 [main] ssh 298 cygthread::cygthread: resume thread select_pipe: 0
> keeps repeating ad infinitum until interrupted.
> This line comes from cygthread constructor. I've added debug_printf
> which prints thread name an outcome from ResumeThread. Looks like pipe
> thread is not cleaning up properly. I'll try to take a deeper look but
> meanwhile want to give a heads-up.

I've observed that situation as well today.  Logging in using sshd results
in full cpu usage of sshd for about 5 seconds.  After logging out it jumps
to 100% again and remains this way until killing sshd.  

Looking into the code there's something I don't understand:

cygthread::exit_thread() calls ExitThread(0).  The thread which calls
exit_thread() - fhandler_tty.cc, process_output() - is a cygthread
function, too.  Shouldn't exit_thread() actually call SuspendThread(0)
instead?

OTOH, process_output() tries to exit itself:

fhandler_tty_master::init ()
  output_thread = new cygthread (process_output, NULL, "ttyout");

process_output ()
  cygthread *t = tty_master->output_thread;
  ...
  t->exit_thread ();

so shouldn't it match the situation better just to call `return 0;'
instead of exit_thread() here?  That would allow to eliminate
cygthread::exit_thread() completely.

Unfortunately this doesn't solve the problem.  I'm still debugging.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


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