1.3.26/1.3.28/1.3.29

Paul R. Ganci ganci@nurdog.com
Sun Feb 19 22:31:26 UTC 2006


Bob Pierce wrote:

>>Dozens of the DCC servers in the network are running 1.3.26 or newer.
>>I assume at least a few are running some flavor of Linux.  Am I wrong?
>>    
>>
>I'm running Centos 4.2 with dcc 1.3.28.
>The /var/dcc/libexec/updatedcc seemed to work fine.
>  
>
I have come back to trying to install DCC 1.3.29 and always get :

Feb 19 12:34:09 nureyev dccd grey[20995]: 1.3.29 listening to port 6276 
with /etc/dcc and 31 MByte window
Feb 19 12:34:09 nureyev dccd grey[20995]: give up after select(): 
Invalid argument
Feb 19 12:34:09 nureyev dccd grey[20995]: gracefully stopping
Feb 19 12:34:09 nureyev dccd grey[20995]: stopped

Even with a -dd or -d switch in the config file this is all that shows 
up in the log. Moreover even if I update via /var/dcc/libexec/updatedcc 
I get the same error. The code builds cleanly with either rpmbuild or 
updatedcc, so I am at a loss as to what would break the dccd grey 
lister, but it is surely broken on my system.

So in order to track down the problem, I did a diff on dcc-1.3.25, 
dcc-1.3.26 and dcc-1.3.29 versions of dccd.c. I found that with version 
dcc-1.3.26 of dccd.c there were three changes made: the open_srvr_socs() 
function call was modified, zombie collection appeared to have a 
modification and there was a flod code change.  The change to the 
open_srvr_socs() function call upon my visual inspection appeared to be 
cosmetic and local to dccd.c. Therefore I backed out only that change to 
the 1.3.25 dccd.c version with the patch attached at the bottom of this 
message. When I rebuild DCC with this change then the dccd grey lister 
functions correctly once again. I unfortunately do not know exactly 
which piece of the open_srvr_socs() function call change breaks things 
on my system. I just know the following patch applied to the dcc-1.3.29 
version of dccd.c fixes the issue.

*** dcc-1.3.29/dccd/dccd-orig.c 2006-01-24 08:42:52.000000000 -0700
--- dcc-1.3.29/dccd/dccd.c      2006-02-19 13:56:00.000000000 -0700
***************
*** 34,40 ****
   * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
   * SOFTWARE.
   *
!  * Rhyolite Software DCC 1.3.29-1.203 $Revision$
   */

  #include "dccd_defs.h"
--- 34,40 ----
   * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
   * SOFTWARE.
   *
!  * Rhyolite Software DCC 1.3.29-1.204 $Revision$
   */

  #include "dccd_defs.h"
***************
*** 122,128 ****
  static void stop_children(void);
  static u_char get_if_changes(u_char);
  static SRVR_SOC *add_srvr_soc(u_char, int, const void *, u_int16_t);
! static int open_srvr_socs(int);
  static void recv_job(void) NRATTRIB;
  static u_char new_job(SRVR_SOC *);
  static void NRATTRIB db_quit(int, const char *, ...) PATTRIB(2,3);
--- 122,128 ----
  static void stop_children(void);
  static u_char get_if_changes(u_char);
  static SRVR_SOC *add_srvr_soc(u_char, int, const void *, u_int16_t);
! static void open_srvr_socs(int *);
  static void recv_job(void) NRATTRIB;
  static u_char new_job(SRVR_SOC *);
  static void NRATTRIB db_quit(int, const char *, ...) PATTRIB(2,3);
***************
*** 164,170 ****
        DCC_SOCKU *sup;
        u_int16_t port;
        int new_embargo, new_window, new_white;
!       int error, i;
        u_long l;

        dcc_syslog_init(1, argv[0], 0);
--- 164,170 ----
        DCC_SOCKU *sup;
        u_int16_t port;
        int new_embargo, new_window, new_white;
!       int bind_retries, error, i;
        u_long l;

        dcc_syslog_init(1, argv[0], 0);
***************
*** 536,543 ****

        /* make initial attempt to open the server UDP sockets
         * This also sets use_ipv6 to 0 or 1 if it is still 2 */
!       if (open_srvr_socs(45) <= 0)
!               dcc_logbad(EX_OSERR, "failed to open any server sockets");

        add_dbclean_arg(use_ipv6 == 0 ? "-4" : "-6");

--- 536,543 ----

        /* make initial attempt to open the server UDP sockets
         * This also sets use_ipv6 to 0 or 1 if it is still 2 */
!       bind_retries = 45;
!       open_srvr_socs(&bind_retries);

        add_dbclean_arg(use_ipv6 == 0 ? "-4" : "-6");

***************
*** 632,650 ****



! static int                            /* # of sockets opened */
! open_srvr_socs(int retry_secs)
  {
        static u_char srvr_rcvbuf_set = 0;
-       int *retry_secsp;
        u_char family;
        SRVR_SOC *sp;
        int num_socs = 0;

        if (stopint)
!               return -1;
!
!       retry_secsp = retry_secs ? &retry_secs : 0;

        for (sp = srvr_socs; sp; sp = sp->fwd) {
                if (sp->udp >= 0) {
--- 632,647 ----



! static void
! open_srvr_socs(int *retry_secs)
  {
        static u_char srvr_rcvbuf_set = 0;
        u_char family;
        SRVR_SOC *sp;
        int num_socs = 0;

        if (stopint)
!               return;

        for (sp = srvr_socs; sp; sp = sp->fwd) {
                if (sp->udp >= 0) {

***************
*** 666,672 ****
                        dcc_mk_su(&sp->su, AF_INET6,
                                  &sp->arg_addr, sp->arg_port);
                        if (!dcc_udp_bind(dcc_emsg, &sp->udp,
!                                         &sp->su, retry_secsp)) {
                                dcc_error_msg("%s", dcc_emsg);
                                /* still don't know about IPv6 */
                                continue;
--- 663,669 ----
                        dcc_mk_su(&sp->su, AF_INET6,
                                  &sp->arg_addr, sp->arg_port);
                        if (!dcc_udp_bind(dcc_emsg, &sp->udp,
!                                         &sp->su, retry_secs)) {
                                dcc_error_msg("%s", dcc_emsg);
                                /* still don't know about IPv6 */
                                continue;
***************
*** 693,699 ****
                dcc_mk_su(&sp->su, family,
                          &sp->arg_addr, sp->arg_port);
                if (!dcc_udp_bind(dcc_emsg, &sp->udp,
!                                 &sp->su, retry_secsp)
                    || sp->udp < 0) {
                        dcc_error_msg("%s", dcc_emsg);
                        continue;
--- 690,696 ----
                dcc_mk_su(&sp->su, family,
                          &sp->arg_addr, sp->arg_port);
                if (!dcc_udp_bind(dcc_emsg, &sp->udp,
!                                 &sp->su, retry_secs)
                    || sp->udp < 0) {
                        dcc_error_msg("%s", dcc_emsg);
                        continue;
***************
*** 722,728 ****
        if (use_ipv6 == 2)
                use_ipv6 = 0;

!       return num_socs;
  }


--- 719,726 ----
        if (use_ipv6 == 2)
                use_ipv6 = 0;

!       if (!num_socs)
!               bad_stop("failed to open any server sockets");
  }


***************
*** 1079,1089 ****
                /* frequently check for network interface changes, but only
                 * if we know how to release the result of getifaddrs() */
                if (get_if_changes(1)) {
!                       int socs = open_srvr_socs(0);
!                       if (!socs)
!                               bad_stop("failed to open any server 
sockets");
!                       else if (socs > 0)
!                               flods_restart("network interfaces changed");
                }
  #endif

--- 1077,1084 ----
                /* frequently check for network interface changes, but only
                 * if we know how to release the result of getifaddrs() */
                if (get_if_changes(1)) {
!                       open_srvr_socs(0);
!                       flods_restart("network interfaces changed");
                }
  #endif

-- 
Paul (ganci@nurdog.com)




More information about the DCC mailing list

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