Since none of the devs have posted a followup on this, I think that perhaps
this is worth a bug in Bugzilla.  If the analysis is valid it needs to be
fixed.  If it isn't, one of the devs will probably explain why it should
work as it does.

        Loren

> I discovered Net::DNS::Resolver::errorstring, and put some more logging
> into SA, and the problem is really simple:  my caching-only nameserver
> times out when looking up NS records for a site that's not in the
> cache.  Not entirely surprising, with a 3-second timeout in SA.  And my
> site is infinitely small (just me), so it's going to be fairly common
> that one of the well-known sites is not in cache.
>
> SA realizes this, and tries to loop, in Dns.pm's is_dns_available, but
> the loop is coded wrong, because either a success or a failure breaks
> out of the loop!  A timeout in lookup_ns will result in $result defined,
> but containing no records, and that triggers the "failed horribly"
> clause, setting $IS_DNS_AVAILABLE to zero until mimedefang eventually
> cycles the child process.
>
> I *think* the bug fix is just to remove that whole else clause from
> is_dns_available, but as a Perl novice I'd certainly like someone to
> double-check that.
>
> And, you know, now that I look at it, it seems like is_dns_available
> uses lookup_ns to test general DNS availability, but lookup_ns has its
> own caching that would seem to defeat the point of the test if a site is
> ever hit twice!

Reply via email to