[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: race condition with reap_children when $(shell) used

From: Grant Taylor
Subject: Re: race condition with reap_children when $(shell) used
Date: Fri, 25 Apr 2003 17:24:51 -0400

>>>>> Grant Taylor <address@hidden> writes:

> I've identified a job token leak caused by a race between func_shell

I've found another token leak.  This one is unrelated, but has a
similar effect.

If you use the -l loadavg job waiting feature, then when the load was
or is too high, make may or may not obtain a token for jobs it puts in
the waiting_jobs list.  This is because it obtains a token only if
there are live children, and it is possible for there to be no live
children yet many waiting children.  I believe it should always obtain
(and yield) tokens if there are *either* waiting or live children,
however doing this alone does not solve the problem.

I do have a working fix implemented by maintaining a count of tokens
in the process as they come and go; this works well, and makes it easy
to add assertions that find these issues, but my patch is a bit ugly.

Grant Taylor - http://www.picante.com/~gtaylor/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]