public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* sshd connections unexpectedly close on windows 2012
@ 2012-06-18 15:36 Arnon Yaari
  2012-06-18 16:35 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Arnon Yaari @ 2012-06-18 15:36 UTC (permalink / raw)
  To: cygwin

Hi,
I'm having problems with running sshd on cygwin on Windows Server 2012 Release Candidate.
I installed cygwin and set up sshd, and I am opening ssh connections using a Python script (running Fabric to perform operations on the Windows machine).
However there appears to be a problem with sshd and my connections sometimes get closed unexpectedly.
I looked in the Event Viewer and found the following log:

"The description for Event ID 0 from source sshd cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

sshd: PID 2860: error: do_exec_pty: fork: Resource temporarily unavailable"

I also looked in the sshd log in c:\cygwin\var\log\sshd and found this error message:

"      5 [main] sshd 180 fhandler_dev_zero::fixup_mmap_after_fork: requested 0xFEF20000 != 0x0 mem alloc base 0x0, state 0x10000, size 1179648, Win32 error 487
   2833 [main] sshd 180 C:\cygwin\usr\sbin\sshd.exe: *** fatal error in forked process - recreate_mmaps_after_fork_failed
   4115 [main] sshd 180 open_stackdumpfile: Dumping stack trace to sshd.exe.stackdump
      2 [main] sshd 2396 fork: child -1 - forked process 180 died unexpectedly, retry 0, exit code 256, errno 11"

It is not easy to debug this problem because it doesn't happen every time I open an ssh connection but only when I open and close multiple connections subsequently using the Python script.
It appears to be random and the script crashes (because of closed connections) at different points every time.
I tried following the FAQ suggestions and some suggestions from other threads but I had no luck:
I tried running rebaseall with 0x77000000 and 0x40000000.
I tried the latest version of cygwin1.dll.
I tried increasing the heap size in the Windows registry.
Restarting the process or using retry loops is not an option because the problem persists.
The same script and setup work fine on Windows 2003, 2008, 2008R2, and Windows 7.
Any idea what might be causing this problem on Windows 2012? Perhaps some memory settings that I'm missing?

Thanks
Arnon

--
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] 3+ messages in thread

* Re: sshd connections unexpectedly close on windows 2012
  2012-06-18 15:36 sshd connections unexpectedly close on windows 2012 Arnon Yaari
@ 2012-06-18 16:35 ` Corinna Vinschen
  2012-06-18 22:08   ` James Johnston
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2012-06-18 16:35 UTC (permalink / raw)
  To: cygwin

On Jun 18 18:35, Arnon Yaari wrote:
> Hi,
> I'm having problems with running sshd on cygwin on Windows Server 2012 Release Candidate.
> I installed cygwin and set up sshd, and I am opening ssh connections using a Python script (running Fabric to perform operations on the Windows machine).
> However there appears to be a problem with sshd and my connections sometimes get closed unexpectedly.
> I looked in the Event Viewer and found the following log:
> 
> "The description for Event ID 0 from source sshd cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
> 
> If the event originated on another computer, the display information had to be saved with the event.
> 
> The following information was included with the event:
> 
> sshd: PID 2860: error: do_exec_pty: fork: Resource temporarily unavailable"
> 
> I also looked in the sshd log in c:\cygwin\var\log\sshd and found this error message:
> 
> "      5 [main] sshd 180 fhandler_dev_zero::fixup_mmap_after_fork: requested 0xFEF20000 != 0x0 mem alloc base 0x0, state 0x10000, size 1179648, Win32 error 487
>    2833 [main] sshd 180 C:\cygwin\usr\sbin\sshd.exe: *** fatal error in forked process - recreate_mmaps_after_fork_failed
>    4115 [main] sshd 180 open_stackdumpfile: Dumping stack trace to sshd.exe.stackdump
>       2 [main] sshd 2396 fork: child -1 - forked process 180 died unexpectedly, retry 0, exit code 256, errno 11"
> 
> It is not easy to debug this problem because it doesn't happen every
> time I open an ssh connection but only when I open and close multiple
> connections subsequently using the Python script.

This is probably the same problem as reported in the thread starting at

  http://cygwin.com/ml/cygwin/2012-06/msg00089.html

There's no solution yet, sorry.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          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] 3+ messages in thread

* RE: sshd connections unexpectedly close on windows 2012
  2012-06-18 16:35 ` Corinna Vinschen
@ 2012-06-18 22:08   ` James Johnston
  0 siblings, 0 replies; 3+ messages in thread
From: James Johnston @ 2012-06-18 22:08 UTC (permalink / raw)
  To: cygwin

> -----Original Message-----
> Sent: Monday, June 18, 2012 16:34
> Subject: Re: sshd connections unexpectedly close on windows 2012
> 
> > "      5 [main] sshd 180 fhandler_dev_zero::fixup_mmap_after_fork:
> requested 0xFEF20000 != 0x0 mem alloc base 0x0, state 0x10000, size
> 1179648, Win32 error 487
> >    2833 [main] sshd 180 C:\cygwin\usr\sbin\sshd.exe: *** fatal error in
> forked process - recreate_mmaps_after_fork_failed
> >    4115 [main] sshd 180 open_stackdumpfile: Dumping stack trace to
> sshd.exe.stackdump
> >       2 [main] sshd 2396 fork: child -1 - forked process 180 died unexpectedly,
> retry 0, exit code 256, errno 11"
> 
> This is probably the same problem as reported in the thread starting at
> 
>   http://cygwin.com/ml/cygwin/2012-06/msg00089.html
> 
> There's no solution yet, sorry.

Just wanting to report that I'm seeing a very similar error on Windows 8 consumer preview with Cygwin snapshot from June 4, 2012.  Yes, I realize that it isn't the latest snapshot - I'll see if I can test on something newer - for now this is just another data point for you.

3 [main] bash 3308 fhandler_dev_zero::fixup_mmap_after_fork: requested 0x7F510000 != 0x0 mem alloc base 0x7F510000, state 0x1000, size 143360, Win32 error 487
1990      268 [main] bash 3308 C:\cygwin\bin\bash.exe: *** fatal error in forked process - recreate_mmaps_after_fork_failed
1991      644 [main] bash 3308 open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
1992        4 [main] TestScript 3744 fork: child -1 - forked process 3308 died unexpectedly, retry 0, exit code 256, errno 11

This was reproduced three times, and each had an error very similar to this one.  At the time of the crash, a bash script was running which was probably invoking either another subshell or perl.  Note that all DLLs had been rebased to not conflict with each other or with ASLR-relocated system DLLs.

This error seems to be very similar to the errors recently reported by Bertrand Latinville and Arnon Yaari:
* Win32 error is the same (487).
* The same functions crashed: fixup_mmap_after_fork, recreate_mmaps_after_fork_failed
* In general, the error looks about the same.

Given that the problem hasn't been fixed and it seems to be most likely to be the same problem as the others, I doubt that upgrading to a newer Windows 8 and Cygwin will help.


--
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] 3+ messages in thread

end of thread, other threads:[~2012-06-18 22:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-18 15:36 sshd connections unexpectedly close on windows 2012 Arnon Yaari
2012-06-18 16:35 ` Corinna Vinschen
2012-06-18 22:08   ` James Johnston

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