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. Greetings, Jakub
diff -urdN distcc-2.16/src/compile.c distcc-new/src/compile.c --- distcc-2.16/src/compile.c 2004-07-06 07:00:09.000000000 +0200 +++ distcc-new/src/compile.c 2004-07-11 09:15:02.000000000 +0200 @@ -169,7 +169,7 @@ dcc_unlock(cpu_lock_fd); - return dcc_critique_status(*status, "compile", input_fname, host, 1); + if ((ret=dcc_critique_status(*status, "compile", input_fname, host, 1))<128) return ret; fallback: if (host)
__ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/distcc