Date: Wed, 28 Feb 2007 14:42:08 -0700 From: Scott Long <scottl@samsco.org> To: Thomas Quinot <thomas@freebsd.org> Cc: freebsd-scsi@freebsd.org Subject: Re: xpt_done() and Giant? Message-ID: <45E5F730.5070900@samsco.org> In-Reply-To: <20070225193802.GA32605@melamine.cuivre.fr.eu.org> References: <20070225193802.GA32605@melamine.cuivre.fr.eu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45E5F730.5070900>