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
>Synopsis: /sbin/rcorder fails to run unrelated startup scripts when some startup scripts require un-PROVIDEd services
>Arrival-Date: Sat Aug 16 03:30:03 UTC 2008
>Originator: Richard S. Conto
unemployed at home
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
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.
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.
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:
More information about the freebsd-bugs