| delorie.com/archives/browse.cgi | search |
| 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=xHbqJ/GWxPfogXqRf+hLbumWBiTqROIZnybbECM7/iXAIOlKx0BQE | |
| ZouD96t0vHgXS5BT+2wTiJDQOdFtLGS8eDBq90Ojlt01caroi/SQR5y+M/cibypW | |
| i7Z4hmarn57sj42243mi65aRifpAj3KS2s4MNGckNto6BXZngEpHro= | |
| 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=3woKMH8tAHaFHcV5WC7FVioXjI4=; b=nIL4dZT3igkSAQmbARyAJM6QD+qO | |
| +466GXy+RTaDP63MUir5am6580DZpEZMmtmy/ZK8c1rP65g3XbQ786Tb3bjPPC7l | |
| ixnVhdv6pS/jrTm1pakTHRCHd2fMO3kqav4VvVOPQgmSR4SgdHV0CSnwZNb5DELW | |
| FSMO6K0O2pqg90c= | |
| 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=-93.0 required=5.0 tests=AWL,BAYES_40,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=grows, H*f:sk:76XBA0w, H*f:CAFo71_6gZ8D, H*i:CAFo71_6gZ8D |
| X-HELO: | calimero.vinschen.de |
| Date: | Wed, 13 Jan 2016 11:45:18 +0100 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Problem with Cygwin 2.4.0-0.18 release |
| Message-ID: | <20160113104518.GA16198@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <CAFo71_69T7m0_SK2DmFpuJxyhCYdOTLeeGYRcpo8rY2uk+Q=8Q AT mail DOT gmail DOT com> <20160112092831 DOT GA15034 AT calimero DOT vinschen DOT de> <CAFo71_78NFHNse7pDC0=kws4HbV+w_o9csHq0_-Hnk2=mxR3ZA AT mail DOT gmail DOT com> <20160112095023 DOT GC15034 AT calimero DOT vinschen DOT de> <CAFo71_4dTguerd5Sh3NX8OrHFgo9zpYcqw6R5PCE=7i_EJwsUw AT mail DOT gmail DOT com> <20160112150538 DOT GE15034 AT calimero DOT vinschen DOT de> <CAFo71_6gZ8D=-=76XBA0wzxOZ1xngcDmwX_2gskjEFpE4XnkPA AT mail DOT gmail DOT com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <CAFo71_6gZ8D=-=76XBA0wzxOZ1xngcDmwX_2gskjEFpE4XnkPA@mail.gmail.com> |
| User-Agent: | Mutt/1.5.24 (2015-08-30) |
--LZvS9be/3tNcYl/X
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Jan 13 09:59, Ismail Donmez wrote:
> Hi,
>=20
> On Tue, Jan 12, 2016 at 5:05 PM, Corinna Vinschen
> <corinna-cygwin AT cygwin DOT com> wrote:
> > I tried to workaround this problem by "upgrading" the DLL load
> > mechanism to use the facilities available since Vista. In theory
> > this should work fine for you. I uploaded a new developer snapshot
> > to https://cygwin.com/snapshots/ Please give it a try.
>=20
> Sadly still getting the same error.
That doesn't make sense. The new code has a fallback which is identical
to the code in -0.17. No offence, but are you *sure* you're using the
snapshot DLL? Uname on 64 bit should print:
$ uname -srvm
$ CYGWIN_NT-6.1 2.4.0(0.293/5/3) 2016-01-12 14:54 x86_64
Can you re-check, please?
[...testing myself...]
Ok, so I just set up sshd on a W7 64 bit machine and I can actually
reproduce the problem with -0.18.
However, it starts to work fine for me with the snapshot!
So I added debug output to the Cygwin DLL and there's something strange
going on on W7 64. When loading ws2_32.dll in this single instance of
logging in to sshd, the LoadLibrary call to ws2_32.dll fails in one of
the child processes with a stack overflow. The *next* call to
LoadLibrary works fine, though. My debug output inspected the stack.
Quick introduction for those not overly familiar with this stuff:
- AllocationBase is the memory address the stack has been reserved at.
- StackLimit is the lowest address of the committed region on the stack.
StackLimit is always > AllocationBase and < StackBase.
- FramePointer is the value of the $ebp register which denotes the current
stack usage in this function. FramePointer is always > StackLimit and
< StackBase.
- StackBase is the uppermost address of the stack, the address from where
the stack grows downward.
Given this, low values of StackLimit mean a high stack pressure, high
values a low stack pressure.
Here are the stack values on Windows 10 before and after the LoadLibrary
call to ws2_32.dll which works on W10 and W8.1 but fails on W7:
AllocationBase FramePointer
StackLimit StackBase
Windows 10:
before: 0xFFE00000 0xFFFFAE60 0xFFFFBE80 0x100000000
after : 0xFFE00000 0xFFFF9000 0xFFFFBE80 0x100000000
Windows 8.1:
before: 0xFFE00000 0xFFFFAE60 0xFFFFBE80 0x100000000
after : 0xFFE00000 0xFFFFAE60 0xFFFFBE80 0x100000000
Windows 7:
0xFFE00000 0xFFFFAE60 0xFFFFBE80 0x100000000
0xFFE00000 0xFFE01000 0xFFFFBE80 0x100000000
^^^^^^^^^^
So, before the call to LoadLibrary, the stack is completely correct, as
on W10 and W8.1. However, after the LoadLibrary call, the StackLimit
has changed to the maximum possible value. What does that mean? For
some reason LoadLibrary(ws2_32.dll) took up all space available on the
stack and then failed because there was no more stack. Interesting
enough, the *next* call to LoadLibrary then worked as expected.
Why this happens? I have no idea. Probably a bug in W7.
So, Ismail, please test again if you're really using the snapshot DLL.
The fact that I can reproduce the problem *and* fix it by running the
snapshot, *and* reproducibly create the error on W7, but not on W8.1
or W10 indicates to me that this sould be fixed for you as well.
Thanks,
Corinna
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--LZvS9be/3tNcYl/X
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWliq+AAoJEPU2Bp2uRE+gGlkQAIRhIInawkLF99hWe1jeR0Ic
NGv/14JW/mC5aFIN4YYazro9YR5wd9aTBkp8jkxpLC2/PjyccRhVQUpWmtUJ7/at
NxBTOIVb3VL6fS7mZgDNQlJRprnMEFNmbyiCVtNjNWF1wRLyMsQsAPdSHRP9emvd
XfHDKEhV05GgOvAZB8eTgaUHIUYR5rgkhBtbp3BJpDoeBqUeHJhXzfasFBEmuTvE
TGMa1ElYhcdnKHBv1jllYLFlvzlCwiBoiaHR0YOpIH6+RHEDKgPVU24h8m1qHsOb
3V4GdrVPqNejGvjtv5Mj0BEXJkEOD3cwMxfAcwI+1LdKJw3MIU4hkqTgsRuKAfcD
YlYAv/HaaTLD56l12lwHtbEMc4SWC3NZOjUSOl0cB4ifmgOyV4xpmCXFm6e7N9fE
eBzsUVU+lfLPoC2LCGkHYOaYNeRFKg/k2gxrZbHRiYdej7MdHwwFg39VoLb13+Sr
8iQ8irkzghfeYIPBWkn9vsNrQt+/j5Hx8NQa599Oa0L5C2tCUcGK7DQMXeySQZ4d
PZUi1SKbJgcBC87AVnQSsaoVoXCrVFsO4K5WwDqgH4Ugmf12PYT8KVndMpORkrCs
xH8zqNEze7yEh4VxIpZdN1UfLzT7lDrgnB8ZwK89PGkJggm2yOfWlkRcUT0rQub/
9WTaP3rvEJdSWcIaIfA8
=EHXI
-----END PGP SIGNATURE-----
--LZvS9be/3tNcYl/X--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |