Hello,
I experienced the following problem with NSD 3.2.2 on NetBSD
5.0 and 2 independent installations of FreeBSD 7.2.
The problem:
nsdc restart falls into infinite(actually broken by ${try}
ceiling) loop and leave nsd be stopped, not restarted.
Temporary fix:
Commenting out the discard redirection makes it sanity.
*** /pub/nsd-3.2.2/sbin/nsdc Fri Jul 24 12:29:19 2009
--- /tmp/nsdc Fri Jul 24 13:05:53 2009
***************
*** 199,205 ****
fi
# really stopped?
! kill -0 ${pid} &>/dev/null
if [ $? -eq 0 ]; then
controlled_sleep ${try}
try=`expr ${try} + 1`
--- 199,205 ----
fi
# really stopped?
! kill -0 ${pid} #&>/dev/null
if [ $? -eq 0 ]; then
controlled_sleep ${try}
try=`expr ${try} + 1`
Log:
The following is the log of the phenomenon.
Script started on Fri Jul 24 13:31:17 2009
guest1# /pub/nsd-3.2.2/sbin/nsd
guest1# cat /sandbox/nsd/var/run/nsd.pid
11063
guest1# ps auxwwp 11063
USER PID %CPU %MEM VSZ RSS TTY STAT STARTED TIME COMMAND
daemon 11063 0.0 0.5 8552 1408 ? Is 1:31PM 0:00.00
/pub/nsd-3.2.2/sbin/nsd
guest1# /pub/nsd-3.2.2/sbin/nsdc restart
/pub/nsd-3.2.2/sbin/nsdc[436]: kill: 11063: No such process
/pub/nsd-3.2.2/sbin/nsdc[436]: kill: 11063: No such process
:
(snip)
:
/pub/nsd-3.2.2/sbin/nsdc[436]: kill: 11063: No such process
nsdc stop failed
guest1# ps auxww | grep nsd | grep -v grep
guest1#
guest1# exit
Script done on Fri Jul 24 13:32:36 2009
Thanks in advance.
Koh-ichi Ito
Joerg Sonnenberger
2009-Jul-24 06:33 UTC
[nsd-users] nsdc restart falls into semi-infinite loop
On Fri, Jul 24, 2009 at 01:41:48PM +0900, Koh-ichi Ito wrote:> *** /pub/nsd-3.2.2/sbin/nsdc Fri Jul 24 12:29:19 2009 > --- /tmp/nsdc Fri Jul 24 13:05:53 2009 > *************** > *** 199,205 **** > fi > > # really stopped? > ! kill -0 ${pid} &>/dev/null > if [ $? -eq 0 ]; then > controlled_sleep ${try} > try=`expr ${try} + 1` > --- 199,205 ---- > fi > > # really stopped? > ! kill -0 ${pid} #&>/dev/null > if [ $? -eq 0 ]; then > controlled_sleep ${try} > try=`expr ${try} + 1` >That should be > /dev/null 2>&1, shouldn't it? Joerg