| Summary: | bad order of rpc.lockd and rpc.statd starts in rc.networks | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Jean-Luc.Richier <Jean-Luc.Richier> |
| Component: | conf | Assignee: | Alfred Perlstein <alfred> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->alfred Alfred last fooled with the lockd stuff and with the start order in rc.network. State Changed From-To: open->closed rev 1.119 +16 -5 src/etc/rc.network |
In FreeBSD current rpc.lockd contacts the local rpc.statd daemon but as rpc.statd is started after rpc.lockd in .etc.rc.network, the initial rpc.lockd (at boot time) fails after a few minutes. There is no messages, as the messages are displayed using the errx function, which do not print anything for a daemon ! If rpc.lockd is started by hand afterwards, it runs correctly Fix: The simplest solution is to reverse rpc.statd and rpc.lockd calls in /etc/rc.network. An other solution is to make rpc.lockd wait for rpc.statd (it is almost the case: lockd retries on RPC_PROGUNAVAIL error, but here the error is RPC_TIMEDOUT) ! case ${rpc_lockd_enable} in [Yy][Ee][Ss]) ! echo -n ' rpc.lockd'; rpc.lockd ;; esac ! case ${rpc_statd_enable} in [Yy][Ee][Ss]) ! echo -n ' rpc.statd'; rpc.statd ;; esac fi --- 605,620 ---- sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null fi ! # The statd program must already be registered when lockd runs. ! case ${rpc_statd_enable} in [Yy][Ee][Ss]) ! echo -n ' rpc.statd'; rpc.statd ;; esac ! case ${rpc_lockd_enable} in [Yy][Ee][Ss]) ! echo -n ' rpc.lockd'; rpc.lockd ;; esac fi--PdJoRpLGp8U04wWxhrX8DS6R05UogrBbjeCJrcsCxxu6fEMQ Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" *** etc/rc.network.DIST Sat May 19 15:10:41 2001 --- etc/rc.network Wed May 30 11:55:10 2001 *************** *** 605,619 **** sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null fi How-To-Repeat: - enable rpc.statd and rpc.lockd in /etc/rc.conf - reboot the machine - do some ps -ax | grep rpc (or truss -p <rpc.lockd_pid>) One sees that rpc.lockd runs for a few minutes and then exit