From owner-freebsd-java@FreeBSD.ORG Fri Nov 7 17:11:33 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B595916A4CE; Fri, 7 Nov 2003 17:11:33 -0800 (PST) Received: from chen.org.nz (chen.org.nz [210.54.19.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id F339C43F93; Fri, 7 Nov 2003 17:11:32 -0800 (PST) (envelope-from jonc@chen.org.nz) Received: by chen.org.nz (Postfix, from userid 1000) id 27E1E1362A; Sat, 8 Nov 2003 14:11:31 +1300 (NZDT) Date: Sat, 8 Nov 2003 14:11:31 +1300 From: Jonathan Chen To: Alexey Zelkin Message-ID: <20031108011131.GA59596@grimoire.chen.org.nz> References: <20031023122839.A75570@phantom.cris.net> <20031105232543.A99393@phantom.cris.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031105232543.A99393@phantom.cris.net> User-Agent: Mutt/1.4.1i cc: java@freebsd.org Subject: Re: jdk14 fork() problem fix X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2003 01:11:33 -0000 On Wed, Nov 05, 2003 at 11:25:43PM +0200, Alexey Zelkin wrote: > hi, > > Though patch is working it has some limitations. Under high load > java applications which utilize many parallel fork()'s may hang. > > It's reproducible with testcase then least 5 threads calling Runtime.exec() > > After finding a reason I had to rethink logic of 'critical section' > while calling to fork. We can't use pthread_{suspend,resume}_all_np() > in order to not to create race conditions. > > Updated version of patch to this fork problem is attached. I've tried the updated patch and haven't had any problems for a while now. I'll report again on a heavier loaded machine next week. Cheers. -- Jonathan Chen ---------------------------------------------------------------------- "You can get farther with a kind word and a gun than you can with a kind word alone" - Al Capone