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: hang on 'cat /proc/mounts' when one of the network drives is on a 'down' system


On Jan 10 20:43, L A Walsh wrote:
> I noticed my local terminals were not opening w/a shell prompt, but
> would timeout if I waited long enough...(1-2 minutes? maybe?).
> 
> Turns out, one of my mounted net-drives was a down-system, so
> if I was trying to access the drive (or content on it), I can see
> it hanging.
> 
> But what about "cat /proc/mounts" which is dumping out text
> like:
> 
> Z: /z ntfs binary,user,noumount,auto 1 1
> 
> should require accessing and hanging for a few minutes?
> Is it determining the network file type?  Wouldn't that
> remain constant for a given session (like I doubt that
> ntfs would exchange with smbfs and go back on fixed IP
> machines).
> 
> I've tried using 'timeout', but it doesn't seem to work:
> 
> read -t proc_mounts < <(timeout -k 2 1 cat /proc/mounts)
> 
> (still hangs)

I know why this happens but I don't see an easy way around that.

Basically the problem is that Cygwin has no control over the OS mount
points (i. e., drive letter mapping and volume ireparse points).  Given
that, apart from C: maybe, the drive letter mapping can change any time,
Cygwin doesn't cache the information but requests it every time it needs
it.  This includes information required in /proc/mounts, here basically
the FS type.  This in turn requires to open a handle to the FS, which
may result in the observed hang.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


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