From nobody Thu Oct 06 15:57:12 2022 X-Original-To: fs@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 4Mjx0C01WYz4dtYx for ; Thu, 6 Oct 2022 15:57:15 +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 4Mjx0B63gtz3R6P for ; Thu, 6 Oct 2022 15:57:14 +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 4Mjx0B56PFzJB6 for ; Thu, 6 Oct 2022 15:57:14 +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 296FvEXX076398 for ; Thu, 6 Oct 2022 15:57:14 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 296FvENk076397 for fs@FreeBSD.org; Thu, 6 Oct 2022 15:57:14 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: fs@FreeBSD.org Subject: [Bug 266236] ZFS NFS : .zfs/snapshot : Stale file handle Date: Thu, 06 Oct 2022 15:57:12 +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.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665071834; 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=IN+kNYjn5OWn434Ck5UVmqvOx+pSkTXPpuOqWpUkTt8=; b=gKMDZpHXqgRCp+EEvByeyK5JakHOiAN7ZV2Td/z77ZxyP+URfVe4rM5AMQUONBl7nIbqHg 9YQLNel1eZGbN3zmbUMpQtkrBQMKyZyAzEPGnftbOIxuzvUVOus5iKuLotq8yMDf+6MgCS 72+X3Ap4DTK3dITJp33oXe285KyBSvfTI1q5+bupPprzLV5p+/zDbBkuR8bSxKuaVfiNvs CfNXviCEpwj8jK7I0ugc1H4MCH89Hs+J2kpkc7tO16nU4qu+O+aCPuCqYpGoXtGSG/t2k+ sApvTWUuh1GLjZFTQ3BYSoRMvbsBLcu9bC6OpXe6jMAuZGe5IYJ6YhfyOl1qsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665071834; a=rsa-sha256; cv=none; b=viHe0jFuP/k8gnr09heEEP7QUbPsNv3mcHB1r/0fm01DiIzi8cjU7fYoLjMsWNyDdr7qGZ Z/75MQB+CGH41MZhuxGvpto9JeGnpIqwfI1hmi2WqogY25BhLQ9o4fUC280pn2054hHog+ aY+bcBApNihl5BmQ6C1v/MqP5uopyq8LJVpacxEyNoY+wRxsxM32kZ5JRhFMybTGX/R42x GEx1PvEfP/XdWgopYnTszV3GuesRd1j7rNLDm8qaIZ+a3tUN9yarTWf4EFmgyxRdqZrjST iSCelpYzbspIKyRwCtzbzXqZLTwXViujBpsRB8YoWoEbLnCwAt30B7wtQ3nmeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266236 --- Comment #12 from Mark Johnston --- I can reproduce this with a loopback NFSv3 mount of a dataset containing a snapshot. Some dtracing shows the ESTALE comes from nfs_access(), the RPC = is returning the error because it can't translate the file handle to a vnode. = In particular, I can see zfs_fhtovp() is returning EINVAL when dealing with a "long" FID, used for files under .zfs/snapshot. 1 70351 zfs_fhtovp:entry fid_t { u_short fid_len =3D 0x12 <-- LONG_FID_LEN u_short fid_data0 =3D 0x22 char [16] fid_data =3D [ "" ] } 1 70352 zfs_fhtovp:return nfsd 22 kernel`nfsvno_fhtovp+0x3d kernel`nfsrvd_dorpc+0x120 kernel`nfssvc_program+0x68c kernel`svc_run_internal+0xb4f kernel`svc_thread_start+0xb kernel`fork_exit+0x7e kernel`0xffffffff8107803e With DTrace I can see that vfs_hash_get() and VOP_LOOKUP are not getting ca= lled from zfs_fhtovp(), which means the error is probably coming from a recently added check: 1821 if (fidp->fid_len =3D=3D LONG_FID_LEN && (fid_gen > 1 || setge= n !=3D 0)) { 1822 dprintf("snapdir fid: fid_gen (%llu) and setgen (%llu)= \n", 1823 (u_longlong_t)fid_gen, (u_longlong_t)setgen); 1824 return (SET_ERROR(EINVAL)); 1825 } That came in with https://github.com/openzfs/zfs/pull/12905 but let me see first if that really is the source of the error. --=20 You are receiving this mail because: You are the assignee for the bug.=