1.3.26/1.3.28/1.3.29

Vernon Schryver vjs@calcite.rhyolite.com
Sun Feb 19 23:48:55 UTC 2006


> From: "Paul R. Ganci" 


> Now note that open_srvr_socs() takes an int as an argument and that 
> retry_secsp is a pointer to int. When the open_srvr_socs(0) call is made 
> retry_secsp address will be null (0) since retry_secs will equal 0. 
> Hence you pass a null pointer to dcc_upd_bind() as the last argument 
> retry_secsp instead of a pointer to an int containing the value 0.

Did you look to see how dcc_udp_bind() treats its last argument when
it is null?  What about this line
		    && retry_secs && *retry_secs < 0
and this line
		    || !retry_secs || *retry_secs <= 0) {
in get_port.c?


I do not see the real problem, but there is a bug in the setting
of the first argument of select() when there are no open sockets.
I bet that if you make this change to the 1.3.29 version of dccd.c
the EINVAL complaint from select() will go away:

*** 1197,1203 ****
                prfds = 0;
                FD_ZERO(&wfds);
                pwfds = 0;
!               max_fd = 0;
                if (was_too_busy) {
                        if (delay.tv_sec != 0
                            || delay.tv_usec > DCC_USECS/4) {
--- 1197,1203 ----
                prfds = 0;
                FD_ZERO(&wfds);
                pwfds = 0;
!               max_fd = -1;
                if (was_too_busy) {
                        if (delay.tv_sec != 0
                            || delay.tv_usec > DCC_USECS/4) {



I suspect the real problem is something about how dccd is started and
that somehow there are no open sockets for the select() loop to watch.
It would take only seconds with gdb to (in)validate that guess.  If
initializing max_fd properly makes the select() complaint go away, then
that guess is probably valid.

If that guess is valid, it would take only a little longer with gdb to
figure out why there are no open socket, and whether and, if so why,
the changes to open_srvr_socs() really matter.  However,

    Are you starting dccd before the network interfaces are configured?

    When you compared your two versions of dccd, where they in exactly
    the same situation or did you compare the unpatched version starting
    with the system before the interfaces are configured with the patched
    version after the system and so the interfaces are up?

    Does your system have IPv6 support? 
    If so, does it have an IPv6 address?

    How many network interfaces does it have?

    Is there anything unusual about the interfaces?  For example, are
    they GSM or other tunnels that can come and go?


Vernon Schryver    vjs@rhyolite.com



More information about the DCC mailing list

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