[nsd-users] nsdc restart falls into semi-infinite loop

Koh-ichi Ito kohi at iri.co.jp
Fri Jul 24 04:41:48 UTC 2009


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



More information about the nsd-users mailing list