stopping named nicely

Will Yardley you at aredumb.com
Tue Sep 23 18:28:16 UTC 2003


On our primary nameservers, with about 51k zones, including a few really
large ones, I have a really hard time getting BIND to stop nicely. If I
send it a SIGTERM or use rndc stop (or rndc halt) it doesn't seem to
die even after 5 minutes or more. It logs "no longer listening on ....."
for all of the interfaces, and doesn't answer queries, but the process
is still hanging around.

My understanding is that rndc halt should be almost immediate; it is on
my personal machines (with a lot fewer zones loaded, and much less data
cached).

If I try to strace the process, I get either:
11:24am# strace -p24809
trace: ptrace(PTRACE_SYSCALL, ...): Operation not permitted
detach: ptrace(PTRACE_DETACH, ...): Operation not permitted

or else it seems to just sit there. The pid file still exists at this
point.

The process shows up like this:
bind     24809     1 29 Sep17 ?        1-20:34:06 named -u bind

A few questions.

1) Is this normal? The machines in question have about 1G of RAM, and
aren't swapping much at all [1]

2) Do I need to wait until the old process dies to restart named?

3) I realize it's not great to send the process a SIGKILL; is it OK to
do so after first stopping BIND "nicely"?

This is all on Debian Linux 3.0 with a 2.4.20 kernel. BIND has been
compiled from source (9.2.2 on 2, 9.2.3rcX on the third), and built
without threads.

If there's other information that would be useful, I can try to post it
as well.

[1] Example, from while one of the machines is in operation with BIND
running:

top:
24809 bind      14   0  594M 592M  7252 S    29.1 58.7  2667m named

free:
             total       used       free     shared    buffers     cached
Mem:       1032384    1015632      16752          0      52492     241828
-/+ buffers/cache:     721312     311072
Swap:      1020116      14460    1005656

-- 
No copies, please.
To reply privately, simply reply; don't remove anything.



More information about the bind-users mailing list