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]

Re: cd /cygdrive hangs for some time.


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


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