From owner-freebsd-rc@FreeBSD.ORG Wed Oct 24 22:30:20 2007 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8864416A4C6 for ; Wed, 24 Oct 2007 22:30:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id 361FA13C4B5 for ; Wed, 24 Oct 2007 22:30:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 16778 invoked by uid 399); 24 Oct 2007 22:30:05 -0000 Received: from localhost (HELO slave.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTP; 24 Oct 2007 22:30:05 -0000 X-Originating-IP: 127.0.0.1 Date: Wed, 24 Oct 2007 15:30:02 -0700 (PDT) From: Doug Barton To: John Marshall In-Reply-To: <471F37CA.1080005@riverwillow.com.au> Message-ID: References: <471D7F68.8070308@riverwillow.com.au> <584bfc3f0710230505i29e8f19aofc4e66d0aee7b7c1@mail.gmail.com> <471DFFD0.8020701@riverwillow.com.au> <20071023155932.GA37204@lor.one-eyed-alien.net> <471E27E5.4030609@riverwillow.com.au> <471F37CA.1080005@riverwillow.com.au> X-message-flag: Outlook -- Not just for spreading viruses anymore! X-OpenPGP-Key-ID: 0xD5B2F0FB Organization: http://www.FreeBSD.org/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "Brooks Davis ; Mike Telahun Makonnen ; freebsd-rc@FreeBSD.Org" Subject: Re: How to debug rc hangs? X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2007 22:30:20 -0000 John, Thanks for digging into this, a few comments in line. On Wed, 24 Oct 2007, John Marshall wrote: > It looks to me like the only reason why ypset runs so late is that there are > no REQUIRE/BEFORE constraints requiring it to run earlier - and I think there > should be. Ok, fair enough. > ---- ypset(8) ---- > NAME > ypset -- tell ypbind(8) which YP server process to use > ------------------ > > The sole purpose of ypset is to get ypbind working. Anything which has a > dependency on the NIS client (ypbind) is going to stall if ypbind is stalled > waiting to find a NIS server. I have no NIS experience beyond this particular > network, but my guess is that most systems wouldn't be relying on ypset to > get ypbind functioning, so most people wouldn't hit this problem. If ypset is > unused, who cares where it sits in the rc order? If it is used, then it > really needs to kick in very soon after ypbind and before anything that > requires ypbind. I think I understand that bit, thanks. > Having delved a bit further into this, I think that mountd was probably > actually waiting on nfsserver, and that nfsserver has the implicit dependency > on ypbind. So, I added ypset to the REQUIRE list in rc.d/nfsserver - and it > works. More good detective work! I have another idea though ... > (If there was some way of tying ypbind and ypset together, I think that would > be a better solution.) Well there are a couple ways of doing that. The least painful would be to change any REQUIRE lines that mention ypbind to mention ypset instead. ypset already has a REQUIRE for ypbind, so that would put them in the right order, and closer together. Since I know next to nothing about NIS though, I am hesitant to do that. > ...and the diff's resulting from various experiments with your debug patch > applied to /etc/rc (thanks!). In each case, the only thing that moves is > ypset - and in the first two scenarios yield identical results. That's good news, I did notice something interesting though. > ----------------- > --- rc.late.standard 2007-10-24 08:54:59.000000000 +1000 > +++ rc.late.ypset_before_mountd 2007-10-24 08:53:59.000000000 +1000 > @@ -65,6 +65,7 @@ > /etc/rc.d/kadmind > /etc/rc.d/keyserv > /etc/rc.d/kpasswdd > +/etc/rc.d/ypset > /etc/rc.d/quota Here it comes before quota > ----------------- > --- rc.late.standard 2007-10-24 08:54:59.000000000 +1000 > +++ rc.late.nfsserver_requires_ypset 2007-10-24 21:06:23.000000000 +1000 > @@ -66,6 +66,7 @@ > /etc/rc.d/keyserv > /etc/rc.d/kpasswdd > /etc/rc.d/quota > +/etc/rc.d/ypset Here it comes after. Now mountd has: # REQUIRE: NETWORKING nfsserver rpcbind quota and there is a comment in quota that says: must be after ypbind if using NIS So I'm thinking that adding REQUIRE: ypset to quota might be the way to go. Can you try that fix instead and see if it works for you? If you have time, I would also be interested to know if there are any changes if you take the current CVS code and just s/ypbind/ypset/ for all the scripts that currently REQUIRE ypbind. I'm not convinced that is the right answer yet, I'm just interested in what's going to happen. Doug -- This .signature sanitized for your protection