DCC use of connect() and sendto() on FreeBSD

Jamie Clark jclark@metaparadigm.com
Wed Sep 22 09:59:09 UTC 2004


Hi,

I've been attempting to use the FreeBSD port of the DCC package on
FreeBSD 4.10-STABLE and I have noticed a few issues. I'm using
dccm and the public servers.

I see the same problem as Andy Hilker did a few months back; with
only one server (the first server) responding.

The (snipped) truss output of a 'cddc "load map.txt"' gives:

sendto(0x4,0xbfbfc2a8,0x28,0x0,0x0,0x0)          = 40 (0x28)
sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is 
already connected'
sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is 
already connected'
sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is 
already connected'
sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is 
already connected'
sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is 
already connected'
sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is 
already connected'
sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is 
already connected'
sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is 
already connected'
sendto(0x4,0xbfbfc2a8,0x28,0x0,0xbfbfb114,0x10)  ERR#56 'Socket is 
already connected'

This is repeated a bunch of times.

One thing I noticed was that the configure script has:

case "$TARGET_SYS" in
    BSD/OS|FreeBSD|DragonFly|Darwin|SunOS|IRIX*|OpenBSD|NetBSD)
        cat >> confdefs.h <<\EOF
#define DCC_UDP_DISCON 0
EOF

and in dcclib/clnt_send.c there is a lot of code bracketed with:

#ifdef DCC_UDP_DISCON

At a hunch I changed these to #if, instead of #ifdef, and rebuilt.  
Alternatively the #define could be undone.

Seems to be working fine now. cdcc and dccm no longer report 
unresponsive servers.

My question is: is this the precompiler behaviour that was originally 
intended, or have I broken something?
It *appears* to be behaving itself. truss output looks ok:

sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfc7a4,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfc804,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfc864,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfc8c4,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfc924,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfc984,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfc9e4,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfca44,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfcaa4,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfcb04,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfcb64,0x10)  = 40 (0x28)
sendto(0x4,0xbfbfda58,0x28,0x0,0xbfbfcbc4,0x10)  = 40 (0x28)
fcntl(0x3,0x8,0xbfbfc6a8)                        = 0 (0x0)
poll(0xbfbfc6e8,0x1,0x1f4)                       = 1 (0x1)
gettimeofday(0x8064004,0x0)                      = 0 (0x0)
fcntl(0x3,0x9,0xbfbfc6a8)                        = 0 (0x0)
recvfrom(0x4,0xbfbfd9b0,0xa8,0x0,0xbfbfc6c4,0xbfbfc670) = 108 (0x6c)
recvfrom(0x4,0xbfbfd9b0,0xa8,0x0,0xbfbfc6c4,0xbfbfc670) ERR#35 'Resource 
temporarily unavailable'
fcntl(0x3,0x8,0xbfbfc6a8)                        = 0 (0x0)
poll(0xbfbfc6e8,0x1,0x120)                       = 1 (0x1)
gettimeofday(0x8064004,0x0)                      = 0 (0x0)
fcntl(0x3,0x9,0xbfbfc6a8)                        = 0 (0x0)
recvfrom(0x4,0xbfbfd9b0,0xa8,0x0,0xbfbfc6c4,0xbfbfc670) = 108 (0x6c)
recvfrom(0x4,0xbfbfd9b0,0xa8,0x0,0xbfbfc6c4,0xbfbfc670) ERR#35 'Resource 
temporarily unavailable'
fcntl(0x3,0x8,0xbfbfc6a8)                        = 0 (0x0)
poll(0xbfbfc6e8,0x1,0xeb)                        = 1 (0x1)
gettimeofday(0x8064004,0x0)                      = 0 (0x0)
fcntl(0x3,0x9,0xbfbfc6a8)                        = 0 (0x0)
recvfrom(0x4,0xbfbfd9b0,0xa8,0x0,0xbfbfc6c4,0xbfbfc670) = 108 (0x6c)
recvfrom(0x4,0xbfbfd9b0,0xa8,0x0,0xbfbfc6c4,0xbfbfc670) ERR#35 'Resource 
temporarily unavailable'
[... more happy responses...]


-Jamie



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.