X-Spam-Check-By: sourceware.org From: "Charli Li" To: "Cygwin Mailing List" Subject: RE: random "fork: Resource temporarily unavailable" Date: Thu, 15 Jun 2006 21:34:09 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <4491D9B9.8010601@tlinx.org> X-AOL-IP: 70.20.155.229 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k5G1WXKp009637 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----Original Message----- > From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf > Of Linda Walsh > Sent: Thursday, June 15, 2006 6:06 PM > To: cygwin AT cygwin DOT com > Subject: random "fork: Resource temporarily unavailable" > > > I've not seen this message except when I've had to rapidly > press ^C to break out of a loop shell script. > > Today, I've seen it twice when there was virtually no cpu load > on the system, about 50% virtual memory committed, and 40 processes. > > Once, was with an "ls" command, the other happened as my shell was > starting up by some command invoked in the .rc script. > > I get suspicious whenever I see behavior on my computers when > anomalies crop up. > > I don't think any of my cygwin libraries have been updated recently. > > What would cause something like this? Memory fragmentation? > Insufficient real memory to "immediately" fork? I.e. I wonder > if, when NT goes to "fork", if it doesn't have enough free > memory, it tells the caller it failed (try again later) and > then starts a memory cleanup cycle to free up memory: i.e. rather > than the forking process sleeping while memory is made available > NT returns it immediately with a failure. > > Any idea on causes? Is it as rare as it has been for me? > A possible solution would be retry the fork a second time, or > sleep for a millisecond and then try fork again. I'm not sure, > but I think many *ixy (*='un'|'pos'|'lin'|'ir'...etc) type programs > may not retry the fork but immediately die, as on *ixy systems, > a fork failure is less common, and usually only happens when > the system really is out of resources. If that's the case, > it _might_ be an aid to smooth *ixy compatibility for the > library handling fork, retry the fork (possibly with millisecond > sleep) once before returning failure to the application. > > Not a high priority issue, but just wondering.... > > Linda > If it is NT returning failure rather than > forking, I wonder if, in order to provide a better "run-time" > Confirmed. This happens on Windows 2000 Service Pack 4, with the latest *stable* cygwin1.dll. It happens when I even run a configure script, or anything else. It's rare, you're right Linda, and it happens at any time (also a bit annoying). The temporary workaround for me is to just restart the whatever and get on with life. Charli -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Cygwin) iD8DBQFEke+CKGyf4JaPChgRAmVYAJ9vGJHdRWLLdzt/a9L55sY9ieJPGQCfZjV3 p7JbZsrfKOzXEadjSjsL6os= =x6lh -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/