From owner-freebsd-stable@FreeBSD.ORG Mon Aug 25 12:42:45 2003 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 C028516A4BF for ; Mon, 25 Aug 2003 12:42:45 -0700 (PDT) Received: from research.rutgers.edu (research.rutgers.edu [128.6.25.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id C71A843FAF for ; Mon, 25 Aug 2003 12:42:44 -0700 (PDT) (envelope-from bohra@cs.rutgers.edu) Received: from cs.rutgers.edu (sirtaki.rutgers.edu [128.6.171.146]) by research.rutgers.edu (8.11.7+Sun/8.8.8) with ESMTP id h7PJgh623087 for ; Mon, 25 Aug 2003 15:42:44 -0400 (EDT) Message-ID: <3F4A746A.5000104@cs.rutgers.edu> Date: Mon, 25 Aug 2003 15:41:14 -0500 From: Aniruddha Bohra User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030728 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: scsi-da does not work with invariants 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: Mon, 25 Aug 2003 19:42:45 -0000 Hello I tried compiling the 4-STABLE branch with INVARIANTS and INVARIANT_SUPPORT. I got a panic on boot - The problem is that daregister calls malloc with M_WAITOK in interrupt context and INVARIANTS panics the kernel. $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.42.2.40 2003/08/24 03:26:38 ken Exp $ The problem is in the following lines : softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2, CTLFLAG_RD, 0, tmpstr); SYSCTL_ADD_NODE is a macro defined in sys/sysctl.h as : #define SYSCTL_ADD_NODE(ctx, parent,nbr,name,access,handler, descr)\ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_NODE|access,\ 0, 0, handler, "N", descr); And sysctl_add_oid is defined in kern/kern_sysctl.c and has the following : oidp = malloc(sizeof(struct sysctl_oid), M_SYSCTLOID, M_WAITOK); which has a WAITOK malloc. Unfortunately, I cannot get a trace till tomorrow. Right now the machine runs fine without INVARIANTS and INVARIANT_SUPPORT. Thanks Aniruddha