bin/140462: devd.pid locked by /etc/rc.d and dhclient (regression)

Warren Block wblock at wonkity.com
Wed Nov 11 00:30:04 UTC 2009


>Number:         140462
>Category:       bin
>Synopsis:       devd.pid locked by /etc/rc.d and dhclient (regression)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 11 00:30:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Warren Block
>Release:        8.0-RC2
>Organization:
>Environment:
FreeBSD lightning 8.0-RC2 FreeBSD 8.0-RC2 #0: Fri Nov  6 21:23:46 MST 2009     root at lightning:/usr/obj/usr/src/sys/LIGHTNING  i386
>Description:
After a fresh boot or reboot of 8.0-RC2, /var/run/devd.pid is locked preventing devd restart:

# /etc/rc.d/devd restart
Stopping devd.
Starting devd.
devd: devd already running, pid: 398
/etc/rc.d/devd: WARNING: failed to start devd

This is due to locks on /var/run/devd.pid remaining even after devd is killed:

lightning% lsof /var/run/devd.pid
COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
devd      400  root    6w  VREG  0,101        3 47124 /var/run/devd.pid
dhclient  865  root    6w  VREG  0,101        3 47124 /var/run/devd.pid
dhclient 1024 _dhcp    6w  VREG  0,101        3 47124 /var/run/devd.pid

This is a regression from 7-STABLE, where devd.pid is only locked by 
devd after startup.
>How-To-Repeat:
Boot 8.0-RC2 with dhclient run from /etc/rc.conf.  Try to restart devd.  devd will be killed but not restarted because the pidfile is still present because of locks.

Mailing list thread start:

http://docs.freebsd.org/cgi/getmsg.cgi?fetch=862294+0+/usr/local/www/db/text/2009/freebsd-current/20091018.freebsd-current
>Fix:
Workaround: rather than restart devd in one step, kill devd and rm /var/run/devd.pid.  Then start devd.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list