MaraDNS stops resolving

Sam Trenholme strenholme.usenet at gmail.com
Thu May 24 21:13:15 EDT 2007


There are a lot of things that may be causing this issue, and it will
take a while to troubleshoot and fix.  Especially since I don't have
internet at home.

Basically, here is what MaraDNS does when making a remote DNS query:

* MaraDNS launches a new thread

* In that thread, MaraDNS binds to a random (crypto-strong random)
local UDP port makes a query to a remote DNS server.

* MaraDNS uses select() to wait for a reply.

* Once MaraDNS gets a reply, MaraDNS then processes the reply.

Here is the relevant code:

    big_unlock();
    n = select(maxd,&rx_set,NULL,NULL,&tv);
    /* OK, we're done waiting for the slow remote DNS server.  Lock the
     * thread again */
    do_big_lock();
    if(n == -1)  /* select error */ {
        if(rlog_level >= 4) {
            log_lock();
            show_timestamp();
            printf("Select error\n");
            log_unlock();
            }
        close(s);
        goto cleanup;
        }
    if(n == 0) /* Timeout */ {
        close(s);
        if(rlog_level >= 4) {
            log_lock();
            show_timestamp();
            printf("Timeout contacting remote nameserver\n");
            log_unlock();
            }
        goto minus2;
        }

Now, Lars, when MaraDNS is getting these errors, can you use dig or
askmara to make normal DNS queries?  For example, @dig @198.41.0.4
www.maradns.org@" or "askmara Awww.maradns.org. 198.41.0.4" (Without
the quotes)

Why this stops working after a few days is a mystery.  I'm going to
blame cosmic rays: I will boldly proclaim that this is a Linux kernel
bug, and to try another kernel.  :)

Newer 2.6 kernels can handle threading a lot better then 2.4 kernels,
for example.

For Michael, I have a patch that will log why we are getting server
fail messages.  This will help me know if this is the same issue Lars
is seeing or not.

To apply the patch, enter the maradns-1.2.12.06 directory and type in:

patch -p1 < maradns-logerror.patch

Where maradns-logerror.patch is attached to this message.

- Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maradns-logerror.patch
Type: application/octet-stream
Size: 358 bytes
Desc: not available
Url : http://woodlane.webconquest.com/pipermail/list/attachments/20070525/c8455260/attachment.obj 


More information about the list mailing list