X-Spam-Check-By: sourceware.org Date: Fri, 23 Jun 2006 01:23:00 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: CygPerl hangs opening FIFO after fork (in both parent&child) Message-ID: <20060623052300.GB8229@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <449B08E2 DOT 9040302 AT tlinx DOT org> <449B49A2 DOT 7E5EB78B AT dessent DOT net> <20060623025236 DOT GA2720 AT efn DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060623025236.GA2720@efn.org> User-Agent: Mutt/1.5.11 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 On Thu, Jun 22, 2006 at 07:52:37PM -0700, Yitzchak Scott-Thoennes wrote: >On Thu, Jun 22, 2006 at 06:53:38PM -0700, Brian Dessent wrote: >> Linda Walsh wrote: >>>The attached test case is simple and fairly short. It does not depend >>>on File::BOM (and has none of the code from it). >>> >>>It's only dependency (other than perl) is the POSIX module, where, >>>from, the "fifo" command is taken. >> >>This appears to be a deadlock in the Cygwin DLL when both the reader >>and writer end of a fifo tries to open the file at the same time (or >>nearly the same time.) They end up signaling each other to ask about >>the other end of the pipe, and hang there. It has nothing to do with >>perl or fork, as far as I can tell -- the attached C testcase will work >>fine if the reader end sleeps briefly to ensure the opening order. >>It's just a classic race condition somewhere. > >Good job isolating this problem, Linda and Brian. Not to denigrate Brian's analysis but, AFAICT, there was already a snapshot with the fix by the time he sent his mail. I only point this out because I didn't want it to look like I was ungrateful for Brian's analysis or that I used it and didn't give credit. cgf -- 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/