From owner-freebsd-rc@FreeBSD.ORG Tue Oct 23 17:49:54 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 60E9A16A418 for ; Tue, 23 Oct 2007 17:49:54 +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 24D4713C480 for ; Tue, 23 Oct 2007 17:49:53 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 19214 invoked by uid 399); 23 Oct 2007 17:49:43 -0000 Received: from localhost (HELO slave.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTP; 23 Oct 2007 17:49:43 -0000 X-Originating-IP: 127.0.0.1 Date: Tue, 23 Oct 2007 10:49:40 -0700 (PDT) From: Doug Barton To: John Marshall In-Reply-To: <471E27E5.4030609@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> 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: MULTIPART/MIXED; BOUNDARY="0-1398324669-1193161782=:14145" 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: Tue, 23 Oct 2007 17:49:54 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1398324669-1193161782=:14145 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Wed, 24 Oct 2007, John Marshall wrote: > [blush] I actually fixed this 12 months ago on 6.n and forgot all about it. I > let the 7.0 mergemaster overwrite the rc.d/ypset because I didn't think I had > touched it. > > Here is the fix. All happy now - but not much the wiser as to rc > troubleshooting techniques. > > ----------------------------------------------- > --- /usr/src/etc/rc.d/ypset 2007-10-12 12:38:42.000000000 +1000 > +++ /etc/rc.d/ypset 2007-10-24 02:31:32.000000000 +1000 > @@ -5,6 +5,7 @@ > > # PROVIDE: ypset > # REQUIRE: ypbind > +# BEFORE: mountd > > . /etc/rc.subr John, Thanks for digging into this yourself, always nice when someone answers their own questions. :) In regards to your proposed solution, I would like to explore this with you a little. In general it would be preferred to add REQUIRE: ypset in mountd instead of using BEFORE. This makes debugging easier down the road. The other thing I'm interested in is the relationship between this change and the other yp* stuff. I've attached a patch that I use to debug the rcorder stuff. If you could copy your /etc/rc to a handy directory, apply the patch, and then run 'sh rc'. If you could do that before and after applying the change you suggested (using REQUIRE instead of BEFORE if you don't mind) I'd be interested if anything else changes besides the ypset/mountd relationship. My concern is that in my rcorder (basically stock RELENG_6 with some ports) ypxfrd, ypudated, and ypset are all running in that order, and late in the overall order. I'm concerned that if we move ypset earlier (and mountd is run a lot earlier than those 3) it will have other side effects. I also noticed that ypserv and ypbind are run much than even mountd, and since I don't use NIS I don't really know what those side effects might be (if any). I may be a little overcautious here, but experience has taught us that even seemingly small changes can have large and unanticipated consequences. Doug -- This .signature sanitized for your protection --0-1398324669-1193161782=:14145 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=rc-debug.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=rc-debug.patch LS0tIC9ldGMvcmMJMjAwNy0wNy0wNiAyMjoyNjowOS4wMDAwMDAwMDAgLTA3 MDANCisrKyByYwkyMDA3LTEwLTIzIDEwOjM1OjAzLjAwMDAwMDAwMCAt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