This is the mail archive of the cygwin 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]

WG: Re: SSH V.5.1 with Cygwin1.dll 1.7.0 (0.189/5/3) 2008-12-09: Very large logon tim es...


Hello Corinna,

my name is Markus Bauer. I'm a colleague from Carsten Porzler and I tried 
to figure out where the time is wasted.
I put some debugging statements in sec_auth.cc and syscalls.cc. The 
strange is, that I only see the statements from syscalls.cc but not the 
many I put in sec_auth.cc.

Maybe you have an idea?

Thank you very much.

Markus Bauer

Carsten Porzler/sdv schrieb am 16.01.2009 12:59:03:

> WG: Re: SSH V.5.1 with Cygwin1.dll 1.7.0(0.189/5/3) 2008-12-09: Very
> large logon times...
> 
> Carsten Porzler 
> 
> an:
> 
> Markus Bauer
> 
> 16.01.2009 12:59
> 
> FYI
> 
> ----- Weitergeleitet von Carsten Porzler/sdv am 16.01.2009 12:58 -----
> 
> Von:
> 
> Corinna Vinschen <corinna-cygwin@cygwin.com>
> 
> An:
> 
> cygwin@cygwin.com
> 
> Datum:
> 
> 09.01.2009 13:49
> 
> Betreff:
> 
> Re: SSH V.5.1 with Cygwin1.dll 1.7.0(0.189/5/3) 2008-12-09: Very 
> large  logon times...
> 
> Gesendet von:
> 
> cygwin-owner@cygwin.com
> 
> On Jan  7 11:02, Carsten.Porzler@spb.de wrote:
> > I just compiled the cygwin sources from the latest snapshot for 
testing. 
> > It seems to be working...
> > 
> > So, please tell me the debugging statements I have to insert into the 
> > source code to figure out where the logon process takes the time.
> 
> The idea is to add statements along these lines
> 
>   debug_printf ("CHECKPOINT 1");
>   debug_printf ("CHECKPOINT 2");
>   debug_printf ("CHECKPOINT 3");
>   [...]
> 
> liberally across the functions in the winsup/cygwin/sec_auth.cc file,
> with the starting point being the function lsaauth(), line 912 in recent
> sources, so that we can track down where exactly the time is wasted.
> After you added these statements all over the place, stop sshd, install
> this new DLL and then, before starting sshd again, tweak the following
> registry entries:
> 
>   HKLM\SYSTEM\CurrentControlSet\Services\sshd\Parameters
> 
>   AppPath  ==>  "/bin/strace"
>   AppArgs  ==>  "-o C:/sshd-strace.out /usr/sbin/sshd -d"
> 
> Note the old entries before so you can restore them afterwards.
> 
> Now log in exactly once and log out again.  Afterwards, the sshd process
> will have stopped automatically (that's what the lowercase -d does).
> Note that it takes *much* longer to login when running under strace.  Be
> (even more) patient.
> 
> After each run, examine the CHECKPOINTs in the C:/sshd-strace.out file.
> The left two columns show times in milliseconds which denotes the time
> it took to get to this statement, relative to the last debug output and
> relative to the process start.  At one point you will see that these
> numbers between two CHECKPOINTs are unusual high.  That means, the
> culprit of the delay is somewhere between these two CHECKPOINTs.  Now
> let's play stepwise refinement and add more of these CHECKPOINTs between
> the other two and reiterate the steps above, until you think you nailed
> it down to a certain part of the DLL, or even a single Windows function
> call.
> 
> For a start, add these, relative to the current code in CVS:
> 
>   syscalls.cc, line 2616:
> 
>     debug_printf ("CHECKPOINT 9999");
> 
>   sec_auth.cc, line 945:
> 
>     debug_printf ("CHECKPOINT 0");
> 
>   sec_auth.cc, line 1177:
> 
>     debug_printf ("CHECKPOINT 9998");
> 
> I assume the delay occurs either when trying to get the logon server
> information (function get_logon_server, line 180), or when connecting
> the logon server to fetch group information (function get_user_groups,
> line 225 and function get_user_local_groups, line 313), so it might be a
> good idea to add more CHECKPOINTs there.
> 
> When you think you found it, I'll take another look into it and
> hopefully this can be fixed easily.
> 
> 
> HTH,
> 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/
> 


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


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