From owner-freebsd-questions@FreeBSD.ORG Sun Jul 30 11:39:58 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADFF716A4DA for ; Sun, 30 Jul 2006 11:39:58 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FB4D43D46 for ; Sun, 30 Jul 2006 11:39:58 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 89AFC5DAC; Sun, 30 Jul 2006 07:39:57 -0400 (EDT) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XzjdQiTsySkn; Sun, 30 Jul 2006 07:39:56 -0400 (EDT) Received: from [192.168.1.251] (pool-68-161-117-245.ny325.east.verizon.net [68.161.117.245]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 3B6715D79; Sun, 30 Jul 2006 07:39:56 -0400 (EDT) Message-ID: <44CC9A87.4060907@mac.com> Date: Sun, 30 Jul 2006 07:39:51 -0400 From: Chuck Swiger User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Only OpenSource References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: how to panic FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2006 11:39:58 -0000 Only OpenSource wrote: > I am trying to learn kernel debugging and one of the approaches I have > come up with is to introduce situations in the sys code by which the compiled > kernel is buggy and will panic. Most people introducing bugs into the kernel do so by accident, rather than deliberately. Most people trying to debug the kernel use optional printf or kernel-logging statements (see PDEBUG, CF_DEBUG, VLOG, etc) controlled by things like DEBUG, WITNESS, INVARIANTS, etc. > My query is what are the typical bugs that I can introduce in say by > which the kernel would panic. If you want to panic the kernel, just call panic("some reason") directly. -- -Chuck