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 03:06:00PM +0200, Corinna Vinschen wrote:
>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?

Not if it truly wanted the thread to exit, no.  Suspending the thread
when it is going away anyway didn't seem like a good idea to me.

>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.

That basically puts it back to the way it has been for years.  And, it
means that the detach method won't work properly.

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

I'd be surprised if it did solve the problem since that would put the
code back into the situation that Conrad Scott reported on Friday.

cgf


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