From owner-freebsd-stable@FreeBSD.ORG Sat Jul 9 04:54:48 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B79916A41C for ; Sat, 9 Jul 2005 04:54:48 +0000 (GMT) (envelope-from smartweb@leadhill.net) Received: from natco3.natcotech.com (natco3.natcotech.com [205.167.142.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3336543D45 for ; Sat, 9 Jul 2005 04:54:48 +0000 (GMT) (envelope-from smartweb@leadhill.net) Received: from ibm.nlcc.us (ldhl-ras1-dial-12-28-24-226.natcotech.com [12.28.24.226]) by natco3.natcotech.com (Postfix) with ESMTP id 84345637C7 for ; Fri, 8 Jul 2005 23:54:44 -0500 (CDT) Received: (qmail 26391 invoked by uid 89); 9 Jul 2005 04:54:44 -0000 Received: from unknown (HELO ?192.168.0.2?) (192.168.0.2) by ibm.nlcc.us with SMTP; 9 Jul 2005 04:54:44 -0000 Message-ID: <42CF5893.7020807@leadhill.net> Date: Fri, 08 Jul 2005 23:54:43 -0500 From: Billy Newsom User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: FreeBSD Stable Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: rcorder dumps core for a circular dependency X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2005 04:54:48 -0000 I am wondering if I should file a PR on /sbin/rcorder dumping core? This is a reproducible core dump. I am using FreeBSD 5-Stable dated July 2, I think. SMP, i386, custom kernel. First, try this. Make a file that looks like this: #!/bin/sh # # PROVIDE: hello_world # REQUIRE: hello_world Now, save it, and let's call it "hello_world.sh" Now, try and order this one file. #rcorder hello_world.sh rcorder: Circular dependency on file `hello_world.sh'. rcorder: Circular dependency on provision `hello_world' in file `hello_world.sh'. rcorder in free(): error: chunk is already free Abort (core dumped) Exit 134 Whoops, that's not nice, is it?!?? Since rcorder normally only runs at bootup, I smell a big problem if such a problem existed in a startup script. I know that this file does indeed have a circular dependency, but let's please not dump core because of it. The impending other problem is that 6-current will soon be released, and there will be eventually a stable, and in that branch everything in /usr/local/etc/rc.d/*.sh is sent to rcorder. Putting "rcorder" into our world of ports maintainers, some of which could write some insane rcng startup files.... ouch. Perhaps we need to ensure that things of this sort can't happen -- and we need a strenuous sanity check on the files in /usr/local/etc/rc.d between now and 6-release. I know, admins should check these files, but in many cases they may not, and then get a big *surprise* when their machine dumps core during boot. I guess it's one thing for 6-Current, but another thing for the stable tree. We may have a lot of time in the 5.x tree, but as sure as I say that, the new /etc/rc.d/localpkg hack will get backported to 5.x and something may start going wrong. Back to the circular dependency, I have one example of this happening in a port's rc.d script, but I don't want to mention any names... I found this out when a port I had installed kept crashing rcorder when I tried running rcorder on /usr/local/etc/rc.d/*.sh. So now that I found this, I was going to write a PR, but hey, I figured I'd say something here first. Can someone verify this on 6-Current, anyway? If so, it is definitely a major bug for that branch. For 5.x, rcorder is only run on a small set of files in /etc, most of which don't get edited much, minimizing its impact. But still a bug nevertheless. One other thing: I know nothing about NetBSD, but should this be reported to them, too? Okay, one more shot at this bug. Try this shell script: #!/bin/sh # # PROVIDE: hello_world # BEFORE: hello_world Save it as hello1.sh. # rcorder hello1.sh rcorder: Circular dependency on file `hello1.sh'. rcorder: Circular dependency on provision `fake_prov_00000000' in file `hello1.sh'. rcorder in free(): error: chunk is already free Abort (core dumped) Exit 134 Whoops again. Billy