delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/21/11:46:10

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Originating-IP: [150.101.112.4]
X-Originating-Email: [tilps AT hotmail DOT com]
From: "Gareth Pearce" <tilps AT hotmail DOT com>
To: <cygwin AT cygwin DOT com>
Subject: eagain failures with open files and fork?
Date: Tue, 22 Apr 2003 01:14:59 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <BAY2-DAV18etVoMDrxx00005106@hotmail.com>
X-OriginalArrivalTime: 21 Apr 2003 15:45:59.0560 (UTC) FILETIME=[1AF14880:01C3081D]

I was wondering if there is a known issue with fork not handling well when
the program has a significant number of open files.  I was working on some
code today, which would work perfectly under linux, but under cygwin it
would crash, usually after showing several 'Ressource temporarly
unavailable' (EAGAIN) errors in responce to accept calls.  The code being
exercised at that point wasnt related to what I had changed so I was
confused.  A very long close examination of my changes aided by reading an
strace, showed that I had forgotten to fclose in my new code, resulting in
140 files being open (as opposed to the usual 5).  The thing about the
EAGAIN errors I found odd, is that they were on sockets which had been
marked readable by select.  I pondered further, and I wondered if it was a
fork issue, since the code fork/execs an ident client to gain ident details,
before exec'ing, the child process closes all file descriptors.

I would try and reduce a testcase, but its 90thousand lines of code, so I
don't hold much hope.  I do have an strace (9meg) of the system during a
crash, not one which shows the resource temporarily unavailable messages
from accept, but its the same issue.

The issue has gone away for me now, since I wanted to fclose those files
anyway, but I thought I'd report it since it certainly seemed wrong.

Regards,
Gareth

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019