Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Originating-IP: [150.101.112.4] X-Originating-Email: [tilps AT hotmail DOT com] From: "Gareth Pearce" To: Subject: eagain failures with open files and fork? Date: Tue, 22 Apr 2003 01:14:59 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: 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/