public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problem with Cygwin 2.4.0-0.18 release
@ 2016-01-12  9:34 Ismail Donmez
  2016-01-12  9:45 ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Ismail Donmez @ 2016-01-12  9:34 UTC (permalink / raw)
  To: cygwin

Hi,

-0.17 was fine but this release breaks sshd, sshd.log says:

1 [main] sshd 2828 C:\cygwin64\usr\sbin\sshd.exe: *** fatal error - unable
to load C:\Windows\system32\ws2_32.dll, Win32 error 1001

Thanks,
ismail

--
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem with Cygwin 2.4.0-0.18 release
  2016-01-12  9:34 Problem with Cygwin 2.4.0-0.18 release Ismail Donmez
@ 2016-01-12  9:45 ` Corinna Vinschen
  2016-01-12  9:50   ` Ismail Donmez
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2016-01-12  9:45 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]

Hi Ismail,

On Jan 12 10:23, Ismail Donmez wrote:
> Hi,
> 
> -0.17 was fine but this release breaks sshd, sshd.log says:
> 
> 1 [main] sshd 2828 C:\cygwin64\usr\sbin\sshd.exe: *** fatal error - unable
> to load C:\Windows\system32\ws2_32.dll, Win32 error 1001

What OS?  32 bit, 32 bit under WOW64 or 64 bit?  How do you start sshd?

I'm asking because

a) What I did was to revert a piece of code to the same state as in 2.2.1.
   Does the "prev" version 2.2.1 work for you?

b) It works fine for me starting sshd as a service under 2.4.0-0.18 on
   64 bit Windows 10.  Logging in works fine as well, as admin user as well
   as normal user.

If push comes to shove I revert the reversion of the patch again, but
I do hope it turns out some local problem.  Error 1001 is weird, it
means "Recursion too deep; the stack overflowed.".  In an OS function?
Just because the path is given as full path?


Thanks,
Corinna


Sidenote: Here's an example where supporting XP hurts, btw.  The code
in question could be much simplified if we only had to support Vista
and later.


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem with Cygwin 2.4.0-0.18 release
  2016-01-12  9:45 ` Corinna Vinschen
@ 2016-01-12  9:50   ` Ismail Donmez
  2016-01-12 12:34     ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Ismail Donmez @ 2016-01-12  9:50 UTC (permalink / raw)
  To: cygwin

Hi,

On Tue, Jan 12, 2016 at 11:28 AM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> Hi Ismail,
>
> On Jan 12 10:23, Ismail Donmez wrote:
>> Hi,
>>
>> -0.17 was fine but this release breaks sshd, sshd.log says:
>>
>> 1 [main] sshd 2828 C:\cygwin64\usr\sbin\sshd.exe: *** fatal error - unable
>> to load C:\Windows\system32\ws2_32.dll, Win32 error 1001
>
> What OS?  32 bit, 32 bit under WOW64 or 64 bit?  How do you start sshd?

Sorry for the brevity of my bug report. This is on Windows 7 SP1
64-bit with cygwin 64bit.

> I'm asking because
>
> a) What I did was to revert a piece of code to the same state as in 2.2.1.
>    Does the "prev" version 2.2.1 work for you?

I am always running cygwin snapshots on this machine and yesterday
-0.17 was working fine. Now I rolled backed to 2.2.1-1 and it works
fine. Went a little bit further and cygwin1-20160109.dll works fine
where-as cygwin1-20160111.dll shows the problem.

> b) It works fine for me starting sshd as a service under 2.4.0-0.18 on
>    64 bit Windows 10.  Logging in works fine as well, as admin user as well
>    as normal user.

Its running as a service, set up by ssh-host-config. No manual
configuration on my side.

> If push comes to shove I revert the reversion of the patch again, but
> I do hope it turns out some local problem.  Error 1001 is weird, it
> means "Recursion too deep; the stack overflowed.".  In an OS function?
> Just because the path is given as full path?
>
>
> Thanks,
> Corinna
>
>
> Sidenote: Here's an example where supporting XP hurts, btw.  The code
> in question could be much simplified if we only had to support Vista
> and later.
>
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Maintainer                 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem with Cygwin 2.4.0-0.18 release
  2016-01-12  9:50   ` Ismail Donmez
@ 2016-01-12 12:34     ` Corinna Vinschen
  2016-01-12 12:35       ` Ismail Donmez
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2016-01-12 12:34 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

On Jan 12 11:45, Ismail Donmez wrote:
> Hi,
> 
> On Tue, Jan 12, 2016 at 11:28 AM, Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> > Hi Ismail,
> >
> > On Jan 12 10:23, Ismail Donmez wrote:
> >> Hi,
> >>
> >> -0.17 was fine but this release breaks sshd, sshd.log says:
> >>
> >> 1 [main] sshd 2828 C:\cygwin64\usr\sbin\sshd.exe: *** fatal error - unable
> >> to load C:\Windows\system32\ws2_32.dll, Win32 error 1001
> >
> > What OS?  32 bit, 32 bit under WOW64 or 64 bit?  How do you start sshd?
> 
> Sorry for the brevity of my bug report. This is on Windows 7 SP1
> 64-bit with cygwin 64bit.
> 
> > I'm asking because
> >
> > a) What I did was to revert a piece of code to the same state as in 2.2.1.
> >    Does the "prev" version 2.2.1 work for you?
> 
> I am always running cygwin snapshots on this machine and yesterday
> -0.17 was working fine. Now I rolled backed to 2.2.1-1 and it works
> fine. Went a little bit further and cygwin1-20160109.dll works fine
> where-as cygwin1-20160111.dll shows the problem.

Still, does 2.2.1 work for you, too?


Corinna

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem with Cygwin 2.4.0-0.18 release
  2016-01-12 12:34     ` Corinna Vinschen
@ 2016-01-12 12:35       ` Ismail Donmez
  2016-01-12 15:39         ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Ismail Donmez @ 2016-01-12 12:35 UTC (permalink / raw)
  To: cygwin

On Tue, Jan 12, 2016 at 11:50 AM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> On Jan 12 11:45, Ismail Donmez wrote:
>> Hi,
>>
>> On Tue, Jan 12, 2016 at 11:28 AM, Corinna Vinschen
>> <corinna-cygwin@cygwin.com> wrote:
>> > Hi Ismail,
>> >
>> > On Jan 12 10:23, Ismail Donmez wrote:
>> >> Hi,
>> >>
>> >> -0.17 was fine but this release breaks sshd, sshd.log says:
>> >>
>> >> 1 [main] sshd 2828 C:\cygwin64\usr\sbin\sshd.exe: *** fatal error - unable
>> >> to load C:\Windows\system32\ws2_32.dll, Win32 error 1001
>> >
>> > What OS?  32 bit, 32 bit under WOW64 or 64 bit?  How do you start sshd?
>>
>> Sorry for the brevity of my bug report. This is on Windows 7 SP1
>> 64-bit with cygwin 64bit.
>>
>> > I'm asking because
>> >
>> > a) What I did was to revert a piece of code to the same state as in 2.2.1.
>> >    Does the "prev" version 2.2.1 work for you?
>>
>> I am always running cygwin snapshots on this machine and yesterday
>> -0.17 was working fine. Now I rolled backed to 2.2.1-1 and it works
>> fine. Went a little bit further and cygwin1-20160109.dll works fine
>> where-as cygwin1-20160111.dll shows the problem.
>
> Still, does 2.2.1 work for you, too?

Quoting my email "Now I rolled backed to 2.2.1-1 and it works fine."

ismail

--
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem with Cygwin 2.4.0-0.18 release
  2016-01-12 12:35       ` Ismail Donmez
@ 2016-01-12 15:39         ` Corinna Vinschen
  2016-01-13  9:58           ` Ismail Donmez
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2016-01-12 15:39 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1976 bytes --]

On Jan 12 11:54, Ismail Donmez wrote:
> On Tue, Jan 12, 2016 at 11:50 AM, Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> > On Jan 12 11:45, Ismail Donmez wrote:
> >> Hi,
> >>
> >> On Tue, Jan 12, 2016 at 11:28 AM, Corinna Vinschen
> >> <corinna-cygwin@cygwin.com> wrote:
> >> > Hi Ismail,
> >> >
> >> > On Jan 12 10:23, Ismail Donmez wrote:
> >> >> Hi,
> >> >>
> >> >> -0.17 was fine but this release breaks sshd, sshd.log says:
> >> >>
> >> >> 1 [main] sshd 2828 C:\cygwin64\usr\sbin\sshd.exe: *** fatal error - unable
> >> >> to load C:\Windows\system32\ws2_32.dll, Win32 error 1001
> >> >
> >> > What OS?  32 bit, 32 bit under WOW64 or 64 bit?  How do you start sshd?
> >>
> >> Sorry for the brevity of my bug report. This is on Windows 7 SP1
> >> 64-bit with cygwin 64bit.
> >>
> >> > I'm asking because
> >> >
> >> > a) What I did was to revert a piece of code to the same state as in 2.2.1.
> >> >    Does the "prev" version 2.2.1 work for you?
> >>
> >> I am always running cygwin snapshots on this machine and yesterday
> >> -0.17 was working fine. Now I rolled backed to 2.2.1-1 and it works
> >> fine. Went a little bit further and cygwin1-20160109.dll works fine
> >> where-as cygwin1-20160111.dll shows the problem.
> >
> > Still, does 2.2.1 work for you, too?
> 
> Quoting my email "Now I rolled backed to 2.2.1-1 and it works fine."

That's what time pressure does to my reading skills... sorry :}

This is a bit weird.  If 2.2.1 using the same method works, why not
2.4.0-0.18?!?

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.


Thanks,
Corinna

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem with Cygwin 2.4.0-0.18 release
  2016-01-12 15:39         ` Corinna Vinschen
@ 2016-01-13  9:58           ` Ismail Donmez
  2016-01-13 11:01             ` Achim Gratz
  2016-01-13 11:02             ` Corinna Vinschen
  0 siblings, 2 replies; 10+ messages in thread
From: Ismail Donmez @ 2016-01-13  9:58 UTC (permalink / raw)
  To: cygwin

Hi,

On Tue, Jan 12, 2016 at 5:05 PM, Corinna Vinschen
<corinna-cygwin@cygwin.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.

Sadly still getting the same error.

ismail

--
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem with Cygwin 2.4.0-0.18 release
  2016-01-13  9:58           ` Ismail Donmez
@ 2016-01-13 11:01             ` Achim Gratz
  2016-01-13 11:02             ` Corinna Vinschen
  1 sibling, 0 replies; 10+ messages in thread
From: Achim Gratz @ 2016-01-13 11:01 UTC (permalink / raw)
  To: cygwin

Ismail Donmez <ismail <at> i10z.com> writes:
> Sadly still getting the same error.

No such problems for a server runnning 2012R2 here...

Regards,
Achim.


--
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem with Cygwin 2.4.0-0.18 release
  2016-01-13  9:58           ` Ismail Donmez
  2016-01-13 11:01             ` Achim Gratz
@ 2016-01-13 11:02             ` Corinna Vinschen
  2016-01-13 15:01               ` Ismail Donmez
  1 sibling, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2016-01-13 11:02 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3520 bytes --]

On Jan 13 09:59, Ismail Donmez wrote:
> Hi,
> 
> On Tue, Jan 12, 2016 at 5:05 PM, Corinna Vinschen
> <corinna-cygwin@cygwin.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.
> 
> 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

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Problem with Cygwin 2.4.0-0.18 release
  2016-01-13 11:02             ` Corinna Vinschen
@ 2016-01-13 15:01               ` Ismail Donmez
  0 siblings, 0 replies; 10+ messages in thread
From: Ismail Donmez @ 2016-01-13 15:01 UTC (permalink / raw)
  To: cygwin

On Wed, Jan 13, 2016 at 12:45 PM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> On Jan 13 09:59, Ismail Donmez wrote:
>> Hi,
>>
>> On Tue, Jan 12, 2016 at 5:05 PM, Corinna Vinschen
>> <corinna-cygwin@cygwin.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.
>>
>> 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

Sorry for that, indeed somehow it overwrite the cygwin1.dll I guess
because I ran setup.exe first and it re-installed -0.18 and then I
manually overwrited cygwin1.dll but somehow failed.

Anyhow it works now, thanks!

Regards,
ismail

--
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-01-13 11:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-12  9:34 Problem with Cygwin 2.4.0-0.18 release Ismail Donmez
2016-01-12  9:45 ` Corinna Vinschen
2016-01-12  9:50   ` Ismail Donmez
2016-01-12 12:34     ` Corinna Vinschen
2016-01-12 12:35       ` Ismail Donmez
2016-01-12 15:39         ` Corinna Vinschen
2016-01-13  9:58           ` Ismail Donmez
2016-01-13 11:01             ` Achim Gratz
2016-01-13 11:02             ` Corinna Vinschen
2016-01-13 15:01               ` Ismail Donmez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).