From nobody Sun Jan 02 20:41:56 2022 X-Original-To: bugs@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 D669C1935CA2 for ; Sun, 2 Jan 2022 20:41:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JRrQX2pDrz4spd for ; Sun, 2 Jan 2022 20:41:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 404CF187B7 for ; Sun, 2 Jan 2022 20:41:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 202KfuIh026603 for ; Sun, 2 Jan 2022 20:41:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 202Kfuji026602 for bugs@FreeBSD.org; Sun, 2 Jan 2022 20:41:56 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260884] [zfs] Panic in zfs_onexit_destroy Date: Sun, 02 Jan 2022 20:41:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: grembo@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641156116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fU3Uc2KXim0yV6alaMpTjI3450p4C1nx3KkHohEPEP8=; b=rIDzz2AwTm98tz7PAm00Wad8ZOAUwS8unAr7txtBZqfRrArQWQ3pxO8dMilSPPhMkYf9sB fYU4wEA8HLUBmDebN1ZAXS8i+9dcw2YnFJ4ATqEHIadCy1hUsKwTg8zKv30CSawxhLFigC BlkHvacxQT0KnP7/jK01m9I+pPVQQZJMjwDZ9g6j65D+8Td0iumQ6jyGk9vjOw8dPJLx6z ZzTQri1OA3n4FDx78Z/NOz90HDwB3eMaDS15IsF5BgUpuDA5yxwh/LolsxE5VOQiFbWrTv C5f1wRnQ49BW1Xyuwi9oT5zhnp/akpkgG3zWkYJthp+kqb+ybjgz6iHZaELTDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641156116; a=rsa-sha256; cv=none; b=yiVvJIzvkb/uhEJuggTO1I63QM9QFuakZpGyeJa6ycv+Yrk99yCs67NHWXcsMO4vVBk5tS cg/9aqX44gY3QfWWaGSqVGruphRkpTIV1z4Oc5F0x+xNHGA5qasEGLxPR1FMp+d3ff8oH2 zHqvh1zCpQiqIjJo/xQ2L2WRdgnk9NsISf7JFIvCq5oRrRY0nNzqX4G7IjRNTl7OkQHWOh 1zC2TjdzY93/UbNUZhJWOr0mf2lSA4FuCaQXFxuZBUIAMlN6s7AbsdJjMi1/YrgXHnsLGK 16NPK6nvftYenFUi5dbZ/Uvp+Uu0K8JbH7tWjIUy6BxZ6gLMZj4oLbkTfG2+Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260884 Michael Gmelin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |allanjude@FreeBSD.org, | |freqlabs@FreeBSD.org --- Comment #1 from Michael Gmelin --- I found a way to reproduce the panic within seconds: ``` $ cat >crashme.c< #include #include int main(int argc, char** argv) { fork(); fork(); fork(); fork(); for (int i=3D0; i<1000000; ++i) { libzfs_core_init(); lzc_exists(argc >=3D 2 ? argv[1] : "zroot"); libzfs_core_fini(); } } EOF $ cc \ -I/usr/src/sys/contrib/openzfs/include \ -I/usr/src/sys/contrib/openzfs/lib/libspl/include \ -lzfs_core -lzfs -o crashme crashme.c $ ./crashme zroot ``` This doesn't require root privileges. Applying the patch mentioned above fixes the problem: ``` # cd /usr/src/sys/contrib/openzfs # fetch -o - \ https://github.com/openzfs/zfs/commit/f845b2dd1c60.diff | patch -p1 # cd /usr/src # make -j8 kernel # reboot ... $ ./crashme zroot && echo "I'm ok" I'm ok $=20 ``` Given that this can be triggered by two unfortunately timed `zfs list` calls and that it actually happens in practice (like in my example, where I would= see my hosts crash every few hours/days), I would like us to import this fix to release/13.0 and create an errata notice. --=20 You are receiving this mail because: You are the assignee for the bug.=