Date: Fri, 6 Nov 2020 22:15:18 +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: <CAGudoHHEJj0x1tecy%2Bd-HgkVgc3rRb5%2BhgRT_jW%2Bx2PEnu7o-w@mail.gmail.com> In-Reply-To: <bbeabc54-7b1d-e617-65be-9fc842b53824@FreeBSD.org> References: <98c87b4f-4327-8a19-cf51-f3a14e42edf4@FreeBSD.org> <CAGudoHHmBW64HsKq8h8y4_8e9WMqpFgzx2XikpcRCz9=EmRwEQ@mail.gmail.com> <bbeabc54-7b1d-e617-65be-9fc842b53824@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHHEJj0x1tecy%2Bd-HgkVgc3rRb5%2BhgRT_jW%2Bx2PEnu7o-w>