cygserver 1.5.25-15 slows down logoff

Corinna Vinschen
Fri Oct 17 09:50:00 GMT 2008

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
( 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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list