Discussion:
[distcc] distcc doesn't read /etc/distcc/hosts when started by rpmbuild
Sam Varshavchik
2015-06-14 14:33:00 UTC
Permalink
I have /etc/distcc/hosts configured with 4 local builds, and 6 distibuted
builds.

When I run 'make -j 10' myself, the build gets correctly distributed. But
something strange happens when I try to use rpmbuild.

I have rpmbuild properly configured to run 'make -j 10'. And I see that ten
distcc instances get started, but only for localhost builds appear to be
running, and the remaining processes wait until a localhost slot becomes
available, before spawning off g++.

I strace-d the entire rpmbuild.

What I see is that distcc never reads /etc/distcc/hosts, and just proceeds
to run a local build.

When I run 'make -j 10' myself, this is what I see the distcc process doing:

17180 mkdir("/home/mrsam/.distcc", 0777 <unfinished 
>
17180 <
 mkdir resumed> ) = -1 EEXIST (File exists)
17180 access("/home/mrsam/.distcc/hosts", R_OK) = -1 ENOENT (No such file or
directory)
17180 access("/etc/distcc/hosts", R_OK <unfinished 
>


 and so on.

When I strace an entire rpmbuild, the distcc process, instead, does this:

10068 mkdir("/home/mrsam/.distcc", 0777 <unfinished 
>
10068 <
 mkdir resumed> ) = -1 EEXIST (File exists)
10068 mkdir("/home/mrsam/.distcc/lock", 0777 <unfinished 
>
10068 <
 mkdir resumed> ) = -1 EEXIST (File exists)
10068 open("/home/mrsam/.distcc/lock/cpu_localhost_0", O_WRONLY|O_CREAT,
0666 <unfinished 
>


 and so on. What are the reasons distcc decides to skip checking
/etc/distcc/hosts? grepping the entire strace, distcc never tries to read
/etc/distcc/hosts.
Yassine ILMI
2015-06-15 08:01:14 UTC
Permalink
Hi Sam,

1 - From my understanding, distcc is looking for its configuration from
environment variables (for the current session) or for a config file
located in $DISTCC_DIR/hosts directory -
http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html#TOC_15

2 - I'm not sure how distcc handle configuration from files depending on
distributions, you should also run "distcc-config" utility. More
information about distcc configuration keys here :
http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html#TOC_22

3 - I prefer to configure distcc using environment variable directly in a
file and source it when needed. You should check if the session used to run
rpmbuild also have distcc environment variables set.

Cheers,
Yassine
Post by Sam Varshavchik
I have /etc/distcc/hosts configured with 4 local builds, and 6 distibuted
builds.
When I run 'make -j 10' myself, the build gets correctly distributed. But
something strange happens when I try to use rpmbuild.
I have rpmbuild properly configured to run 'make -j 10'. And I see that
ten distcc instances get started, but only for localhost builds appear to
be running, and the remaining processes wait until a localhost slot becomes
available, before spawning off g++.
I strace-d the entire rpmbuild.
What I see is that distcc never reads /etc/distcc/hosts, and just proceeds
to run a local build.
17180 mkdir("/home/mrsam/.distcc", 0777 <unfinished 
>
17180 <
 mkdir resumed> ) = -1 EEXIST (File exists)
17180 access("/home/mrsam/.distcc/hosts", R_OK) = -1 ENOENT (No such file
or directory)
17180 access("/etc/distcc/hosts", R_OK <unfinished 
>

 and so on.
10068 mkdir("/home/mrsam/.distcc", 0777 <unfinished 
>
10068 <
 mkdir resumed> ) = -1 EEXIST (File exists)
10068 mkdir("/home/mrsam/.distcc/lock", 0777 <unfinished 
>
10068 <
 mkdir resumed> ) = -1 EEXIST (File exists)
10068 open("/home/mrsam/.distcc/lock/cpu_localhost_0", O_WRONLY|O_CREAT,
0666 <unfinished 
>

 and so on. What are the reasons distcc decides to skip checking
/etc/distcc/hosts? grepping the entire strace, distcc never tries to read
/etc/distcc/hosts.
__
distcc mailing list http://distcc.samba.org/
https://lists.samba.org/mailman/listinfo/distcc
Sam Varshavchik
2015-06-15 10:54:33 UTC
Permalink
Post by Yassine ILMI
3 - I prefer to configure distcc using environment variable directly in a
file and source it when needed. You should check if the session used to run
rpmbuild also have distcc environment variables set.
I did check directly what environment the distcc process inherited. It did
not have DISTCC_HOSTS set.
Sam Varshavchik
2015-06-17 03:08:59 UTC
Permalink
Post by Sam Varshavchik
Post by Yassine ILMI
3 - I prefer to configure distcc using environment variable directly in a
file and source it when needed. You should check if the session used to run
rpmbuild also have distcc environment variables set.
I did check directly what environment the distcc process inherited. It did
not have DISTCC_HOSTS set.
After receiving some emailed tips, I'm still not really any closer to
figuring out what's going on.

$ distcc --show-hosts
monster.email-scan.com:3632/6,lzo
localhost/4

This looks fine, and, as I said, manually running make directly ends up
correctly farming out six out of ten concurrent builds to the server.

But, during an rpmbuild, all compiles still run only on localhost. I've set
DISTCC_LOG and DISTCC_VERBOSE, and the resulting log file doesn't have
anything obvious in it, except for the fact that it logs localhost compiles
only. There's some cruft at the start of the log file, due to test compiles
by the autoconf script. Then, we get to this part:

distcc[2954] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu; built Mar 12 2015 19:45:38
distcc[2954] (dcc_recursion_safeguard) safeguard level=0
distcc[2954] (main) compiler name is "distcc"
distcc[2954] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/button.o /home/mrsam/.ccache/tmp/button.stdout.octopus.email-scan.com.2894.UtB9Xa.ii
distcc[2954] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2954] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2954] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2954] (dcc_lock_host) got cpu lock on localhost slot 2 as fd5
distcc[2954] exec on localhost: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/button.o /home/mrsam/.ccache/tmp/button.stdout.octopus.email-scan.com.2894.UtB9Xa.ii
distcc[2954] (dcc_note_state) note state 5, file "(NULL)", host "localhost"
distcc[2954] (dcc_spawn_child) forking to execute: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/button.o /home/mrsam/.ccache/tmp/button.stdout.octopus.email-scan.com.2894.UtB9Xa.ii
distcc[2954] (dcc_spawn_child) child started as pid2957
distcc[2957] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=1
distcc[2975] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu; built Mar 12 2015 19:45:38
distcc[2975] (dcc_recursion_safeguard) safeguard level=0
distcc[2975] (main) compiler name is "distcc"
distcc[2975] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/border.o /home/mrsam/.ccache/tmp/border.stdout.octopus.email-scan.com.2920.cYmPvb.ii
distcc[2975] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2975] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2975] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2975] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2975] (dcc_lock_host) got cpu lock on localhost slot 3 as fd5
distcc[2975] exec on localhost: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/border.o /home/mrsam/.ccache/tmp/border.stdout.octopus.email-scan.com.2920.cYmPvb.ii
distcc[2975] (dcc_note_state) note state 5, file "(NULL)", host "localhost"
distcc[2975] (dcc_spawn_child) forking to execute: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/border.o /home/mrsam/.ccache/tmp/border.stdout.octopus.email-scan.com.2920.cYmPvb.ii
distcc[2975] (dcc_spawn_child) child started as pid2978
distcc[2978] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=1
distcc[2982] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu; built Mar 12 2015 19:45:38
distcc[2982] (dcc_recursion_safeguard) safeguard level=0
distcc[2982] (main) compiler name is "distcc"
distcc[2982] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/attachedpopup.o /home/mrsam/.ccache/tmp/attachedpo.stdout.octopus.email-scan.com.2895.K9IKza.ii
distcc[2982] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2982] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2991] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu; built Mar 12 2015 19:45:38
distcc[2991] (dcc_recursion_safeguard) safeguard level=0
distcc[2991] (main) compiler name is "distcc"
distcc[2991] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/cachedfont.o /home/mrsam/.ccache/tmp/cachedfont.stdout.octopus.email-scan.com.2922.3Dmj8a.ii
distcc[2991] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2991] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2992] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu; built Mar 12 2015 19:45:38
distcc[2992] (dcc_recursion_safeguard) safeguard level=0
distcc[2992] (main) compiler name is "distcc"
distcc[2992] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -c -o background.o /home/mrsam/.ccache/tmp/background.stdout.octopus.email-scan.com.2972.CeRBcF.ii
distcc[2992] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2992] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2993] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu; built Mar 12 2015 19:45:38
distcc[2993] (dcc_recursion_safeguard) safeguard level=0
distcc[2993] (main) compiler name is "distcc"
distcc[2993] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -c -o canvas.o /home/mrsam/.ccache/tmp/canvas.stdout.octopus.email-scan.com.2956.x28TAG.ii
distcc[2993] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2993] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[3072] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu; built Mar 12 2015 19:45:38
distcc[3072] (dcc_recursion_safeguard) safeguard level=0
distcc[3072] (main) compiler name is "distcc"
distcc[3072] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/colormap.o /home/mrsam/.ccache/tmp/colormap.stdout.octopus.email-scan.com.3047.YkKHRi.ii
distcc[3072] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[3072] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2982] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[3073] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu; built Mar 12 2015 19:45:38
distcc[3073] (dcc_recursion_safeguard) safeguard level=0
distcc[3073] (main) compiler name is "distcc"
distcc[3073] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/connection.o /home/mrsam/.ccache/tmp/connection.stdout.octopus.email-scan.com.3069.tuKDvr.ii
distcc[3073] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy

And 
that's it. Looks like distcc is only aware of the four localhost slots,
for some reasons.

I tried to check if there's anything funky in the rpmbuild environment.
Maybe rpmbuild sets up some funky mock chroot, so I shoved a distcc --show-
hosts into the rpm spec build script. The results:

+ umask 022
+ cd /home/mrsam/src/libcxxw-work/rpm/BUILD
+ cd libcxxw-0.1
+ distcc --show-hosts
monster.email-scan.com:3632/6,lzo
localhost/4
+ /usr/bin/make -j 10
make[1]: Entering directory '/home/mrsam/src/libcxxw-work/rpm/BUILD/libcxxw-0.1'




Followed by the build. That still looks perfectly fine for me. And the
server is waiting with open arms:

$ telnet monster.email-scan.com 3632
Trying 192.168.0.2

Connected to monster.email-scan.com.
Escape character is '^]'.

Yet, the client still stubbornly sticks to four localhost slots. It has to
be something in the rpmbuild environment, because everything works fine when
I build directly from source. Just can't figure out what it is.
Łukasz Tasz
2015-06-18 06:47:18 UTC
Permalink
Hi,
Thanks for the logs,
Look at this:

distcc[2954] (dcc_scan_args)
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local


this is like linking or coverage or other, distcc decided to make it localy:
form arg.c:
} else if (str_startswith("-specs=", a)) {
rs_trace("%s must be local", a);

what you need to do - consider if you need this -specs flag.

hope it helps
L.
Łukasz Tasz
Post by Sam Varshavchik
Post by Sam Varshavchik
Post by Yassine ILMI
3 - I prefer to configure distcc using environment variable directly in a
file and source it when needed. You should check if the session used to run
rpmbuild also have distcc environment variables set.
I did check directly what environment the distcc process inherited. It did
not have DISTCC_HOSTS set.
After receiving some emailed tips, I'm still not really any closer to
figuring out what's going on.
$ distcc --show-hosts
monster.email-scan.com:3632/6,lzo
localhost/4
This looks fine, and, as I said, manually running make directly ends up
correctly farming out six out of ten concurrent builds to the server.
But, during an rpmbuild, all compiles still run only on localhost. I've set
DISTCC_LOG and DISTCC_VERBOSE, and the resulting log file doesn't have
anything obvious in it, except for the fact that it logs localhost compiles
only. There's some cruft at the start of the log file, due to test compiles
distcc[2954] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2954] (dcc_recursion_safeguard) safeguard level=0
distcc[2954] (main) compiler name is "distcc"
distcc[2954] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/button.o
/home/mrsam/.ccache/tmp/button.stdout.octopus.email-scan.com.2894.UtB9Xa.ii
distcc[2954] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2954] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2954] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2954] (dcc_lock_host) got cpu lock on localhost slot 2 as fd5
distcc[2954] exec on localhost: /usr/bin/g++ -O2 -g -pipe -Wall
-Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/button.o
/home/mrsam/.ccache/tmp/button.stdout.octopus.email-scan.com.2894.UtB9Xa.ii
distcc[2954] (dcc_note_state) note state 5, file "(NULL)", host "localhost"
distcc[2954] (dcc_spawn_child) forking to execute: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/button.o
/home/mrsam/.ccache/tmp/button.stdout.octopus.email-scan.com.2894.UtB9Xa.ii
distcc[2954] (dcc_spawn_child) child started as pid2957
_DISTCC_SAFEGUARD=1
distcc[2975] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2975] (dcc_recursion_safeguard) safeguard level=0
distcc[2975] (main) compiler name is "distcc"
distcc[2975] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/border.o
/home/mrsam/.ccache/tmp/border.stdout.octopus.email-scan.com.2920.cYmPvb.ii
distcc[2975] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2975] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2975] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2975] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2975] (dcc_lock_host) got cpu lock on localhost slot 3 as fd5
distcc[2975] exec on localhost: /usr/bin/g++ -O2 -g -pipe -Wall
-Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/border.o
/home/mrsam/.ccache/tmp/border.stdout.octopus.email-scan.com.2920.cYmPvb.ii
distcc[2975] (dcc_note_state) note state 5, file "(NULL)", host "localhost"
distcc[2975] (dcc_spawn_child) forking to execute: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/border.o
/home/mrsam/.ccache/tmp/border.stdout.octopus.email-scan.com.2920.cYmPvb.ii
distcc[2975] (dcc_spawn_child) child started as pid2978
_DISTCC_SAFEGUARD=1
distcc[2982] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2982] (dcc_recursion_safeguard) safeguard level=0
distcc[2982] (main) compiler name is "distcc"
distcc[2982] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/attachedpopup.o
/home/mrsam/.ccache/tmp/attachedpo.stdout.octopus.email-scan.com.2895.K9IKza.ii
distcc[2982] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2982] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2991] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2991] (dcc_recursion_safeguard) safeguard level=0
distcc[2991] (main) compiler name is "distcc"
distcc[2991] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/cachedfont.o
/home/mrsam/.ccache/tmp/cachedfont.stdout.octopus.email-scan.com.2922.3Dmj8a.ii
distcc[2991] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2991] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2992] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2992] (dcc_recursion_safeguard) safeguard level=0
distcc[2992] (main) compiler name is "distcc"
distcc[2992] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -c -o background.o
/home/mrsam/.ccache/tmp/background.stdout.octopus.email-scan.com.2972.CeRBcF.ii
distcc[2992] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2992] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2993] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2993] (dcc_recursion_safeguard) safeguard level=0
distcc[2993] (main) compiler name is "distcc"
distcc[2993] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -c -o canvas.o
/home/mrsam/.ccache/tmp/canvas.stdout.octopus.email-scan.com.2956.x28TAG.ii
distcc[2993] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2993] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[3072] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[3072] (dcc_recursion_safeguard) safeguard level=0
distcc[3072] (main) compiler name is "distcc"
distcc[3072] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/colormap.o
/home/mrsam/.ccache/tmp/colormap.stdout.octopus.email-scan.com.3047.YkKHRi.ii
distcc[3072] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[3072] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2982] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[3073] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[3073] (dcc_recursion_safeguard) safeguard level=0
distcc[3073] (main) compiler name is "distcc"
distcc[3073] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/connection.o
/home/mrsam/.ccache/tmp/connection.stdout.octopus.email-scan.com.3069.tuKDvr.ii
distcc[3073] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
And …that's it. Looks like distcc is only aware of the four localhost slots,
for some reasons.
I tried to check if there's anything funky in the rpmbuild environment.
Maybe rpmbuild sets up some funky mock chroot, so I shoved a distcc
+ umask 022
+ cd /home/mrsam/src/libcxxw-work/rpm/BUILD
+ cd libcxxw-0.1
+ distcc --show-hosts
monster.email-scan.com:3632/6,lzo
localhost/4
+ /usr/bin/make -j 10
make[1]: Entering directory
'/home/mrsam/src/libcxxw-work/rpm/BUILD/libcxxw-0.1'

Followed by the build. That still looks perfectly fine for me. And the
$ telnet monster.email-scan.com 3632
Trying 192.168.0.2…
Connected to monster.email-scan.com.
Escape character is '^]'.
Yet, the client still stubbornly sticks to four localhost slots. It has to
be something in the rpmbuild environment, because everything works fine when
I build directly from source. Just can't figure out what it is.
__
distcc mailing list http://distcc.samba.org/
https://lists.samba.org/mailman/listinfo/distcc
__
distcc mailing list http://distcc.samba.org/
To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/d
Sam Varshavchik
2015-06-18 10:53:25 UTC
Permalink
Post by Łukasz Tasz
Hi,
Thanks for the logs,
distcc[2954] (dcc_scan_args)
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
} else if (str_startswith("-specs=", a)) {
rs_trace("%s must be local", a);
what you need to do - consider if you need this -specs flag.
Thanks for pointing that out. That is, indeed the issue here. The -specs
parameter comes from rpmbuild's configuration.

Loading...