X-Recipient: archive-cygwin@delorie.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.ebert@gmx.net>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: cygserver 1.5.25-15 slows down logoff
References: <48BEB7F8.2080908@gmx.net> <48BF5B9D.1010501@gmx.net> <20080929164910.GB11053@calimero.vinschen.de> <48E19F48.1050805@gmx.net> <20081002090757.GB23019@calimero.vinschen.de> <48E49B84.3080006@gmx.net> <20081015144130.GY9289@calimero.vinschen.de> <48F66106.9070604@gmx.net> <20081017094924.GG9289@calimero.vinschen.de>
In-Reply-To: <20081017094924.GG9289@calimero.vinschen.de>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.57
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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/

