Date: Sat, 7 Nov 2020 18:00:24 +0100 From: Mateusz Guzik <mjguzik@gmail.com> To: Andriy Gapon <avg@freebsd.org> Cc: freebsd-current@freebsd.org, freebsd-fs@freebsd.org Subject: Re: panic: VERIFY(ZFS_TEARDOWN_READ_HELD(zfsvfs)) failed Message-ID: <CAGudoHEj9jXA-q4x0sxRoTZBaog1gfs9YCTAjSezWkS3q3DfKw@mail.gmail.com> In-Reply-To: <CAGudoHHsghUQODipQ7dO3i-jNn1%2BYQza0XTqLBEd4N9nxneLDA@mail.gmail.com> References: <98c87b4f-4327-8a19-cf51-f3a14e42edf4@FreeBSD.org> <CAGudoHHmBW64HsKq8h8y4_8e9WMqpFgzx2XikpcRCz9=EmRwEQ@mail.gmail.com> <bbeabc54-7b1d-e617-65be-9fc842b53824@FreeBSD.org> <CAGudoHHEJj0x1tecy%2Bd-HgkVgc3rRb5%2BhgRT_jW%2Bx2PEnu7o-w@mail.gmail.com> <CAGudoHHsghUQODipQ7dO3i-jNn1%2BYQza0XTqLBEd4N9nxneLDA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Fixed as of r367454 (also see r367453). On 11/6/20, Mateusz Guzik <mjguzik@gmail.com> wrote: > I think I have an idea how to keep this. In the meantime you can just > comment it out. > > On 11/6/20, Mateusz Guzik <mjguzik@gmail.com> wrote: >> On 11/6/20, Andriy Gapon <avg@freebsd.org> wrote: >>> On 06/11/2020 22:58, Mateusz Guzik wrote: >>>> Note the underlying primitive was recently replaced. >>>> >>>> One immediate thing to check would be exact state of the lock. >>>> READ_HELD checks for reading only, fails if you have this >>>> write-locked, which is a plausible explanation if you are coming in >>>> from less likely codepath. >>>> >>>> iow what's the backtrace and can you print both rms->readers and >>>> rms->owner (+ curthread) >>> >>> Unfortunately, I do not have a vmcore, only a picture of the screen. >>> >>> ZFS code looks correct, the lock should be held in read mode, so indeed >>> I >>> suspect that the problem is with rms. >>> >>> It looks like rms_rlock() does not change rmslock::readers, but >>> rms_rowned() >>> checks it? >>> >>> That's just from a first, super-quick look at the code. >>> >> >> Heh, now that you mention it, I remember wanting to just remove the >> arguably spurious assert. Linux is never doing it for reading. The >> only state asserts made are for writing which works fine. >> >> As for reading assertions, there is no performant way to make it work >> and I don't think it is worth it as it is. >> >> As such, I vote for just removing these 2 asserts. They really don't >> buy anything to begin with. >> >> -- >> Mateusz Guzik <mjguzik gmail.com> >> > > > -- > Mateusz Guzik <mjguzik gmail.com> > -- Mateusz Guzik <mjguzik gmail.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHEj9jXA-q4x0sxRoTZBaog1gfs9YCTAjSezWkS3q3DfKw>