From owner-freebsd-current@FreeBSD.ORG Thu Sep 16 05:48:41 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8037516A4CE; Thu, 16 Sep 2004 05:48:41 +0000 (GMT) Received: from green.homeunix.org (pcp04368961pcs.nrockv01.md.comcast.net [69.140.212.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id D621043D5C; Thu, 16 Sep 2004 05:48:40 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id i8G5meYR058481; Thu, 16 Sep 2004 01:48:40 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id i8G5md20058480; Thu, 16 Sep 2004 01:48:39 -0400 (EDT) (envelope-from green) Date: Thu, 16 Sep 2004 01:48:39 -0400 From: Brian Fundakowski Feldman To: Giorgos Keramidas Message-ID: <20040916054838.GK36708@green.homeunix.org> References: <20040914175102.R528@korben.in.tern> <20040914163810.GA2240@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040914163810.GA2240@orion.daedalusnetworks.priv> User-Agent: Mutt/1.5.6i cc: freebsd-current@freebsd.org Subject: Re: rcorder(8) dumps core X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2004 05:48:41 -0000 On Tue, Sep 14, 2004 at 07:38:10PM +0300, Giorgos Keramidas wrote: > On 2004-09-14 17:52, Lukas Ertl wrote: > > Hi, > > today I noticed a problem with rcorder on a very recent -CURRENT: > > The core dump is triggered by the circular deps introduced by a recent > s/ntpdate/ntpd/ in rc.d/rpcbind (see my reply to the commit message). > >From a very quick first check it seems that circular dependencies > somehow mess up the memory management of rcorder and it bombs while > trying to free() the same pointer. > > The rest of the warnings printed by rcorder (missing or plainly wrong > dependencies) can be fixed by this patch (which I haven't sent to > freebsd-rc for review yet, but here it is): The program rcorder(8) is what I like to call "gross software." It shouldn't be trying to recover from circular dependencies -- it should be excluding them. Of course, in trying to recover, it crashes. This is mainly due to trying to choose far more complicated algorithms than are needed. Here's a reimplementation in Ruby. It's feature-complete as far as I can tell, but of course needs reimplementation into C/C++ to be used in the base system. It's not like choosing simpler algorithms and instead of using a compiled language, combined, even slow it down too much: $ time ./rcorder.rb /etc/rc.d/* xyz/x xyz/y >/dev/null rcorder: requirement `beforenetlkm' in file `/etc/rc.d/pf' has no providers. rcorder: requirement `beforenetlkm' in file `/etc/rc.d/ike' has no providers. rcorder: requirement `beforenetlkm' in file `/etc/rc.d/pflog' has no providers. rcorder: file `/etc/rc.d/nsswitch' is before unknown provision `network' rcorder: following files had circular dependencies: xyz/x xyz/y 0.12s real 0.08s user 0.01s system See: -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\