From owner-freebsd-hackers Fri Mar 26 23:24:58 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 3098814C8E; Fri, 26 Mar 1999 23:24:53 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id RAA13750; Sat, 27 Mar 1999 17:54:31 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id RAA53305; Sat, 27 Mar 1999 17:47:39 +1030 (CST) Message-ID: <19990327174738.B425@lemis.com> Date: Sat, 27 Mar 1999 17:47:38 +1030 From: Greg Lehey To: Jesse , "Daniel C. Sobral" Cc: freebsd-net@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Taking panic dumps (was: 3.1-STABLE dies on 40+ connects (resolved)) References: <36FACE5B.D0926C2C@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: ; from Jesse on Thu, Mar 25, 1999 at 04:09:44PM -0800 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thursday, 25 March 1999 at 16:09:44 -0800, Jesse wrote: > >>> Thanks everybody for your help! FreeBSD is great and it's 80% about the >>> community. Not that I didn't always know it. =) >> >> Notice that a core dump + kernel with symbols would still be very >> useful to find *where* in our code is the bug. > > I asked in other messages if anyone still wanted me to do that. No one > replied. Anyway, I'll do this at an off hour and get a core dump. OK. I really should put this in the FAQ, since it's really important. 1. Build a kernel with debug symbols. Assuming your config file is called MYKERNEL, do: n cd /sys/i386/conf config -g MYCONFIG cd ../../compile/MYCONFIG make depend all cp kernel kernel.gdb strip -g kernel make install 2. If you don't have the directory /var/crash, create it in a file system which has space for the dump (memory size) and the kernel (about 10 MB, 15 is safer). 3. You *must* have a single swap area which is at least a little larger than physical memory. You can have other swap areas as well, but for dumping you need one which will take the contents of memory and a little additional for headers (1 MB would be more than enough extra). Assuming you have such a partition on /dev/da0s1b, add a line like this to /etc/rc.conf: dumpdev="/dev/da0s1b" # Device name to crashdump to (if enabled). If you don't have an /etc/rc.conf, put it in /etc/defaults/rc.conf. 4. Boot the new kernel. There are a number of points to comment about: 1. If you have the space (about 10 MB), you don't need to copy kernel to kernel.gdb and strip the original. It doesn't buy you much, though, unless you have ddb installed, and that is rather painful to use. 2. /etc/rc.conf and friends are still moving around and changing their relationships to each other. This applies to 3.1-RELEASE. It doesn't apply exactly to previous or subsequent releases, though you should be able to figure out what's going on. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message