Re: rcorder(8) dumps core

From: Brian Fundakowski Feldman <green_at_freebsd.org>
Date: Thu, 16 Sep 2004 01:48:39 -0400
On Tue, Sep 14, 2004 at 07:38:10PM +0300, Giorgos Keramidas wrote:
> On 2004-09-14 17:52, Lukas Ertl <le_at_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_at_FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\
Received on Thu Sep 16 2004 - 03:48:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:12 UTC