Date: Tue, 18 Apr 2017 13:31:53 -0600 From: Warner Losh <imp@bsdimp.com> To: "Conrad E. Meyer" <cem@freebsd.org> Cc: Alan Somers <asomers@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r308155 - in head/sys: amd64/conf cam cam/scsi conf dev/mps geom geom/part kern sys vm Message-ID: <CANCZdfrscBmc8kaPwCLRF%2BrFXnE=acU2ojkE5gORPFhE5bJPqg@mail.gmail.com> In-Reply-To: <CAG6CVpVygM=bzx1LfB69%2BtjVwSoL40-b-NZWO1jVJLXcyyaoqQ@mail.gmail.com> References: <201610312309.u9VN9qGk027956@repo.freebsd.org> <CAOtMX2jvzUtBTzqQf7TMvv2TX72LL7SzvtG3uJmVTBY=TqbdSQ@mail.gmail.com> <CAG6CVpVygM=bzx1LfB69%2BtjVwSoL40-b-NZWO1jVJLXcyyaoqQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 18, 2017 at 1:15 PM, Conrad Meyer <cem@freebsd.org> wrote: > Hi Alan, > > On Tue, Apr 18, 2017 at 12:02 PM, Alan Somers <asomers@freebsd.org> wrote: >> This change is causing panics when I try to create a zpool on an SSD. >> >> ... (reordered slightly) >> >> The >> offending line is the biotrack call in scsi_da.c at line 4172; bp is >> apparently null. Could you please review this change and ensure that >> biotrack is appropriately guarded? > > If it is valid for bp to be NULL in that path, then of course a NULL > guard needs to be added. > > I'm a little confused on why or if it is valid for bp to be NULL in > that path. You are the only one who has reported this since October > of last year. Is it possible some other issue is now resulting in a > NULL bp? > >> The SSD is obviously having problems; it fails UNMAP commands with >> ILLEGAL REQUEST, and then fails WRITE SAME with a timeout. > > Well, that could definitely explain a weird error case. Still, > shouldn't the CCB keep the bp associated through CCB completion? The NULL test is needed. We keep a list of TRIM BIOs that we collapse down into one CCB. We'll have already completed it and set bp to NULL in that case, so we need to test at the end of the loop to see if bp is NULL or not. We only have to collapse TRIMs occasionally, which may explain the rarity of the crash. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrscBmc8kaPwCLRF%2BrFXnE=acU2ojkE5gORPFhE5bJPqg>