Date: Thu, 16 Sep 2004 01:48:39 -0400 From: Brian Fundakowski Feldman <green@freebsd.org> To: Giorgos Keramidas <keramida@linux.gr> Cc: freebsd-current@freebsd.org Subject: Re: rcorder(8) dumps core Message-ID: <20040916054838.GK36708@green.homeunix.org> In-Reply-To: <20040914163810.GA2240@orion.daedalusnetworks.priv> References: <20040914175102.R528@korben.in.tern> <20040914163810.GA2240@orion.daedalusnetworks.priv>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 14, 2004 at 07:38:10PM +0300, Giorgos Keramidas wrote: > On 2004-09-14 17:52, Lukas Ertl <le@freebsd.org> 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: <http://green.homeunix.org/~green/rcorder.rb> -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040916054838.GK36708>