X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 27 Jan 2010 10:48:42 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: cd /cygdrive hangs for some time. Message-ID: <20100127094842.GC20008@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <2d9485871001261618m737d5d1dp95c5378dea4ab3e AT mail DOT gmail DOT com> <2d9485871001261838j2893e160l413a642c06857e14 AT mail DOT gmail DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2d9485871001261838j2893e160l413a642c06857e14@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Jan 26 18:38, Ram Kal wrote: > Hi, > > I have a new problem with latest Cygwin installation > (1.7.1(0.218/5/3)). Most of the times I wanted to cd to C Drive, the > command hangs for few seconds and then completes. Also noticed that > once i am in /cygdrive/c and do a 'ls -l' command, same thing happens. > > I have attached the point in the strace log where the commands hangs: > >    25  213581 [main] ls 3332 normalize_posix_path: /cygdrive/ = > normalize_posix_path (/cygdrive/c/..) >    26  213607 [main] ls 3332 mount_info::conv_to_win32_path: > conv_to_win32_path (/cygdrive) >    44  213651 [main] ls 3332 set_flags: flags: binary (0x2) >    45  213696 [main] ls 3332 mount_info::conv_to_win32_path: src_path > /cygdrive, dst C:\cygwin\cygdrive, flags 0x3000A, rc 0 >   148  213844 [main] ls 3332 build_fh_pc: fh 0x6120EA84 >    28  213872 [main] ls 3332 stat_worker: (\??\C:\cygwin\cygdrive, > 0x22C800, 0x6120EA84), file_attributes 17 >    27  213899 [main] ls 3332 fhandler_base::fstat: here > 25526673 25740572 [main] ls 3332 stat_worker: 0 = > (\??\C:\cygwin\cygdrive, 0x22C800) When stat() is called on the cygdrive dir, it fetches the available drive letters from the system, filters out the floppy drives (without actually accessing the drives!) and filters out any drive which returns INVALID_FILE_ATTRIBUTES in a call to GetFileAttributes(). See http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_disk_file.cc?rev=1.320&content-type=text/x-cvsweb-markup&cvsroot=src, function fhandler_cygdrive::fstat(). The call to GetFileAttributes is probably the culprit. It seems you have network drives mounted to your system, which happen to be slow to respond under some circumstances. High network load? Or, do you have NFS shares mounted under Windows 7? Either way, I don't see any way around that. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple