delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/22/16:43:56

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-Authenticated: #19222419
Message-ID: <48FF9052.5040902@gmx.net>
Date: Wed, 22 Oct 2008 22:42:58 +0200
From: Sybille Ebert <sybille DOT ebert AT gmx DOT net>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygserver 1.5.25-15 slows down logoff
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> <20081017094924 DOT GG9289 AT calimero DOT vinschen DOT de>
In-Reply-To: <20081017094924.GG9289@calimero.vinschen.de>
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.57
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

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

I have created and installed my own test service. For this purpose, I've
used Java Service Wrapper, which is from OS perspective just a pure
32-bit console program like cygrunsrv. And it works flawlessly, there's
no delay at logoff :-/

It only has this one problem: there's no source for the DLL it uses.

Could it be something we're missing? Perhaps not in the
ConsoleCtrlHandler itself?

S

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