[distcc] distcc-over-ssh fails with some sshd

Felix Lee felix.1 at canids.net
Fri Jun 27 23:22:03 GMT 2003


    distccd 2.7.1 i386-unknown-netbsdelf1.5.3 (protocol 1)
    sshd version OpenSSH_3.0.2 NetBSD_Secure_Shell-20020626

    When sshd execs distccd, it gives distccd stdin and stdout
    that are different, and stdin is not writable.  distccd
    expects to read and write on the same file descriptor.  It
    reads the request from stdin fine, then tries to write the
    result to stdin and fails.

    Note, this problem doesn't happen if I use
        sshd version OpenSSH_3.6.1p2
    on the same machine.  So this is not really a big deal, but
    it seems to me like it might be worth fixing, since the ssh
    method can be used with any type of ssh-like program, and I
    don't think there's any guarantee in general that stdin can
    be written to.


    $ DISTCC_VERBOSE=1 DISTCC_HOSTS=@remote distcc gcc -o x.o -c x.c
    distcc[13910] (dcc_x_token_int) send DOTI000047f2
    distcc[13910] (dcc_send_job) client finished sending request to server
    distcc[13910] (dcc_select_for_read) select for read on fd6
    distcc[13910] (dcc_readx) ERROR: unexpected eof on fd6
    distcc[13910] (dcc_r_token_int) ERROR: read failed while waiting for token "DONE"
    distcc[13910] (dcc_collect_child) ssh child 13912 terminated with status 0x6b00
    distcc[13910] (dcc_build_somewhere) Warning: failed to distribute, running locally instead


    Use a different sshd.


    It looks pretty trivial.  Change dcc_run_job() in src/serve.c
    to take two file descriptors instead of one, and propagate
    the change back up to its callers.

More information about the distcc mailing list