From owner-freebsd-current@freebsd.org Fri Nov 6 21:26:47 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 821E42D30FB; Fri, 6 Nov 2020 21:26:47 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSYP247Hgz4nXS; Fri, 6 Nov 2020 21:26:46 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x430.google.com with SMTP id x7so2747234wrl.3; Fri, 06 Nov 2020 13:26:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SXO5sVpMebydMxcvSj2qNpD4EtR7fn/dwJROhxp4IZw=; b=NL6jgJdh5AWm1f4r3gohU2uwlO8NKE5U9Q3RHhCt15zDwMXWgyLhf3/HdXS3JJqtaS k4X7pW8VFuvvIFSiGpYoGXeN8pvA+NBjM740HH0YQ4nVVo8bDJnY5DxZJMsWoP5kSQ8b WuApBeOJCna09pf8Uthe9cwhdnF8pPPGYakAE8AzjK6qLKzI9RfxVcLg9Bu7ZQUhIbUT 6rIkb0H4kTiY+tzrBhjP4LrJleHWbwmvsx77ezAK+3fJpAXjS57yHM0teeBRjuN7XMCI YkZa5nTOb4aNWH3ujsI1jix/zXSTki5QbCH8FX197Nr3x1TyLi+si7mdE9nkX/gM2i6G +OVw== X-Gm-Message-State: AOAM532E+X65azh9RZBK5sCTMjCdyzL/EKOvJM/9gbtIRzmjDbzTrCVF 8Ju5Q1CbP0ePpghRs+g40skXsiPbG6qRbaJiyP0eeONa X-Google-Smtp-Source: ABdhPJwQEGcImimWerFwQI2aJDUb3STmNx3GwubqUVgSXYXwmoD5UxdbJCom2J+SO9+Tw1TOXqNhB8Dnb9jdzScfGb8= X-Received: by 2002:a5d:4cd1:: with SMTP id c17mr4739489wrt.109.1604698004757; Fri, 06 Nov 2020 13:26:44 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a5d:4c4f:0:0:0:0:0 with HTTP; Fri, 6 Nov 2020 13:26:44 -0800 (PST) In-Reply-To: References: <98c87b4f-4327-8a19-cf51-f3a14e42edf4@FreeBSD.org> From: Mateusz Guzik Date: Fri, 6 Nov 2020 22:26:44 +0100 Message-ID: Subject: Re: panic: VERIFY(ZFS_TEARDOWN_READ_HELD(zfsvfs)) failed To: Andriy Gapon Cc: freebsd-current@freebsd.org, freebsd-fs@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CSYP247Hgz4nXS X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::430:from]; TO_DN_SOME(0.00)[]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::430:from:127.0.2.255]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::430:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-current,freebsd-fs]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] 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:26:47 -0000 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 wrote: > On 11/6/20, Andriy Gapon 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 > -- Mateusz Guzik