From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19222 invoked by alias); 22 Jan 2009 08:43:13 -0000 Received: (qmail 19208 invoked by uid 22791); 22 Jan 2009 08:43:12 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_82,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mailout-n1.spb.de (HELO mail1.sparda-bank.de) (213.95.18.113) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Jan 2009 08:43:08 +0000 Received: from upmailcrypt1.spb.de (unknown [194.15.183.130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail1.sparda-bank.de (Postfix) with ESMTPS id C1E596EC11D for ; Thu, 22 Jan 2009 09:43:05 +0100 (CET) Received: (from smtpd@127.0.0.1) by upmailcrypt1.spb.de (8.13.8/8.13.8) id n0M8h4GP024013 for ; Thu, 22 Jan 2009 09:43:04 +0100 MIME-Version: 1.0 To: cygwin@cygwin.com X-KeepSent: E9BA6636:3ACFB34E-C1257545:00575C35; type=4; name=$KeepSent Message-ID: From: Markus.Bauer@spb.de Date: Thu, 22 Jan 2009 11:31:00 -0000 X-SafeGuard_MailGateway: Version: 5.30.1.7110 SGMG (smtpd: 6.71.2.3) Date: 20090122084304Z Subject: =?ISO-8859-15?Q?WG:_Re:_SSH_V=2E5=2E1_with_Cygwin1=2Edll_1=2E7=2E0?= =?ISO-8859-15?Q?=280=2E189/5/3=29_2008-12-09:_Very_=09large__logon_tim?= =?ISO-8859-15?Q?es=2E=2E=2E?= Content-Type: text/plain; charset="US-ASCII" X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-01/txt/msg00661.txt.bz2 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 > > 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/