| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
this switch is recognized by gcc and clang, and clang warns about unused command-line args: -Wunused-command-line-argument warning
|
| |
|
|
|
|
| |
Issue #452. jobs limit
|
|
|
| |
Found via `codespell -q 3 -S ./ChangeLog -L ake,ba,msdos,paralel,te`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately autoconf and GCC don't agree on the system name:
- On arm (aarch64): `GNU_HOST` is `aarch64-unknown-linux-gnu`,
and GCC triple is `aarch64-linux-gnu` instead.
- On rpm-based x86_64 distros: `GNU_HOST` is `x86_64-pc-linux-gnu`,
and GCC triple is `x86_64-redhat-linux`
Therefore ask the compiler (when running distcc configure script)
how to correctly identify it.
Closes: #440
ALTBUG: 40425
|
|\
| |
| | |
Restrict number of retries when backoff is disabled
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since the commit a7dd5cf90e8c ("Try a new host after failing to
connect instead of immediately falling back to localhost") distcc
tries to choose a different host on connection/protocol errors.
However when backoff is disabled (DISTCC_BACKOFF_PERIOD=0)
distcc keeps retrying forever.
To avoid the problem limit the number of retries (currently to 3)
when backoff is disabled.
Closes: #434
|
| | |
|
|\ \
| | |
| | | |
Improved cross-compilation with clang
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With this patch I can cross-compile Linux kernel with clang and distcc.
Otherwise both remote compilation and local fallback fail like this:
cat > foo.c <<-EOF
int main(int argc, char **argv) { return 0; }
EOF
env DISTCC_HOSTS=127.0.0.1 distcc clang -c --target=aarch64-linux-gnu- -o foo.o foo.c
error: unknown target triple 'unknown', please use -triple or -arch
distcc[304773] ERROR: compile foo.c on 127.0.0.1 failed
distcc[304773] (dcc_build_somewhere) Warning: remote compilation of 'foo.c' failed, retrying locally
distcc[304773] Warning: failed to distribute foo.c to 127.0.0.1, running locally instead
error: unknown target triple 'unknown', please use -triple or -arch
distcc[304773] ERROR: compile foo.c on localhost failed
Linux' kernel makefiles specify the target arch with `--target=foo`,
and distcc expects `-target foo`, hence the problem.
Closes: #416
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This new option sets /proc/self/oom_score_adj in prefork worker child
processes. This can afford users a bit of protection against a scenario
in which many concurrent compilation jobs cause an out-of-memory
condition that prompts the kernel's OOM killer to kill a process that is
not so "disposable" as a distccd worker.
This commit adds a new Autoconf test to check whether the host system
type (that is, the type of the system on which the compiled binaries are
to be run) is Linux. The new --oom-score-adj option is implemented only
if the host system type is Linux.
|
| |
| |
| |
| |
| |
| |
| |
| | |
`dcc_check_compiler_whitelist` bails out if $prefix/lib/distcc
directory does not exists. With this patch it keeps looking
in /usr/lib/distcc instead.
Closes: #431
|
|\ \
| | |
| | | |
Revert "Skip distributing LTO cc invocations"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 8dacd28d888210753e9457eb31175d8e2a1c348e.
The "LTO invocations are not worth distributing" statement is in
general wrong. GCC generates the (target) machine code for every
compilation unit even with `-flto` (so it makes sense to distribute
these). And the whole program analysis is not guaranteed to be
the bottleneck of the build. As a matter of fact distributing
LTO compilations reduces the build time of LLVM/clang, GCC, and
other programs (especially C++ ones).
Closes: #428
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On ALT Linux I've run into the following bug:
distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
free(): invalid next size (fast)
Aborted (core dumped)
Apparently dcc_gcc_rewrite writes beyond the allocated memory:
valgrind --leak-check=full -v ./distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
==11382== ERROR SUMMARY: 53 errors from 5 contexts (suppressed: 0 from 0)
==11382==
==11382== 1 errors in context 1 of 5:
==11382== Invalid write of size 1
==11382== at 0x4C349D8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
==11382== by 0x10E380: main (distcc.c:352)
==11382== Address 0x544e828 is 1 bytes after a block of size 23 alloc'd
==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
==11382== by 0x10E380: main (distcc.c:352)
==11382==
==11382==
==11382== 1 errors in context 2 of 5:
==11382== Invalid write of size 1
==11382== at 0x4C349C8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
==11382== by 0x10E380: main (distcc.c:352)
==11382== Address 0x544e827 is 0 bytes after a block of size 23 alloc'd
==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
==11382== by 0x10E380: main (distcc.c:352)
and ALT Linux' hardened glibc does not quite like that.
Correctly compute the `newcmd_len` to avoid the problem.
ALTBUG: #40425
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Observed behavior
-----------------
When compiling a big C project (Linux kernel) with
distcc compilation nodes never use 100% of CPU time, instead a system
is 25 -- 40% idle (despite --jobs is set to 3x the number of cores).
Analysis
--------
Linux kernel consists of many relatively small C sources and header
files. Compiling a single source file typically takes a fraction of
a second (although there are quite a number of "heavier" sources).
`dcc_preforked_child` exits after 50 requests. Thus a typical lifetime
of a worker process is just a few seconds. However `dcc_create_kids`
sleeps for a second after every fork. Also `dcc_preforked_child` sleeps
for yet another second. Which is >= 25% of a typical child lifetime.
As a result distccd is unable to use available CPU time (system load
is always <= 75% during the compilation).
Fix
---
Removed `sleep` from `dcc_preforking_parent` and `dcc_create_kids`.
Also made `dcc_preforked_child` process compilation jobs for at least
60 seconds.
Result
------
Kernel compilation time (two 6-core nodes) reduced almost 2x:
before: 20 minutes, after: 12 minutes
Closes: #420
|
|/ |
|
|\
| |
| | |
Fix memory and file descriptor leaks
|
| |
| |
| |
| |
| | |
asprintf() returns -1 on failure, which evaluates to true, and the
resulting string is undefined in this case.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
At least that is what the experts in #gtk are telling me.
"Unless you want to support libgnome, which was deprecated long before
GNOME3 was released: yes, you can drop it."
|
| | |
|
|\ \
| | |
| | | |
Port distccmon-gnome from gtk2 to gtk3
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This does not seem to be needed anymore, if it ever was...
This removes deprecated gtk_alignment_new function.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This seems to work and look the same as before, except that it does not
crash and I don't see the wierd big bars anymore.
|
| | | |
|
| | |
| | |
| | |
| | | |
As it seems that this is not needed for gtk3 with the cairo stuff.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Try to align function prototypes
Actually works, but is a bit unstable.
Bar can appear in left pane or right pane and fill the whole window
height, or it can outright crash randomly. Maybe mostly when resizing
the window?
Or certainly when you click the area with the bars.
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes: #402
|
|/ /
| |
| | |
Found via `codespell v2.1.dev0`
|
| |
| |
| |
| |
| |
| |
| | |
EEXIST is for existing files on exclusive creation, the correct one for
missing files is ENOENT.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
|
|/
|
|
|
|
|
|
| |
I have debugged an issue where the command line contained an empty
argument. It was quite hard to debug, because the debug log did not show
the empty argument properly.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
|
|
|
|
|
|
|
|
| |
src/clirpc.c:126:9: warning: code will never be executed [-Wunreachable-code]
It looks like ~12 years ago someone added a log statement to this
if() block while they had Python on their mind. This means that
the "expected version" check has been broken that entire time.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Cygwin uses macros for isspace, isdigit etc. that intentionally issue
a warning when the argument is char (-Wchar-subscripts).
|
|
|
|
|
|
|
|
| |
src is in the include paths (the Makefile has -Isrc), and it contains
rpc.h, which collides with an internal header with the same name inside
/usr/include/w32api. This leads to compiler errors.
Fix by defining WIN32_LEAN_AND_MEAN, which prevents inclusion of rpc stuff.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, distccd unconditionally adds `-MMD` to the compiler
invocation in pump mode. This leads to undesired behaviour if one
passes `-MD` to the compiler. For GCC, this leads to prefering `-MMD`,
which is more restrictive and might cause incorrect builds due to missed
system header dependensies. OTOH, Clang prefers `-MD`, which is safer
but emits the following warning:
```
clang-8: warning: argument unused during compilation: '-MMD' [-Wunused-command-line-argument]
```
The changes here fix this by only adding `-MMD` if neither `-MMD` nor
`-MD` is already present. Some exceptions in the tests, related to this bug,
are removed and the corresponding tests are now passing for Clang and
GCC.
|
|
|
|
|
|
|
|
|
|
| |
https://gcc.gnu.org/gcc-10/porting_to.html)
This fixes the following link error I see when I use the latest gcc 10
git branch:
/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/serve.o:(.bss+0x0): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/stats.o:(.data+0x20): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
|
|\
| |
| | |
Ignore -stdlib c++ command-line parameter
|
| | |
|
| |
| |
| |
| |
| |
| | |
Removed the flag that only allows numeric IP addresses for the allowed
clients. DNS lookup will only be performed if configured with
--enable-rfc2553.
|
|/
|
|
| |
to localhost
|