From owner-freebsd-scsi@FreeBSD.ORG Fri Aug 23 19:12:14 2013 Return-Path: Delivered-To: FreeBSD-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0C4DAC4C; Fri, 23 Aug 2013 19:12:14 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qc0-x236.google.com (mail-qc0-x236.google.com [IPv6:2607:f8b0:400d:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B04012D1D; Fri, 23 Aug 2013 19:12:13 +0000 (UTC) Received: by mail-qc0-f182.google.com with SMTP id c11so542124qcv.41 for ; Fri, 23 Aug 2013 12:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=5GzU2VOZIqKRnuHaSJofPGKfSmyoftmITuChKSgMztc=; b=N85QvgRSL+ZkX9zHx+BlyErOKDNj9dIRdBOCftptGTh49RQareRpKlZXuE2bnZjRJd LYve93Tia2v/dGBapDsobP80iN0KTV69YLunfOl9bRzqrVAI1NLCq5afg8g2FkuLqvh9 8FeMD4rQsJ4dnfQiMMEDNZpOBn2ZMsYspQWZLQaPpyazOZNI8GlnaO+6uE46sdaIeKzF fXSAcl/nLvKjV2yWv30ewmLsxrpJS6GSUXJUpklrt5HukdeKVwm4pNaHxHAasI/IOLnc QoJEvpAq/VKAjtYUT414J9Ml9OXR9BWnRpe0V/J9AAgG9TbPmN++wIbXRh62KyuVisfq apOg== X-Received: by 10.49.82.43 with SMTP id f11mr1586969qey.26.1377285132832; Fri, 23 Aug 2013 12:12:12 -0700 (PDT) Received: from charmander.sandvine.com ([64.7.137.182]) by mx.google.com with ESMTPSA id m10sm2874163qae.12.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 12:12:12 -0700 (PDT) Sender: Mark Johnston Date: Fri, 23 Aug 2013 15:13:03 -0400 From: Mark Johnston To: sbruno@freebsd.org Subject: Re: Interesting, yet stupid test case Message-ID: <20130823191303.GB8658@charmander.sandvine.com> References: <1376934295.1455.4.camel@localhost> <20130819185426.GA4765@charmander.sandvine.com> <1377277183.1469.6.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1377277183.1469.6.camel@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "FreeBSD-scsi@freebsd.org" X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 19:12:14 -0000 On Fri, Aug 23, 2013 at 09:59:43AM -0700, Sean Bruno wrote: > On Mon, 2013-08-19 at 14:54 -0400, Mark Johnston wrote: > > On Mon, Aug 19, 2013 at 10:44:54AM -0700, Sean Bruno wrote: > > > Was able to get mfi to detonate (via CAM) today on stable/9 > > > > > > At the loader prompt, physically remove some amount of drives (in my > > > case drives 0-5, as 6-11 are my zroot). Boot up into single user via > > > boot -s > > > > > > System will attempt to process all the events in the controller on boot > > > up and die violently. :-) > > > > Yuck. :( > > > > I think we're not supposed to drop the SIM lock before calling > > xpt_rescan(); the other drivers I've looked at don't do this at least. > > We're also unnecessarily dropping the mfi lock around the call to > > xpt_alloc_ccb_nowait(). > > > > I think the following (untested) patch should help. I can try testing it > > myself later if I can get a hold of some equipment at work (might take a > > few days). > > > > Thanks, > > -Mark > > > Yup, this fixes the panic on startup on a Dell H310 if I pull 3 disks > out at the loader prompt and then continue to boot. Thanks! I've tested it on FreeBSD 8 with a 9261-8i controller, works for me too. I'll commit it soon. -Mark