From owner-freebsd-stable@FreeBSD.ORG Thu May 27 16:56:58 2004 Return-Path: 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 D707616A4CE for ; Thu, 27 May 2004 16:56:58 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67C4B43D39 for ; Thu, 27 May 2004 16:56:58 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i4RNtnRZ075321; Thu, 27 May 2004 19:55:49 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i4RNtnWK075318; Thu, 27 May 2004 19:55:49 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Thu, 27 May 2004 19:55:48 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: David Magda In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: stable@freebsd.org Subject: Re: how to interpret crash? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2004 23:56:58 -0000 On Thu, 27 May 2004, David Magda wrote: > > You don't need the actual kernel.debug to boot with, just the image > > around > > so when you run gdb -k it can pull the symbols out. Otherwise, the > > installed kernel is stripped. On -CURRENT, there's a > > /sys/$arch/compile/$kernelname.debug that you suck in. > > Yes, but I sometimes clean out my compile / object directory and so when > I need the debugging kernel it's not there (and I may have cvsup'ed my > source tree). It would be nice if a debugging kernel is sitting there > beside the kernel that I booted. I've you've cvsup'd your source tree, the debugging kernel may not be all that useful either, as the goal of the debugging symbols is to provide a mapping from locations in the kernel binary to locations in the kernel source code. If you have the same source code and same config file, there should be little variation in the compiled code and typically building a fresh kernel from the same pieces is sufficient to provide you everything you need. If you've cvsup'd and no longer have the source code for the old kernel, regardless of having debugging symbols, you're in a much worse starting point for tracking down the problem. One important reason that the debugging kernel isn't kept around is space considerations: in -CURRENT, a 5mb kernel will generally be accompanied by a 30mb debugging kernel. Each module with symbols is similarly swollen: the agp module is normally 72k, but with debugging symbols is 368k. It doesn't take too much of that to fill up most root partitions... I don't debate your basic point that on a stable system, you're least likely to find the symbols when you most need them, as the system will run fine for a long time and then run into some edge case, unusual hardware failure mode, or whatever, and given that it's been stable for years, you will find yourself with little debugging recourse. That's where tricks like using nm to track down the symbols, turning on dumps by default, compiling with the necessary DDB bits to generate a stack trace, etc, can come in quite handy. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research