X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 5 Mar 2012 17:31:58 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: 1.7.10 cygrunsrv.exe fails with "fork: 11, Resource temporarily unavailable" Message-ID: <20120305163158.GT18852@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4F51BDA2 DOT 1040108 AT cygwin DOT com> <20120304114922 DOT GA18852 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mar 4 15:53, Ulf-Dietrich Braumann wrote: > Yes, Corinna, I reverted this setting again to the default 384MB > heap size calling: > > $ peflags --cygwin-heap=0 /usr/sbin/sshd.exe > and > $ peflags --cygwin-heap=0 /usr/bin/cygrunsrv.exe > > Later on, someone has recommended me to downgrade cygrunsrv from > 1.36-1 to 1.34-1. This helped, so now under cygwin1.dll 1.7.11 the > sshd can be started. However, the mechanism behaves strange > reporting problems: > > C:\>net start sshd > The CYGWIN sshd service is starting. > The CYGWIN sshd service could not be started. > > The service did not report an error. > > More help is available by typing NET HELPMSG 3534. > > > Having a look into the Event Viewer of my Win2k3 64bit machine, I > correspondingly find: > > ... `sshd' service stopped, exit status: 0. I can't reproduce this one, but I can reproduce the original problem System error 1067 has occurred. The process terminated unexpectedly. on Windows 2003 64 bit. It works fine on W7, Windows 2008 R2, and even on Windows 2003 32 bit. I'm still looking into it, but I made an astonishing discovery: If I build cygrunsrv with gcc-3.x, it works. Only when building cygrunsrv with gcc-4.x, it fails as above. However, the reason why starting the service fails is the following: When cygrunsrv runs under SCM, it gets started, then it registers, then scm starts another thread in cygrunsrv. This thread then starts the actual service application like sshd by calling fork/exec. What happens is that forking cygrunsrv fails, because the child process can't duplicate the parent processes stack, because the memory addresses are already taken by something else in the child. Why this only fails when cygrunsrv has been built with gcc-4 but not with gcc-3 is most puzzeling. 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