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

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

>Number:         140462
>Category:       bin
>Synopsis: locked by /etc/rc.d and dhclient (regression)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 11 00:30:03 UTC 2009
>Originator:     Warren Block
>Release:        8.0-RC2
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
After a fresh boot or reboot of 8.0-RC2, /var/run/ 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/ remaining even after devd is killed:

lightning% lsof /var/run/
devd      400  root    6w  VREG  0,101        3 47124 /var/run/
dhclient  865  root    6w  VREG  0,101        3 47124 /var/run/
dhclient 1024 _dhcp    6w  VREG  0,101        3 47124 /var/run/

This is a regression from 7-STABLE, where is only locked by 
devd after startup.
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:
Workaround: rather than restart devd in one step, kill devd and rm /var/run/  Then start devd.


More information about the freebsd-bugs mailing list