Cached resolver state issues

Ted_Rule at flextech.co.uk Ted_Rule at flextech.co.uk
Tue Aug 15 16:50:11 UTC 2000




I've recently had cause to swing /etc/resolv.conf on various RedHat 5 and 6
machines
to move my local internal DNS server to another box.

As a consequence of this I find some unpleasant side effects of "resolver state
caching"
on each host.

A very very brief delve into glibc source and sendmail source suggested that any
given process
only calls res_init() ( as a sub call within getXXbyYY() ) once to retrieve and
parse ( amongst
other things ) the contents of /etc/resolv.conf /etc/host.conf
/etc/nsswitch.conf and perhaps /etc/hosts...

Once called, further calls to the resolver library seem to use that cached
information for performing upper
level functions like gethostbyname() et al.

Hence any changes made to /etc/resolv.conf once a given daemon process has
started are ignored.

Hence modifying and reflecting the changes in /etc/resolv.conf on a 24x7 server
become ever more
difficult to achieve as the side-effect of the caching is to virtually require a
reboot of the machine to flush
remnants of resolver state from running daemons.

The sendmail source has an explicit call to res_init() which hinted at this
caching behaviour, but tests with
various Perl scripts and other daemons running on a fairly recently built RedHat
6.2 / Kernel 2.2.16 box
suggest that this problem is pretty global to all "clients" of gethostbyname().

I've been able to restart the sendmail processes globally to alleviate the worst
side effects of this caching,
but the question remains....

Does the BIND Resolver Library exhibit the same problem? - my understanding was
that glibc's resolver library
is heavily influenced if not identical to BIND's resolver library.

Additionally, does anyone know whether Solaris resolver libraries have the same
problem?


Thanks


Ted


***************************************************************************************************

This E-mail message, including any attachments, is intended only for the person
or entity to which it is addressed, and may contain confidential information.

If you are not the intended recipient, any review, retransmission, disclosure,
copying, modification or other use of this E-mail message or attachments is
strictly forbidden.

If you have received this E-mail message in error, please contact the author and
 delete the message and any attachments from your computer.

You are also advised that the views and opinions expressed in this E-mail
message and any attachments are the author's own, and may not reflect the views
and opinions of FLEXTECH Television Limited.
***************************************************************************************************





More information about the bind-workers mailing list