From owner-freebsd-bugs@FreeBSD.ORG Sat Aug 16 03:30:04 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A9571065678 for ; Sat, 16 Aug 2008 03:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 78ECD8FC1B for ; Sat, 16 Aug 2008 03:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7G3U4Bp061572 for ; Sat, 16 Aug 2008 03:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7G3U4s1061558; Sat, 16 Aug 2008 03:30:04 GMT (envelope-from gnats) Resent-Date: Sat, 16 Aug 2008 03:30:04 GMT Resent-Message-Id: <200808160330.m7G3U4s1061558@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Richard S. Conto" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B30041065676 for ; Sat, 16 Aug 2008 03:23:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id B73238FC14 for ; Sat, 16 Aug 2008 03:23:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m7G3N8NH088324 for ; Sat, 16 Aug 2008 03:23:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m7G3N87f088323; Sat, 16 Aug 2008 03:23:08 GMT (envelope-from nobody) Message-Id: <200808160323.m7G3N87f088323@www.freebsd.org> Date: Sat, 16 Aug 2008 03:23:08 GMT From: "Richard S. Conto" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/126562: /sbin/rcorder fails to run unrelated startup scripts when some startup scripts require un-PROVIDEd services X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2008 03:30:04 -0000 >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@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: