delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/08/05/09:06:06

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Mon, 5 Aug 2002 15:06:00 +0200
From: Corinna Vinschen <vinschen AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: 1.3.13?
Message-ID: <20020805150600.D3921@cygbert.vinschen.de>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <20020804195150 DOT GA3381 AT redhat DOT com> <124668090713 DOT 20020805140659 AT logos-m DOT ru>
Mime-Version: 1.0
In-Reply-To: <124668090713.20020805140659@logos-m.ru>
User-Agent: Mutt/1.3.22.1i

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 AT cygwin DOT com
Red Hat, Inc.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019