gupascal / distcc

distcc: a fast, free distributed C/C++ compiler. Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

distcc tries to cork ssh connections #79

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Answering the following questions is a big help:

>1. What version of distcc are you using (e.g. "2.7.1")?  You can run "distcc 
--version" to see.  If you got distcc from a distribution package rather than 
building from source, please say which one.
distcc 3.1 x86_64-pc-linux-gnu
  (protocols 1, 2 and 3) (default port 3632)
  built Jan  5 2011 10:03:35

2. What platform are you running on (e.g. "Red Hat 8.0", "HP-UX 11.11")?  What 
compilare are you using ("gcc 3.3")?  Run "uname -a" and "cc --version" to see.
Debian Squeeze
gcc (Debian 4.4.5-6) 4.4.5

3. What were you trying to do (e.g. "install distcc", "build Mozilla")?
Build Ceph, the distributed filesystem, using distcc over ssh (we just switched 
to ssh from tcp).

4. What went wrong?  Did you get an error message, did it hang, did it build a 
program that didn't work, did it not distribute compilation to machines that 
ought to get it?

"distccd[3811] (tcp_cork_sock) Warning: setsockopt(corked=1) failed: Socket 
operation on non-socket"
This is apparently harmless, but irritating. Setting DISTCC_TCP_CORK=0 in my 
environment did not appear to impact the output either.
Googling for this phrase indicates a few other people having difficult turning 
it off, but it's not showing up in a search of your bug tracker and I couldn't 
find it in your mailing list, so here's a bug.

Original issue reported on code.google.com by gfar...@gmail.com on 4 Mar 2011 at 12:22

GoogleCodeExporter commented 9 years ago
This message is coming from distccd, not from distcc.
To avoid it, you would need to arrange for DISTCC_TCP_CORK=0 to be set in the 
environment on the remote machines before starting the distccd server 
processes, e.g. in /etc/init.d/distcc, and then you would need to restart the 
distccd server processes, e.g. by sudo /etc/init.d/distcc restart.

Original comment by fer...@google.com on 4 Mar 2011 at 4:43

GoogleCodeExporter commented 9 years ago
Well that's helpful in working around the problem, and I'll definitely do that 
(thanks!). But if we're connecting to the distccd via a supported option it 
probably shouldn't be spitting warning messages back at us. :)

Original comment by gfar...@gmail.com on 4 Mar 2011 at 4:59

GoogleCodeExporter commented 9 years ago
So far I didn't manage to disable the warning in SSH mode. (Even tried 
diverting the binary itself, and replaced it with a shell script wrapper that 
exports DISTCC_TCP_CORK=0).

Please just remove that annoying warning, it is absolutely useless.

Original comment by stefan.b...@gmail.com on 21 Sep 2013 at 9:22

GoogleCodeExporter commented 9 years ago
Hi Stefan,

Figured I'd pass this along... I ran into the same issue you did building out a 
distcc farm at my work.  To squash the issue (on a Linux box, at least) - 
requires root access:

1)  mv /usr/bin/distccd /usr/bin/distccd-bin
2)  Put a new file in place at /usr/bin/distccd, with contents like this:
#!/bin/bash
export DISTCC_TCP_CORK=0
exec /usr/bin/distccd-bin $@
3)  chmod 755 /usr/bin/distccd

At that point, this little bash script will intercept calls to distccd, export 
the Env Var properly, then invoke the distccd-bin and preserve all the original 
command line arguments.

I've rolled this change out to a dozen distcc worker nodes here at my work, and 
have seen no further evidence of the TCP cork warnings in any of my builds.  
It's not trivial to roll out, but it will eliminate the noise in your build 
logs until such time as a fix is available.

Original comment by kbpe...@gmail.com on 23 Oct 2013 at 8:09