From owner-freebsd-scsi@FreeBSD.ORG Wed Feb 28 21:42:25 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39FC416A402 for ; Wed, 28 Feb 2007 21:42:25 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id E793913C4A7 for ; Wed, 28 Feb 2007 21:42:24 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id l1SLgIwH052309; Wed, 28 Feb 2007 14:42:23 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <45E5F730.5070900@samsco.org> Date: Wed, 28 Feb 2007 14:42:08 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Thomas Quinot References: <20070225193802.GA32605@melamine.cuivre.fr.eu.org> In-Reply-To: <20070225193802.GA32605@melamine.cuivre.fr.eu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Wed, 28 Feb 2007 14:42:23 -0700 (MST) X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org Subject: Re: xpt_done() and Giant? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2007 21:42:25 -0000 Thomas Quinot wrote: > I'm currently trying to debug ATAPI/CAM issues with a particular ATA > controller (kern/103602). Over the course of investigating this PR, > the user reported the following crash when enabling CAMDEBUG: > > Tracing pid 16 tid 100014 td 0xc5106bd0 > > kdb_enter(c0a48ff7,0,c0a482f1,e3cbaba8,c5106bd0,...) at kdb_enter+0x30 > panic(c0a482f1,c0a60666,c0a004cc,1033,c560c430,...) at panic+0x13b > _mtx_assert(c0b4caa8,1,c0a004cc,1033,c5610000,...) at _mtx_assert+0x86 > xpt_path_comp(c5410660,c560c430,c5462c40,c55e3e60,c5610000,...) at xpt_path_comp+0x32 > xpt_done(c5610000,c546ae3c,c55e2b64,e3cbac3c,c55e2398,...) at xpt_done+0x30 > free_hcb_and_ccb_done(c546ae3c,0,c55e2b64,2d2,1,...) at free_hcb_and_ccb_done+0x3c > atapi_cb(c5486480,52,c0a4cb11,e3cbac74,c0748b94,...) at atapi_cb+0x78 > ata_completed(c5486480,1,c0a4cb11,52,c5173b1c,...) at > ata_completed+0x5c2 > > It looks to me like we're calling xpt_done() without holding Giant, > which should work AFAICT, except that when enabling CAMDEBUG, xpt_done > calls xpt_path_comp, which still has a GIANT_REQUIRED assertion, hence > the failure above. > > So, should we maybe grab Giant in CAM_DEBUG? > > Thomas. > I overlooked this, sorry. Can you survive with it as it is for now? Scott