delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/07/11/04:28:38

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 11 Jul 2011 10:27:40 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Random fork failures
Message-ID: <20110711082740.GC8249@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4E1AAF38 DOT 9040100 AT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <4E1AAF38.9040100@gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

On Jul 11 11:07, yoni levi wrote:
> Hi,
> 
> We have a problem with fork for a very long time.
> From time to time, fork just hangs (with 2 process doing busy loop).
> The problem occurs when we do allot of spawns (make system).
> It is very easy to recreate the problem, but unfortunately, there is
> too much code involve to send.
> 
> I did a little investigation - when the process hangs, I took the
> backtrace with process explorer.
> Process explorer does not know anything about cygwin debug symbols,
> so it just give an arbitrary func + offset.
> Then I used gdb to find out the real function: sync_proc_pipe doing
> yield in an endless loop.
> 
> It seems that there is a race condition here, since this error
> depends on timing. when the CPU is very busy (e.g. when
> I do while((1)); do true; done X 4 times), the frequency of the
> problem is reduced.
> 
> I dug a little bit in the mailing list and found many references to
> fork failure. I belive this one is similar to my problem -
> http://cygwin.com/ml/cygwin/2011-04/msg00066.html
> 
> I also saw all the work done around fork lately (http://old.nabble.com/Re%3A-Improvements-to-fork-handling-td31594702.html)
> so I tried to use the latest cygwin from CVS.
> This acctualy was very helpful, and this error disappear. the
> problem is that many other errors/crashes are introduced!
> Many perl scripts stopped working, rxvt crashes from time to time,
> gcc fails with no good reason and more.

I'm using the latest from CVS all the time and I'm not seeing any such
problems.

> I will appreciate any advice, how can I solve this problem.

Simple, self-contained testcases, preferredly in plain C, or simple
scripts in case the problem only occurs in a script language, which
allow to reproduce the problem.  Those would be most helpful.


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

- Raw text -


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