From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1991 invoked by alias); 21 Feb 2012 16:29:41 -0000 Received: (qmail 1496 invoked by uid 22791); 21 Feb 2012 16:29:09 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Tue, 21 Feb 2012 16:28:55 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 7970F2C006A; Tue, 21 Feb 2012 17:28:53 +0100 (CET) Date: Tue, 21 Feb 2012 16:29:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Fork/resource unavailable - SSH/Citrix Message-ID: <20120221162853.GI22597@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: 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@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-02/txt/msg00627.txt.bz2 On Feb 21 14:53, Adam Thompson wrote: > Dear all, > > About 3.5 years ago, I was looking into why a lot of Citrix > Presentation Servers were seeing their SSH services fall over. > > I did actually discover the issue in the end, but neglected to post back here. > > I found that the issue was the Citrix API hooking, which messes with > the fork() call. I am not a developer, but my understanding is that > when a process calls fork(), it is expecting to have a child process > created with an exact copy of all its pages. I'm guessing that the Right. > injected DLLs prevent this from being an exact copy, and therefore the > fork() call fails. I'm not sure why it fails with err 11 (EAGAIN: > Resource temporarily unavailable). I would have thought that err 4 > (EINTR: Interrupted system call) would be a better fit in this > instance. But then, I suppose this depends on how Cygwin interprets > what is returned to it in its own NT/Win32 API calls. No, EAGAIN is the right errno per POSIX. EINTR is not a valid errno for fork. > Anyhow.... there's a Citrix KB article on how to disable hooking on a > per-executable basis at: > > http://support.citrix.com/article/CTX107825 > > I found that adding sshd.exe and cygrunsrv.exe to the > ExcludedImageNames key was enough to fix the problem on the servers I > saw the problem on. > > As this applies to all versions of Citrix Metaframe Presentation > Server / XenApp, it might be worth adding these to BLODA. > > The hooking is done via AppInit_DLLs [1], so for at least > Win2000/2003/XP, this key would be a good place to start looking for > unexplained fork() failures, and perhaps also merits a mention on the > BLODA page. I added that to the FAQ. Thanks, 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