[Samba] HELP: Samba server crashing on me

Timothy Normand Miller theosib at gmail.com
Sun Sep 6 21:26:29 MDT 2009


This is where smbd is getting signal 11 (see the ***):

/* Processes reply from mDNS daemon. Returns true if a reply was received */
bool dns_register_smbd_reply(struct dns_reg_state *dns_state,
                fd_set *lfds, struct timeval *timeout)
{
        int mdnsd_conn_fd = -1;

        if (dns_state->srv_ref == NULL) {   // *** RIGHT HERE AT LINE 171 ***
                return false;
        }

        mdnsd_conn_fd = DNSServiceRefSockFD(dns_state->srv_ref);

        /* Process reply from daemon. Handles any errors. */
        if ((mdnsd_conn_fd != -1) && (FD_ISSET(mdnsd_conn_fd,lfds)) ) {
                DNSServiceErrorType err;

                err = DNSServiceProcessResult(dns_state->srv_ref);
                if (err != kDNSServiceErr_NoError) {
                        DEBUG(3, ("failed to process mDNS result (err
%d), re-trying\n",
                                    err));
                        schedule_dns_register_smbd_retry(dns_state, timeout);
                }

                return true;
        }

        return false;
}


It appears that dns_state is null, which is evident from the stack trace:

#6  dns_register_smbd_reply (dns_state=0x0, lfds=0x7fffbf342960,
timeout=0x7fffbf342af0) at smbd/dnsregister.c:171

That's called from here in server.c, in main():

                if (dns_register_smbd_reply(dns_reg, &r_fds, &idle_timeout)) {
                        --num;
                }

Unfortunately, I can't debug further since dns_reg is optimized out by -O2.


More information about the samba mailing list