From owner-freebsd-bugs@FreeBSD.ORG Sat Aug 25 15:50:02 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C76716A420 for ; Sat, 25 Aug 2007 15:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E670A13C465 for ; Sat, 25 Aug 2007 15:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l7PFo184071920 for ; Sat, 25 Aug 2007 15:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l7PFo1BU071916; Sat, 25 Aug 2007 15:50:01 GMT (envelope-from gnats) Resent-Date: Sat, 25 Aug 2007 15:50:01 GMT Resent-Message-Id: <200708251550.l7PFo1BU071916@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, João Carlos Mendes Luís Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6242616A41A for ; Sat, 25 Aug 2007 15:49:39 +0000 (UTC) (envelope-from jonny@jonny.eng.br) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.freebsd.org (Postfix) with ESMTP id 12DCC13C46C for ; Sat, 25 Aug 2007 15:49:39 +0000 (UTC) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id 53481125705 for ; Sat, 25 Aug 2007 12:27:16 -0300 (BRT) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KurQcBi-C89I for ; Sat, 25 Aug 2007 12:27:12 -0300 (BRT) Received: by coe.ufrj.br (Postfix, from userid 2000) id 607711256FA; Sat, 25 Aug 2007 12:27:12 -0300 (BRT) Message-Id: <20070825152712.607711256FA@coe.ufrj.br> Date: Sat, 25 Aug 2007 12:27:12 -0300 (BRT) From: João Carlos Mendes Luís To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/115814: /etc/rc.d/named restart fails sometimes X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: João Carlos Mendes Luís List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2007 15:50:02 -0000 >Number: 115814 >Category: bin >Synopsis: /etc/rc.d/named restart fails sometimes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 25 15:50:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: João Carlos Mendes Luís >Release: FreeBSD 6.2-STABLE i386 >Organization: Barradev Tecnologia Ltda. >Environment: System: FreeBSD 6.2-STABLE Wed Jun 13 14:32:29 BRT 2007, i386 chrooted named master for a few domains, slave for a few others, recursive for a small network >Description: # /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. >How-To-Repeat: As seen above, just after restart the problem goes away. Probably a delay when dying and many info still in memory. >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. >Release-Note: >Audit-Trail: >Unformatted: