bin/126562: /sbin/rcorder fails to run unrelated startup scripts when some startup scripts require un-PROVIDEd services

Richard S. Conto Richard.Conto at gmail.com
Sat Aug 16 03:30:04 UTC 2008


>Number:         126562
>Category:       bin
>Synopsis:       /sbin/rcorder fails to run unrelated startup scripts when some startup scripts require un-PROVIDEd services
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 16 03:30:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Richard S. Conto
>Release:        7.0
>Organization:
unemployed at home
>Environment:
FreeBSD toolbox.family 7.0-STABLE FreeBSD 7.0-STABLE #0: Fri Aug 15 21:06:19 EDT 2008     rsc at toolbox.family:/usr/src/sys/i386/compile/TOOLBOX  i386


>Description:
Under SOME circumstances, when SOME */rc.d/* init scripts REQUIRE something that isn't PROVIDE'd, unrelated init scripts will NOT be run.

The installation of some combinations of ports from /usr/ports will cause the system startup process to become faulty, with standard services no longer started.

I *believe* that this  occurs when /usr/src/sbin/rcorder.c DELETEs objects failing REQUIREments, it's hash tables become corrupt and too many unrelated objects go missing.

***

I would LIKE to make a successful run of "rcorder" a REQUIREMENT for all ports that install a startup script.


>How-To-Repeat:
I have a collection of init scripts from /etc/rc.d/ and /usr/local/etc/rc.d/ that demonstrate this problem when run with rcorder.
>Fix:
I hate to say it -- I've got a complete re-write of rcorder that avoids the use of hash tables to keep track of provisions & requirements & scripts.  I've actually got two - one in perl (using Perl hashes) - to explore the algorithms, and one in "C".

Besides solving the bug, by avoiding the use of hash tables, my version of "rcorder" attempts to preserve the order of the "init" scripts presented on the command line. This is relevant only for init scripts that don't share a common ordering tree.  (I'm not sure that this should be documented as it might encourage overly complex ordering of init scripts!)

There is also debugging, etc.


Sources, including test scripts, available at:
    http://www-personal.umich.edu/~rsc/FreeBSD/rcorder.tar.bz2






>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list