From nobody Mon Jan 10 23:34:02 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E3C22194E441 for ; Mon, 10 Jan 2022 23:34:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JXqsT5v8Cz3CNM for ; Mon, 10 Jan 2022 23:34:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x72f.google.com with SMTP id u23so4806104qku.5 for ; Mon, 10 Jan 2022 15:34:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fHAYkYjS5/H9xIv7wrC5kX1Hq8LojbdYG/+vwQIV6Kk=; b=Td1/KN0po2khspXYRdx6OXxqh2pBhv2LYQZ4iGgH0JesQH8am5pNIXt7Lqee+sW9t9 axshhgYV7cVZ7Q4gTQCSNgKb5GruOb81LBHYKBkMLftb0HcRTae/ZjnbZNyAK0GDiWd+ sxL9mkerWoh45XK8uIlKGDSnEzmZDSWIa1Y8yK34hBfewOLHU9+ElzxaK6mpdrhofhmO WjhIx2RLR3UNcJ/i5Vb1OlrD+XDZcXAEGYMyvv9oDwwYVyvvofJb7cCjkC9otv+yr+lE 6tud63WjRqyhbEKR/nl30tcFoFTjTtDclV9y9a04JbcXe2V7Q8jI1KT8E3v+aV4ZSDuN Rw/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=fHAYkYjS5/H9xIv7wrC5kX1Hq8LojbdYG/+vwQIV6Kk=; b=sPEAKJYuH+gk12tG7mWMj9mfRTzV7l9+WRsvtT1NCYS5AcA8bUpQMWSb8YWZFHXpm0 oj0vqrJm7gqxIC32WtV8IsPv6Xg/B0ffkcR5qZ5JgKbb6kYy/UjTL1DddGM9qziney9Y hRs26yk9e9FhMlFpJ5TCLWVrd6CfI6P/WsrAaW5KzFa4wrPmT+IaLE+E32lBEY8Kh8JP R5/Ok+ZJsPHA6l6nSDK5bv7gAYsHYRALIEAdfZwrmLk0e1hDRh+btKRijnWnbxGAlnzq pZZy4QqJIlXXrAb1g08bYTrzx2iysK2cDXPlcpHYiO41SwcBXvYszY+7NVLhvntQnJD6 lYPw== X-Gm-Message-State: AOAM5317T3IgEfRTR1utz0FNXtOhr735Il0kLxGiy+cYKpWe85jDXMTD UXZhp4G680AeLGgZ2Z4tnKzrVVSm6vE= X-Google-Smtp-Source: ABdhPJyaoNhH4y8ot3FvWW7V0ysoqfTJxQlQWCUMjA0zjLm92VaWyCrt+CdAf65HpEmer4+3cbaimw== X-Received: by 2002:a37:a80e:: with SMTP id r14mr1559868qke.655.1641857645377; Mon, 10 Jan 2022 15:34:05 -0800 (PST) Received: from nuc (198-84-189-58.cpe.teksavvy.com. [198.84.189.58]) by smtp.gmail.com with ESMTPSA id l15sm1871273qtx.20.2022.01.10.15.34.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jan 2022 15:34:04 -0800 (PST) Date: Mon, 10 Jan 2022 18:34:02 -0500 From: Mark Johnston To: Shawn Webb Cc: freebsd-hackers@freebsd.org Subject: Re: Debugging a (potentially?) ZFS-related panic, and discussion about large patchsets Message-ID: References: <20220110221116.gustgfgfge6pb5fe@mutt-hbsd> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220110221116.gustgfgfge6pb5fe@mutt-hbsd> X-Rspamd-Queue-Id: 4JXqsT5v8Cz3CNM X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Mon, Jan 10, 2022 at 05:11:16PM -0500, Shawn Webb wrote: > Hey all, > > So I'm getting an interesting ZFS-related kernel panic. I've uploaded > the core.txt at [0]. I suspect it's related to FreeBSD commit > 681ce946f33e75c590e97c53076e86dff1fe8f4a (zfs: merge > openzfs/zfs@f291fa658 (master) into main). > > I'm able to reproduce it on a single system with some level of > determinism: I'm building the security appliance firmware at ${DAYJOB} > in a bhyve VM that's backed by a zvol. The host is a Dell Precision > 7540 laptop with a single NVMe drive in it. The VM is configured with > a single zvol, booting with UEFI. > > Looking at the commit email sent to dev-commits-src-all@, I see this: > 146 files changed, 4933 insertions(+), 1572 deletions(-) > > Strangely, when I run `git show > 681ce946f33e75c590e97c53076e86dff1fe8f4a`, I only see a small subset > of those changes. That is a merge commit. You need to specify that you want a diff against the first parent (the preceding FreeBSD), so something equivalent to "git diff --stat 681ce946f^ 681ce946f". Use "git log 681ce946f^2" to see the merged OpenZFS commits. > As a downstream consumer of 14-CURRENT, how am I supposed to even > start debugging such a large patchset in any manner that respects my > time? > > It seems to me that breaking up commits into smaller, bite-size chunks > would make life easier for those experiencing bugs, especially ones > that result in kernel panics. That's up to the upstream project, in this case OpenZFS. > ZFS in and of itself is a beast, and I've yet to study any of its > code, so when there's a commit that large, even thinking about > debugging it is a daunting task. > > Needless to say, I'm going to need some hand holding here for > debugging this. Anyone have any idea what's going on? To start, you'll need to look at the stack trace for the thread with tid 100061. > I guess this email is to serve three purposes: > > 1. Report that a bug was introduced recently. > 2. Ask for help in squashing the bug. I'm more than happy to test any > patches. > 3. Start a dialogue on making life just a little easier for > downstreams. > > [0]: https://hardenedbsd.org/~shawn/2022-01-10_zfs_core-r01.txt