[distcc] [PATCH] retry compiling when remote gcc was killed by signal

Jakub Stachowski qbast at go2.pl
Tue Jul 13 03:47:04 GMT 2004


Dnia wto 13. lipca 2004 04:56, Martin Pool napisał:
> On 12 Jul 2004, Jakub Stachowski <qbast at go2.pl> wrote:
> > Hello,
> >
> > I noticed that return codes > 128 (which means that compiler was killed
> > by signal) is treated exactly as normal compilation error. However,
> > killing compiler indicates problems with system (in most cases not enough
> > memory) or compiler itself, not with source code. So there is still
> > chance that retrying compilation on local machine will succeed. Typical
> > example: I compile KDE (lots of big c++ files) on several machines with
> > 64-128MB of RAM ('localhost' has 512MB RAM). I use distccKnoppix so there
> > is no possibility to use swap on these machines. Sometimes one of them
> > run out of memory and gcc gets killed and make finishes with error. Then
> > I have to restart make with -j1 (to build offending file on localhost as
> > it has enough RAM), then restart it again with -j8 and hope for the best.
> >
> >  Attached simple patch treats remote errors caused by killed compiler as
> > distribution errors. This means that distcc will fallback to local
> > compilation of offending file and problematic host will get blacklisted
> > for a minute.
>
> Hi,
>
> You should try starting distccd with 'distccd -j 1' on machines that
> can only fit a single job at a time.

I specify them as host/1 in hosts file and they obey that. It works *almost* 
all the time  -  sometimes (I recall 3 or 4 occurences in kdenetwork build) 
too big file comes and even one job at a time is too much. Last option is to 
disable them at all, but I think it would be a waste - after all there are 
only few cases when compiler gets killed so it does not put much more load on 
localhost. I think the only possible loss from the patch is when job failed 
remotely because of oom (or gcc/kernel/hardware bug) and localhost also is 
memory-challanged (or has the same bug).

>
> I'll have a think about the patch.

Thanks.



More information about the distcc mailing list