From owner-cvs-all@FreeBSD.ORG Tue Jan 20 20:22:16 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A7EC16A4CE; Tue, 20 Jan 2004 20:22:16 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 668FA43D31; Tue, 20 Jan 2004 20:22:14 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id i0L4KBUd000875; Tue, 20 Jan 2004 23:20:11 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i0L4K5cL000872; Tue, 20 Jan 2004 23:20:05 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Tue, 20 Jan 2004 23:20:03 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: "M. Warner Losh" In-Reply-To: <20040120.210841.22504092.imp@bsdimp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: wpaul@FreeBSD.org cc: src-committers@FreeBSD.org cc: phk@FreeBSD.org cc: bde@zeta.org.au cc: cvs-src@FreeBSD.org cc: truckman@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/alpha support.s src/sys/i386/i386 swtch.s src/sys/kern kern_shutdown.c src/sys/sys systm.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2004 04:22:16 -0000 On Tue, 20 Jan 2004, M. Warner Losh wrote: > : Actually, I was having a very similar conversation with Bill Paul this > : afternoon. We were discussing dropping a copy of the kernel message > : buffer onto the header of swap space on panic, if possible, and then > : dropping them in /var/log/crash.log for management by newsyslog. Then the > : natural response to "My machine spontaneously reboots" becomes "Look for > : something recent in /var/log/crash.log", as opposed to "You'll need to > : enable crash dumps, set up a serial console", etc. It's also something we > : could turn on by default, as opposed to crash dumps, which would otherwise > : consume of alot of disk space. > > I assume you are talking about reading them out of swap space on boot so > you'd see something like the following in your logs: > > foo: first reboot after kernel panic > > > Right? Then the message would be zeroed out, so you don't get it on a > normal reboot, right? Yes, exactly. It would include any recent information in the message buffer, including unusual printfs, panic messages, etc. Depending on how we arranged it, presumably it could even include output from the DDB session if DDB was compiled in. My only real concern is making sure that if things go wrong in writing it out, we don't stall the reboot following the panic. It used to be the case, for example, that we would panic during a dump, and that would not only lose our dump, but also potentially hang the console. There is more risk associated with generating the message buffer dump as opposed to simply resetting, but it might well pay off (and could easily be configurable with a default depending on the usual failure mode). Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research