delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/17/05:50:33

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 17 Oct 2008 11:49:24 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygserver 1.5.25-15 slows down logoff
Message-ID: <20081017094924.GG9289@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <48BEB7F8 DOT 2080908 AT gmx DOT net> <48BF5B9D DOT 1010501 AT gmx DOT net> <20080929164910 DOT GB11053 AT calimero DOT vinschen DOT de> <48E19F48 DOT 1050805 AT gmx DOT net> <20081002090757 DOT GB23019 AT calimero DOT vinschen DOT de> <48E49B84 DOT 3080006 AT gmx DOT net> <20081015144130 DOT GY9289 AT calimero DOT vinschen DOT de> <48F66106 DOT 9070604 AT gmx DOT net>
MIME-Version: 1.0
In-Reply-To: <48F66106.9070604@gmx.net>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Oct 15 23:30, Sybille Ebert wrote:
> >>>> The problem also appears in sshd service, eventhough it does not depend
> >>>> on cygserver. I installed sshd using ssh-host-config and manually
> >>>> stopped cygserver. And even with only sshd running, there was still a
> >>>> long delay at logoff/shutdown!
> >>> Which shows that the delay isn't cygserver specific, but occurs in the
> >>> cygwin DLL somehow.  I'm somewhat low on time right now but I'll look
> >>> into this at one point. 
> >> Thank you. Please let me know if I could be of any assistance.
> >>[...]
> > I can reproduce it, too.  However, I can not reproduce it on Windows
> > Server 2008 x64 so it seems a problem of the NT 5.2 kernel alone.
> > I tried debugging and changed a couple of places in the DLL as well
> > as in cygrunsrv trying to track it down.  The hang does not occur in
> > Cygwin code, afaics, but in OS code and changing related parts of the
> > custom console handling doesn't change anything.  That's all I can do
> > for now, sorry.
> 
> Could you explain the interaction between Cygwin and OS in the related
> part? I would like to have a look at it, but I need some directions.

Well, there's no real interaction.  When you logoff, the service
application (which is cygrunsrv, not cygserver or sshd) gets a
console event CTRL_LOGOFF_EVENT.  The Cygwin DLL has a handler function
(exceptions.cc:ctrl_c_handler) which doesn't do much on CTRL_LOGOFF_EVENT.

For testing I disabled everything and I even added a ConsoleCtrlHandler
function to cygrunsrv which returns TRUE.  The function is called and
that's it.  After that, the system hangs out for ~30 seconds for no
apparent reason.

Still note that this only happens on the 5.2 x64 kernel, not on the 6.0
x64 kernel, so I don't see how this is actually Cygwin's fault or if
we can do anything against that effect.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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