From owner-freebsd-fs@freebsd.org Sun Nov 8 19:07:04 2020 Return-Path: Delivered-To: freebsd-fs@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 CC29D2D2D9A for ; Sun, 8 Nov 2020 19:07:04 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (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 4CTkBw0tSpz4lhD for ; Sun, 8 Nov 2020 19:07:03 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: by mail-io1-xd2d.google.com with SMTP id s24so7608215ioj.13 for ; Sun, 08 Nov 2020 11:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=S6kcmRbumfJIl3UiN33rDLY3IZ/n0FFouqDf7vYS6Wk=; b=U79RHKsvPJ7r9bBs48PxjY/nxpkk3M76YO+VINpMdwhd3Zgl2XO8TRu90hr9V5902u bFEeLxVyUInuiKJKJA8CRLea0FRIa5VrgqFWmU/KzSAQw3PzUoYjg4MtwuUB3Gqd6cpU 1SMHBN5U+QyZ0fYlVSJhld/nAicgp8U3RAybXfq1ChDaJtwBcY3go6DGi64i+XPU5Rjj 9NRTe1CpL3960jZ9f+vTHFXCHg7QfM1N9xShDP8tv7Oeoos5C19L54QDzqPcU76rlkVA DdJZZys57zRygTZWI8Lfmvjzy6Vuda1ay2KiXOZbEe59IY3TSIUdgufW5XkajPQftbtE K4mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=S6kcmRbumfJIl3UiN33rDLY3IZ/n0FFouqDf7vYS6Wk=; b=gwtKYyc8by6GL5u8JHMkatJ92L2Zbu9LlWgKkrUy7zL8CWquGSYC96g9KysIBzQh+r gARuav7pXgxLpMvPLhL7x9Po0hPq1q6UEc0Pmai2UCkcFcbzUV21OUpl+xmgrIxUusyT yls+pQs4e3ep9yIoLyZbN/IkV0NpIZ+K0+qiPtUyz8Wm770ac7OVjv/HAIAls/kf+vwq yOiFmwp8aveTkA2fyfE5qOp7H+Ah1HGQGdR/8nRTNfD3REKrDXIxKJGETrw2mMgc+r+8 AG7ZKAhHq3lZ78nxzLo6A7xKnuWyOtGRxQ9Yt4uYeCWUPy3ER4+fs/QpycYg84VuCnlJ n6gQ== X-Gm-Message-State: AOAM5305uknGzKfLWMekL14LGamtHXrs5G2CvR2SFalugzkCLqFZkTjj 07y6MglX4Q3LxOU9EtLp/lUjGAtz4y0QezHriUrw/icPkg8= X-Google-Smtp-Source: ABdhPJyvaCSKZf+M1tHqmXx5P75CMEGd9R2kBcVjEt2ht19q30W4ukaerWEMrtHGFjHoYLmki4SnykuPMnn3wSRkPUY= X-Received: by 2002:a02:350a:: with SMTP id k10mr8205740jaa.119.1604862422548; Sun, 08 Nov 2020 11:07:02 -0800 (PST) MIME-Version: 1.0 From: Michael Schuster Date: Sun, 8 Nov 2020 20:06:51 +0100 Message-ID: Subject: FreeBSD current: ZFS root mounted readonly at boot To: freebsd-fs@freebsd.org X-Rspamd-Queue-Id: 4CTkBw0tSpz4lhD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=U79RHKsv; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of michaelsprivate@gmail.com designates 2607:f8b0:4864:20::d2d as permitted sender) smtp.mailfrom=michaelsprivate@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::d2d:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::d2d:from:127.0.2.255]; NEURAL_SPAM_SHORT(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d2d:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-fs] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2020 19:07:04 -0000 Hi all, I have a laptop with 12.2 RELEASE (ghostbsd) where I build CURRENT and install it into a separate boot environment (described in the thread "Recipe for compiling and installing CURRENT on 12.x RELEASE in a seperate boot env?" on questions@). After initial difficulties, all zfs datasets I want mounted actually are mounted at boot time, but "/" is mounted read-only, which causes a few error messages in the log(s) and, I suspect, the failure of X to start at boot (I can log in on a text console and run startx fine). What I don't understand (and to which I haven't found anything helpful nor current despite some effort) is this: $ zfs get all $ROOT | grep readonly $ROOT readonly on temporary (changing this property - either when booted from this BE or from a 12.2 BE - doesn't change this behaviour at next boot). What can I do to change this? This behaviour is not visible in 12.2 TIA Michael -- Michael Schuster http://recursiveramblings.wordpress.com/ recursion, n: see 'recursion' From owner-freebsd-fs@freebsd.org Mon Nov 9 11:28:18 2020 Return-Path: Delivered-To: freebsd-fs@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 5DBC62EF290; Mon, 9 Nov 2020 11:28:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) (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 4CV7z54w5Tz4g52; Mon, 9 Nov 2020 11:28:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from [192.168.0.88] (east.meadow.volia.net [93.72.151.96]) (Authenticated sender: andriy.gapon@uabsd.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id B9DDE100019; Mon, 9 Nov 2020 11:28:14 +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: <5850cf84-4004-3782-45cb-bf4ed6d71b1b@FreeBSD.org> Date: Mon, 9 Nov 2020 13:28:13 +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: 4CV7z54w5Tz4g52 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR]; local_wl_from(0.00)[FreeBSD.org] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2020 11:28:18 -0000 On 07/11/2020 19:00, Mateusz Guzik wrote: > Fixed as of r367454 (also see r367453). Thank you! > On 11/6/20, Mateusz Guzik 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 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 >> > > -- Andriy Gapon