conf/153460: devd cannot be restarted correctly via /etc/rc.d script

Grigory Rechistov ggg_mail at inbox.ru
Mon Dec 27 00:40:09 UTC 2010


>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 at 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:


More information about the freebsd-bugs mailing list