Bug 115814

Summary: /etc/rc.d/named restart fails sometimes
Product: Base System Reporter: jonny <jonny>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 6.2-STABLE   
Hardware: Any   
OS: Any   

Description jonny 2007-08-25 16:50:01 UTC

# /etc/rc.d/named restart
Stopping named.
named already running? (pid=48587).
# /etc/rc.d/named restart
Stopping named: rndc failed, trying killall: No matching processes were found
Starting named.
# /etc/rc.d/named restart
Stopping named.
Starting named.
# /etc/rc.d/named restart
Stopping named.
Starting named.

Fix: 

I am no expert in rc-subr, but the fix is to make sure named has died before exiting the stop subroutine.

I usually do some kill -0 to check if a pid is still alive.

IMHO, every program that is stopped with kill(2) should have that kind of check.
Maybe this could be a new routine to rc.subr.
How-To-Repeat: 
As seen above, just after restart the problem goes away.

Probably a delay when dying and many info still in memory.
Comment 1 Florian Smeets 2008-01-16 16:42:07 UTC
Hi,

my experience is that this has been fixed with Rev. 1.27 of 
/etc/rc.d/named and has been MFCed to RELENG_6 as Rev. 1.22.2.3

I think this PR can be closed.

Cheers,
Florian
Comment 2 Remko Lodder freebsd_committer freebsd_triage 2008-01-16 17:34:41 UTC
State Changed
From-To: open->closed

Florian reports that this had been resolved : "My experience is that 
this has been fixed with Rev. 1.27 of /etc/rc.d/named and has been MFCed 
to RELENG_6 as Rev. 1.22.2.3"