From owner-freebsd-current@freebsd.org Fri Nov 6 21:04:19 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D04E82D2790; Fri, 6 Nov 2020 21:04:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSXv73jG9z4m25; Fri, 6 Nov 2020 21:04:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) X-Originating-IP: 93.72.151.96 Received: from [192.168.0.88] (east.meadow.volia.net [93.72.151.96]) (Authenticated sender: andriy.gapon@uabsd.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 9314820004; Fri, 6 Nov 2020 21:04:10 +0000 (UTC) Subject: Re: panic: VERIFY(ZFS_TEARDOWN_READ_HELD(zfsvfs)) failed To: Mateusz Guzik Cc: freebsd-current@freebsd.org, freebsd-fs@freebsd.org References: <98c87b4f-4327-8a19-cf51-f3a14e42edf4@FreeBSD.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; keydata= mDMEX1iFDhYJKwYBBAHaRw8BAQdAiu8JG/oLFkVkOAJqJc7Dx5KI/Q6C3SBI20EQm+DXnAu0 HkFuZHJpeSBHYXBvbiA8YXZnQEZyZWVCU0Qub3JnPoiWBBMWCAA+FiEEyCHHZM09l0OE3Ir/ 1A1+Gq8+L1EFAl9YhQ4CGwMFCQeEzgAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ1A1+ Gq8+L1Fc0wD/ZjmhHfbCJywZU3aOxXIPjcz73FYEGMvqMCCLAWyLbSABALFL+1ZNrjV3BGjq 889cOYFuboA/Yn3eWezS+tfqYBsGuDgEX1iFDhIKKwYBBAGXVQEFAQEHQL6B20Xi600TrkpG P9fWjl7JtHNxqrHKhX6Kg7kgb4ILAwEIB4h+BBgWCAAmFiEEyCHHZM09l0OE3Ir/1A1+Gq8+ L1EFAl9YhQ4CGwwFCQeEzgAACgkQ1A1+Gq8+L1F3cgEAktp4h+IJUJxL1vn6zMOt//znni/J TanKfQuA8wGXcGkBAKpZJhqMkg+pKk7MGvJhgJ6nCpTZ+rMK6vZVZLUWc3QF Message-ID: Date: Fri, 6 Nov 2020 23:04:09 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CSXv73jG9z4m25 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 21:04:19 -0000 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. > On 11/6/20, Andriy Gapon wrote: >> >> The subject panic happens for me with r367410 when mounting root >> filesystem. >> The panic is in zfs_freebsd_cached_lookup -> zfs_lookup -> zfs_dirlook. >> I have a picture of the screen with a little bit more details, I'll share it >> later. -- Andriy Gapon