delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/06/23/12:24:44

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=dC6R1QjkA4xKyFQ2RWqzg+Rcy2+Jltb3HSLvA4vhjDe/oGH504Eyp
bGgpV/901bkDCaGNbsXRnUqE6dOt7Cn9HpppmFj1aUKRDwFPTtMNxbekYNTFRmKG
09Dgpv+oap/tD7egU/n2P2j5dzhKrL3cUKHtDlUN70Jbj7O52/VqlE=
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=SicQNTM8MDXFsB3MzLRbN8pHHtI=; b=M38txBWW8H+ydrSekztzlIJ1fnfK
bQpseKVWoa8u2PqSp0JTdd0bkUj2j6q2zaldMEF6eAE+2izVC3R0Y+dc0q0/XprN
TTgxJ1zGwfp261A84VVJ1xpMOSuQ6UR2CtbjMfEzQEnRoNe1XFZkuMztPugp3GaY
L+rfKQgS1wgVHos=
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=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Mon, 23 Jun 2014 18:24:19 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: getaddrinfo : Non-recoverable failure in name resolution
Message-ID: <20140623162419.GH1803@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <53A81259 DOT 4080300 AT gmail DOT com> <20140623122510 DOT GD1803 AT calimero DOT vinschen DOT de> <53A82688 DOT 9010005 AT gmail DOT com> <53A852B6 DOT 4050702 AT cornell DOT edu>
MIME-Version: 1.0
In-Reply-To: <53A852B6.4050702@cornell.edu>
User-Agent: Mutt/1.5.23 (2014-03-12)

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

On Jun 23 12:15, Ken Brown wrote:
> On 6/23/2014 9:07 AM, Marco Atzeri wrote:
> >
> >On 23/06/2014 14:25, Corinna Vinschen wrote:
> >>Hi Marco,
> >>
> >>On Jun 23 13:41, Marco Atzeri wrote:
> >
> >>>
> >>>64 $ ./getaddrinfo_test-2_64
> >>>getaddrinfo: Non-recoverable failure in name resolution
> >>>
> >>>
> >>>Am I missing something ?
> >>>The second way is currently used on postgresql in several places,
> >>>but it seems to fail only for "127.0.0.1"
> >>
> >>I don't know why this only fails for "127.0.0.1".  But this is clearly a
> >>problem in the 64 bit Cygwin DLL.
> >>
> >>What happens is that the field ai_addrlen is defined as socklen_t in
> >>POSIX, but as size_t in the W32 API.  On 64 bit, socklen_t is 4 bytes
> >>while size_t is 8 bytes.  Setting all the hintp members manually (in
> >>contrast to calloc'ing it or memset'ing it to 0) leaves the 4 upper
> >>bytes of the ai_addrlen untouched.  This in turn leads to a high
> >>probability that ai_addrlen has an invalid value when entering Winsock's
> >>getsockopt.
> >>
> >>I'm really surprised this hasn't been hit before.  I'm going to fix that
> >>in Cygwin by setting the upper 4 bytes of ai_addrlen to 0 explicitely.
> >
> >Probably we have seen already but not identified.
>=20
> I wonder if this could explain the mysterious emacs crashes that have been
> reported on 64-bit Cygwin.  The emacs code does set the hintp members
> manually in some places.
>=20
> The crashes seem to occur randomly, and the backtraces often don't make
> sense.

A crash shouldn't occur, only getaddrinfo returning EAI_FAIL.


Corinna

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

--X+8siUETKMkW99st
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTqFSzAAoJEPU2Bp2uRE+gk24P/i4hM+1FJ3d6b4Uewe6nRpZq
zZywwhLZwYBDpvGrN5y1L1f9SEIxkEO3tP1J0bbLDXWwwNbgtpYZMOYxRJ9qS1LB
NUTZ8qsy5+7N3rk6j2zbbvbHbNelXguTgBaLh6BziWN2eIe/cj6JF/RvDni5iD2B
cwRCOJfo4kXaMu+49on5h+jbQBtKYSXD+vk5nZqpGYJbFKgkiRQy29ImOGuEWTRI
KyLqsZQcGUBFnCazoBTk7KHTRpZBSXrve1VJo1BQi941v2wr38YPvbP2hFv81EiD
w5k4Z0wPi/YDUIOp7FVOz2Ri/fAgfQCbZ8YW0lxZMdOBdneUpyw8fb+XvgcCZGFs
LiIxqGldPOSfGrNoaEC8x/5sSjIN7EKX0paJ1Yzbhv3SnyYKaB82H+OcrgoWcc+r
aIddqnKzNih/tT9yowaHyuW+U0WDkb+FO1U2C6ldGH8mLvGGQqwT4HenTJn6xH2e
8arp8SwDBFoufvtNLT8QrJNSI1Zpt0jIJX7eX7UVTuiYiQjv83UovBURfWVgz27J
HLPYCsPbwDtmN4ozeoFSyfuoa/BnrPnPt1uRtNkLH/dse5w7H2dmbTK7XYeXMdjr
wWZbVlvx2WGAfYbOIWj5glbDGfhSEhEEFOj+fOZLEWk81F+m2BRY1PdDauK9/zGc
TrGUcKrtUwx06W1ekdL4
=7kfF
-----END PGP SIGNATURE-----

--X+8siUETKMkW99st--

- Raw text -


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