delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/01/12/10:01:15

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=RVA2U+FH+vb0C+lCLhINL49x2PwS3q5Cy6/x5r0on7RTUv2gsPxPt
utvGudPVyIK6xIpxIlHBERYF90Jdii6dg0YW1ygBI6ldmGV1IxU7urjm8JlASA2/
n43R759FTdKCREc6+8iOeCKhrh3sn1ymIKMU+2eWD2hGs03pbzNg7Q=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=AunmuSdDnPv6MuxzaAUsQBzcXf0=; b=L6F6IEjPwmUGiRG9SAmGRzkdQhIk
99fXpyEk9vv5gNQwr4eT/MbrR6BC5Ycx79jG0j7oGK/na6gg6yMk+9LbLWjMnbxH
1NkNY6gd2ladG0xoxk86WIHUPLGPSr15in1MDaMGoxIkjH3LbXzM/8W3HkQarog2
IqnCArpm0PnmYu0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-101.6 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=breath, interrupting, H*MI:sk:5876F43, H*i:sk:5876F43
X-HELO: drew.franken.de
Date: Thu, 12 Jan 2017 16:00:50 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: hang on 'cat /proc/mounts' when one of the network drives is on a 'down' system
Message-ID: <20170112150050.GB12383@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <5875B7F6 DOT 8090406 AT tlinx DOT org> <20170111201635 DOT GA29910 AT calimero DOT vinschen DOT de> <5876F43E DOT 7010608 AT tlinx DOT org>
MIME-Version: 1.0
In-Reply-To: <5876F43E.7010608@tlinx.org>
User-Agent: Mutt/1.7.1 (2016-10-04)

--QTprm0S8XgL7H0Dt
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Jan 11 19:13, L. A. Walsh wrote:
> Corinna Vinschen wrote:
> > 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.
> ----
>    Thanks for the explanation.  Looking at my ".bashrc",
> I can't figure out why needed this so I can comment it out.
> However, as an "aside", I'm not sure why my workaround
> didn't work...though I might guess.
>=20
> I tried using 'timeout' from 'coreutils-8.23-4' like:
> readarray -t proc_mounts< <(timeout -k 2 1 cat /proc/mounts)
>=20
> I had hoped that w/cat hanging, timeout waits 1 second (2nd
> number), and if no response after the #secs after -k (2)
> then it's suppose to try to kill it.
>=20
> I'm guessing that since it's a cygwin signal, it is probably
> waiting for Win to return to cygwin land so cygwin can
> process the signal -- but since it's off in la la land,
> cygwin doesn't get a chance to clean up.

Exactly.  The hanging call is just some NtOpenFile call on the
filesystem.  The timeout is an unfortunate effect of accessing
a remote drive.  One problem here is that Cygwin doesn't support
interrupting of synchroneous Windows I/O calls from the signal
handler.  That's something I'm planning to do at one point, but
don't hold your breath.


Corinna

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

--QTprm0S8XgL7H0Dt
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJYd5oiAAoJEPU2Bp2uRE+gQ3MP/0xgnsacU2iBBBVdu5jvbgED
dHEM14nORA0Q31LL6h/rZREJCwVHUFMspnX5rmKVom5LHrSS94Hn7RkBVkaiBQd+
W7O3IMF4MKkOI3v65I0OnmcS11u+0C7B+KNgDyohlKhMmpikdJ7kfUDI/p41eDke
SrWGq2t0HHNAjPz1xGx9MKla9xJS2ZenMK2zlGjrHXgX+PMBin52FpO51Ym8lyA7
1cYlIbi8WKzOBJR/NBQHCMocs03dNHLQfMZ02FE0nEe86JlgEnOYZTmh6803zIz1
OSEkCm2nu3Yhx45vzYKJISVar/KerlA6uDbZBEYnecpzu4VNqSeM/ssRDEhbEHJg
1p7ydbYJnksSrb9YvsqcNc+xwPvLQ0p8K8Pjb3slkLU8UISKPgTYY1qdGicvB0Bk
Tm+ao3FnICwgaiCGt2vqYdZwbGRSYEkhpUPhg1A2uH8sttiJIbodEREH6seLhbfA
9sd8a4nVe2Lxnpodrvrnrtr73kO+pjViGM9jUHiKbIMi3kJQ+dQTg6Z8yZXFrD5T
XqDDVee+bLBNLWfbRkCEvX86yQ4oAZrUjIce0C+jD7qUZGER/OVBmqs8q822uIWI
UHQaMB9UaPjs4hUEgcZtTGwpJDnXiZ0T9ImRRZSECUXO3G4avgFNys8uUq65sw90
kPHG4jk/lG14mnV3VHz2
=uQPW
-----END PGP SIGNATURE-----

--QTprm0S8XgL7H0Dt--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019