From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 27 00:40:09 2010 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 C4029106564A for ; Mon, 27 Dec 2010 00:40:09 +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 84E518FC0C for ; Mon, 27 Dec 2010 00:40:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oBR0e9dt045953 for ; Mon, 27 Dec 2010 00:40:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oBR0e9jo045952; Mon, 27 Dec 2010 00:40:09 GMT (envelope-from gnats) Resent-Date: Mon, 27 Dec 2010 00:40:09 GMT Resent-Message-Id: <201012270040.oBR0e9jo045952@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, Grigory Rechistov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77D65106564A for ; Mon, 27 Dec 2010 00:32:06 +0000 (UTC) (envelope-from ggg_mail@inbox.ru) Received: from fallback2.mail.ru (fallback2.mail.ru [94.100.176.87]) by mx1.freebsd.org (Postfix) with ESMTP id 2F4D88FC13 for ; Mon, 27 Dec 2010 00:32:05 +0000 (UTC) Received: from smtp6.mail.ru (smtp6.mail.ru [94.100.176.48]) by fallback2.mail.ru (mPOP.Fallback_MX) with ESMTP id C235E29A6BC4 for ; Mon, 27 Dec 2010 02:43:33 +0300 (MSK) Received: from [95.27.178.122] (port=3468 helo=atakua.doesntexist.org) by smtp6.mail.ru with asmtp id 1PX0FO-0006Ls-00 for FreeBSD-gnats-submit@freebsd.org; Mon, 27 Dec 2010 02:43:30 +0300 Received: by atakua.doesntexist.org (sSMTP sendmail emulation); Mon, 27 Dec 2010 02:43:30 +0300 Message-Id: Date: Mon, 27 Dec 2010 02:43:30 +0300 From: "Grigory Rechistov" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: conf/153460: devd cannot be restarted correctly via /etc/rc.d script X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Grigory Rechistov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Dec 2010 00:40:09 -0000 >Number: 153460 >Category: conf >Synopsis: devd cannot be restarted correctly via /etc/rc.d script >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 27 00:40:08 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Grigory Rechistov >Release: FreeBSD 8.1-STABLE i386 >Organization: >Environment: System: FreeBSD atakua 8.1-STABLE FreeBSD 8.1-STABLE #3: Wed Oct 20 02:06:12 MSD 2010 root@atakua.doesntexist.org:/usr/obj/usr/src/sys/INTOX i386 >Description: Certain ports, like multimedia/webcamd, ask for devd daemon restart in their pkg-message's . Though when I try to use the regular '/etc/rc.d/devd restart' command I always get this error: Stopping devd. Waiting for PIDS: 624. Starting devd. devd: devd already running, pid: 624 /etc/rc.d/devd: WARNING: failed to start devd After that no alive 'devd' process exists in system. I have to remove the pidfile manually and then start devd manually. >How-To-Repeat: Try to restart devd as root: # /etc/rc.d/devd restart You'll end up with no devd running and stale /var/run/devd.pid file preventing it from starting via rc.d scripts. >Fix: The run_rc_command() function from /etc/rc.subr file should not only check for pidfile existence but also call check_pidfile() function to verify that the actual process is alive and has name "devd". >Release-Note: >Audit-Trail: >Unformatted: