rcorder(8) dumps core
Brian Fundakowski Feldman
green at freebsd.org
Wed Sep 15 22:48:41 PDT 2004
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. \,,,,,,,,,,,,,,,,,,,,,,\
More information about the freebsd-current
mailing list