Michał Górny wrote:
> Follow-up Comment #5, bug #67726 (group make):
> 
> The most common case for tokens not being returned is that the client is
> killed, e.g. by the OOM-killer, and therefore has no chance to return them.
> Admittedly, this is not a major problem for a limited scope jobserver such as
> make's, since it is likely to terminate soon afterwards, but it is a major
> blocker for a global jobserver, that has no real way of accounting for lost
> tokens via a FIFO, and reclaiming them.  Given that builds are performed
> independently of the server, including in containers, it is quite possible for
> that scenario to occur without actually killing the jobserver as well, and
> given that the whole container may effectively be terminated, it is even
> possible that the initial job required to start the client will not be
> returned, leaving the server with no tokens at all, and no diagnostic other
> than "nobody returned tokens for a while".
> 
> I don't see why anyone would be writing software specifically for a global
> jobserver, which is a pretty specialized use case, without actually being
> concerned about it working in the more common case of GNU make jobserver.  And
> even if they were to, they would do that anyway, irrespective of what the spec
> says.  Another common case for not returning tokens is when the processes are
> terminated with a signal (but they can perform cleanup), and requiring the
> FIFO file type does not help with that either.  Either way, the best the user
> gets is a diagnostic that not all tokens were returned -- in case of GNU make,
> without information what process actually consumed them.

In the case of GNU make, it knows when one of its children is killed, so it can 
still keep
an accurate token count. If there is a global jobserver using this mechanism, 
then it's that
jobserver's job to track what its children are doing.

Anyway it really doesn't matter whether the child is inside a container or not;
whatever causes a process to be killed without returning the token has broken 
the build
procedure and everybody has to unwind and terminate anyway.

-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to