jdk14 fork() problem fix

Jonathan Chen jonc at chen.org.nz
Fri Nov 7 17:11:33 PST 2003


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 <jonc at chen.org.nz>
----------------------------------------------------------------------
          "You can get farther with a kind word and a gun
                      than you can with a kind word alone" - Al Capone


More information about the freebsd-java mailing list