Under 8.2-PRERELEASE (GENERIC kernel), about 15% of the times I boot up (with rpc.statd and rpc.lockd enabled in rc.conf), I get: Feb 4 07:31:11 wonderland rpc.statd: bindresvport_sa: Address already in use Feb 4 07:31:11 wonderland root: /etc/rc: WARNING: failed to start statd and slightly later: Feb 4 07:31:36 wonderland kernel: NLM: unexpected error contacting NSM, stat=5, errno=35 I can start rpc.statd and rpc.lockd manually at this point (and I have to start them to run firefox and mail with my NFS-mounted home directory and mail spool). But what might cause the above errors? -- George Mitchell
On 02/09/11 15:20, george+freebsd@m5p.com wrote:> Under 8.2-PRERELEASE (GENERIC kernel), about 15% of the times I boot up > (with rpc.statd and rpc.lockd enabled in rc.conf), I get: > > Feb 4 07:31:11 wonderland rpc.statd: bindresvport_sa: Address already in use > Feb 4 07:31:11 wonderland root: /etc/rc: WARNING: failed to start statd > > and slightly later: > > Feb 4 07:31:36 wonderland kernel: NLM: unexpected error contacting NSM, stat=5, errno=35 > > I can start rpc.statd and rpc.lockd manually at this point (and I have to > start them to run firefox and mail with my NFS-mounted home directory and > mail spool). But what might cause the above errors? -- George MitchellFWIW I'm seeing this on 8.1 too. statd won't start and after KDE login it's no use anymore starting it manually: I have to reboot. The exact message I get is slightly different, though (no "bindresvport_sa", but something else I don't remember). I'll paste it when I'll see it again. bye av.
On Wed, Feb 9, 2011 at 9:20 AM, <george+freebsd@m5p.com> wrote:> Under 8.2-PRERELEASE (GENERIC kernel), about 15% of the times I boot up > (with rpc.statd and rpc.lockd enabled in rc.conf), I get: > > Feb ?4 07:31:11 wonderland rpc.statd: bindresvport_sa: Address already in use > Feb ?4 07:31:11 wonderland root: /etc/rc: WARNING: failed to start statd > > and slightly later: > > Feb ?4 07:31:36 wonderland kernel: NLM: unexpected error contacting NSM, stat=5, errno=35 > > I can start rpc.statd and rpc.lockd manually at this point (and I have to > start them to run firefox and mail with my NFS-mounted home directory and > mail spool). ?But what might cause the above errors? ? -- George Mitchell > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >Don't rpc.statd and lockd try to choose a random port upon startup? I seem to remember a similar problem I had a long time ago. I opted to use a consistent, not-used port and haven't seen the problem since (this was years ago, so I can't remember if the error you're seeing was identical to mine). /etc/rc.conf: rpc_statd_flags="-p 898" rpc_lockd_flags="-p 4045" -Proto
I've seen this intermittently for mountd. I think the problem is that the code finds an unused port for udp/ip6 and then tries to use the same port# for tcp/ip6, udp/ip4, tcp/ip4. All three daemons have essentially the same function for doing this. The attached patches changes the behaviour so that it tries to get an unused port for each of the 4 cases. (This all applies to the "wildcard" case, where no port# or hosts have been specified as command args.) If you have the chance to try these patches, please let us know how they work for you? rick ps: I lost track of the thread, so I don't know who started it, but hopefully, they are on the cc list? -------------- next part -------------- A non-text attachment was scrubbed... Name: mountd.patch Type: text/x-patch Size: 1791 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20110218/8ffc7020/mountd.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: statd.patch Type: text/x-patch Size: 1854 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20110218/8ffc7020/statd.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: lockd.patch Type: text/x-patch Size: 1885 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20110218/8ffc7020/lockd.bin
> Under 8.2-PRERELEASE (GENERIC kernel), about 15% of the times I boot up > (with rpc.statd and rpc.lockd enabled in rc.conf), I get: > > Feb 4 07:31:11 wonderland rpc.statd: bindresvport_sa: Address already in use > Feb 4 07:31:11 wonderland root: /etc/rc: WARNING: failed to start statd > > and slightly later: > > Feb 4 07:31:36 wonderland kernel: NLM: unexpected error contacting NSM, stat=5, errno=35 > > I can start rpc.statd and rpc.lockd manually at this point (and I have to > start them to run firefox and mail with my NFS-mounted home directory and > mail spool). But what might cause the above errors? -- George MitchellWe have been seeing this too, with the addition of mountd. So I decided to try and track it down. rpc.lockd, rpc.statd or mountd, all share the same code for allocating address/port. I added some more info to be displayed in case of error, mainly the ai_family and port, so after many successfull reboots, I got: Mar 9 09:18:19 chamsa mountd[1070]: bindresvport_sa: (2/617) Address already in use but: chamsa> rpcinfo | grep mountd 100005 1 udp 0.0.0.0.2.105 mountd superuser 100005 3 udp 0.0.0.0.2.105 mountd superuser 100005 1 tcp 0.0.0.0.2.105 mountd superuser 100005 3 tcp 0.0.0.0.2.105 mountd superuser BTW, 0.0.0.2.105 is 617, and 2 is AF_INET the above is wierd, since the rpc stuff happens after the bindresvport_sa(...) danny
On 03/09/11 03:09, Daniel Braniss wrote:>> Under 8.2-PRERELEASE (GENERIC kernel), about 15% of the times I boot up >> (with rpc.statd and rpc.lockd enabled in rc.conf), I get: >> >> Feb 4 07:31:11 wonderland rpc.statd: bindresvport_sa: Address already in use >> Feb 4 07:31:11 wonderland root: /etc/rc: WARNING: failed to start statd >> >> and slightly later: >> >> Feb 4 07:31:36 wonderland kernel: NLM: unexpected error contacting NSM, stat=5, errno=35 >> >> I can start rpc.statd and rpc.lockd manually at this point (and I have to >> start them to run firefox and mail with my NFS-mounted home directory and >> mail spool). But what might cause the above errors? -- George Mitchell > > We have been seeing this too, with the addition of mountd. > So I decided to try and track it down. > rpc.lockd, rpc.statd or mountd, all share the same code for allocating > address/port. I added some more info to be displayed in case of error, > mainly the ai_family and port, so after many successfull reboots, I got: > > Mar 9 09:18:19 chamsa mountd[1070]: bindresvport_sa: (2/617) Address already > in use > > but: > > chamsa> rpcinfo | grep mountd > 100005 1 udp 0.0.0.0.2.105 mountd superuser > 100005 3 udp 0.0.0.0.2.105 mountd superuser > 100005 1 tcp 0.0.0.0.2.105 mountd superuser > 100005 3 tcp 0.0.0.0.2.105 mountd superuser > > BTW, 0.0.0.2.105 is 617, and 2 is AF_INET > > the above is wierd, since the rpc stuff happens after the bindresvport_sa(...) > > danny > >Thanks for the analysis. The reason I originally posted is to see why this might have popped up in 8.x, as it never happened in 7.x. -- George Mitchell
On Wed, Mar 09, 2011 at 07:07:26AM -0500, George Mitchell wrote:> On 03/09/11 03:09, Daniel Braniss wrote: > >>Under 8.2-PRERELEASE (GENERIC kernel), about 15% of the times I boot up > >>(with rpc.statd and rpc.lockd enabled in rc.conf), I get: > >> > >>Feb 4 07:31:11 wonderland rpc.statd: bindresvport_sa: Address already in use > >>Feb 4 07:31:11 wonderland root: /etc/rc: WARNING: failed to start statd > >> > >>and slightly later: > >> > >>Feb 4 07:31:36 wonderland kernel: NLM: unexpected error contacting NSM, stat=5, errno=35 > >> > >>I can start rpc.statd and rpc.lockd manually at this point (and I have to > >>start them to run firefox and mail with my NFS-mounted home directory and > >>mail spool). But what might cause the above errors? -- George Mitchell > > > >We have been seeing this too, with the addition of mountd. > >So I decided to try and track it down. > >rpc.lockd, rpc.statd or mountd, all share the same code for allocating > >address/port. I added some more info to be displayed in case of error, > >mainly the ai_family and port, so after many successfull reboots, I got: > > > >Mar 9 09:18:19 chamsa mountd[1070]: bindresvport_sa: (2/617) Address already > >in use > > > >but: > > > >chamsa> rpcinfo | grep mountd > > 100005 1 udp 0.0.0.0.2.105 mountd superuser > > 100005 3 udp 0.0.0.0.2.105 mountd superuser > > 100005 1 tcp 0.0.0.0.2.105 mountd superuser > > 100005 3 tcp 0.0.0.0.2.105 mountd superuser > > > >BTW, 0.0.0.2.105 is 617, and 2 is AF_INET > > > >the above is wierd, since the rpc stuff happens after the bindresvport_sa(...) > > > >danny > > > > > > Thanks for the analysis. The reason I originally posted is to see why > this might have popped up in 8.x, as it never happened in 7.x.This problem has happened on our RELENG_7 systems in the past, though the port binding failed because something else had bound to a port number that (if I remember right) mountd randomly chose/tried to bind to and failed. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |