From nobody Sun Jul 13 13:46:57 2025 X-Original-To: dev-commits-src-main@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 4bg6FQ6VkRz610SG; Sun, 13 Jul 2025 13:47:06 +0000 (UTC) (envelope-from olce@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bg6FQ3vBQz3kHg; Sun, 13 Jul 2025 13:47:06 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752414426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VEKagoPUawdf52LP6cnqf+sfAWhNeZLYjtGK/f7CTyQ=; b=SMNdjMvEa7DSAinw09M0ApnT/A8WsBAHMvrdNOSe+5zriyjmz0Cz5tDfNGs21tV+fCYmqD 6G0pL7HdEcXgSk/MP6XbgssvbculXWayhlb62JEtwtlvamDIHKTb7qo/NrOeI8uKluwzwe jeZjxE3q3YP0KPSAPIfUU1KpTdonWIhDaOz832B6LinWtMfm05N9LtepYIh6giZSMtg2pV glesahPl2iNaq8hvZ9PQGp1j4Ak2bA7UG8O/jLfn0ZsAiEBSN0ERnawYmU0EhP4YH+8Rva TV4rXLvzQ7bMVs57jcU2vISHwoQjls5iGAujkQ64l2m3o0/+C2nUoFFeZtA8/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752414426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VEKagoPUawdf52LP6cnqf+sfAWhNeZLYjtGK/f7CTyQ=; b=J4Nede/FoM8wV4qGg8fc3IHUOOg1E/xd7x5IYNW1zr4LWQPjF1kcoRLNt+vC6aQ5AHHIm7 GycSI8Y4GehX1GiT6rsfZOBl/ma+DIVexnJSMrNTwp5h8AiqZjQppZmKeQxAaq4Rd1YvdO p3POBnyuCdlHROViI68ib1xJY8KuCmsIQte6gJoGx+WfJ34DBVsGTirTC7cLfy24sb7RBM 7gkjUex7HoYmtfa85qzpzhYBD3+Czxn44NKc6bCZzuy1cZ/QuOg7CObS2KdE/NINXdHLsa /H3Y+oGzJ1+sICSAfmlIyAARz247Z2saYUiCWZ43SNL7GX2MsXZy27k8o8clew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1752414426; a=rsa-sha256; cv=none; b=qnRdOLpRNqBCOQxwQIKXumPqh9BNFcDHhqcuu0rONRoOzCm7GGvGBIR97ekuzw8mcN6330 gzuarqoKjMs0KoCrh67X6X9BN2DP+J7TuuhbqLwFgiwkDEbGG2GX2HPE4OwJb0L2u6C0PE W5fREYYZlQoFENh2FO60cGKM6aOWeTsfR4UbWwEJczc52j9DbUsBSMmsEz89hGw0pWZqsK PAdA2Qk1ZF7iLOog1NivkWXKy1uJwhdAuQ2Xtyfi0QelOo9BhI7Gs/SK42tbxFq0eh8psB LpzX/zrvz600bxxOT3VbEaDdM6/vaD3s0RxGiSGEmbWwcUoyeRape4EZI/LNQw== Received: from francois.localnet (h175-177-044-048.catv02.itscom.jp [175.177.44.48]) (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) (Authenticated sender: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bg6FN6jhrz8Wb; Sun, 13 Jul 2025 13:47:04 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Charlie Li Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f1f230439fa4 - main - vfs: Initial revision of inotify Date: Sun, 13 Jul 2025 22:46:57 +0900 Message-ID: <2937929.UcPf6a0QyJ@francois> Organization: FreeBSD In-Reply-To: References: <202507041455.564EtqwS073424@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5090732.Cjmsv3J8Qz"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart5090732.Cjmsv3J8Qz Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Olivier Certner To: Charlie Li Date: Sun, 13 Jul 2025 22:46:57 +0900 Message-ID: <2937929.UcPf6a0QyJ@francois> Organization: FreeBSD In-Reply-To: MIME-Version: 1.0 Hi Charlie, The panic you're seeing is caused by 'MPASS(*eofflag != 0);' in vn_dir_next_dirent(). This test is here to check that VOP_READDIR() works properly. In particular, if VOP_READDIR() returned 0 (no error), and the length it filled is 0 (nothing was added), then we must be at EOF, and VOP_READDIR() must have set '*eofflag' to something non-zero. UFS has been verified to abide by this rule (unless the directory being read is malformed). Which filesystem are you using? Shot in the dark & educated guess: You're using ZFS, and you've just stumbled on the following case (lines from 'zfs_vnops_os.c'): /* * Quit if directory has been removed (posix) */ if ((*eofp = zp->z_unlinked) != 0) { zfs_exit(zfsvfs, FTAG); return (0); } which is a corner case that apparently has been missed. Just add some 'if (eofflag != NULL) *eofflag = 1;' inside the "then" block there and retry. It looks like all other cases in this function are handled correctly (but I have not thoroughly verified). I'll be mostly AFK for the next 10 days, so probably won't be able to follow-up, but hope that will help. Thanks and regards. -- Olivier Certner --nextPart5090732.Cjmsv3J8Qz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmhzuNEACgkQjKEwQJce Jicmvw/9ESjkkrFQMefCpoBllHcvrouHPUVDbqBtUvTnCfxoB7vfJyR7EC2iyAKR EbUAZaEGRl7EH37/4859qIFh9NIkTJ6if/KV4rvHkbi7V0h0EHA1oEWA7mjNzAyt aaXodxKb8/t2+hL7zJg+9wi6ELmmJbNZPROgGN5XOCiGhO7Inb/gCruLniJ0pqZq 9/HfXp/u66pk1We3s2J/9fSjGBDn15+OWk667862HoShU18rqNaE3dAg9GMZ/2Ab Gap/EsPN2mA6Xv/sdB3TosNtXrWCS9dk2W7LHxTPLSOlEucGp06ICNDoQ3Gj/V1i ha6PvPEmlxaXBvmH2W9KYOVlF3M90WaallX01oLO5PwRK/bURnmYxoZzNQQeFME6 AbqRXVZlRD7fBw0CyFRMUPWFva4O3pxuTwVjjnrT3y6cxGQ/Bg451kD2d92W0L1t 8wTLKAYRP0RsD+THTpjVtfe00TzIgjYFXnMUuAvU8iihlDaACbIRMaObtVq5LJKj tGCdQ7+qqrUeCIKMCrx+eeRPxmMeZ0bLIaR+SIzQ3TahBdgbEgkJs62vStymXVtz ZlyaZ5CzbzXfqhqEzeSKZ2vALeC02ct4kDw47pFWrPXvKpdFM1Pf5Y4Fq3fDPVEd kU4h1ShThWU4gwrC6VNzbQEj+xY23/vxcSHnHvHYfofaOI7y57g= =g38I -----END PGP SIGNATURE----- --nextPart5090732.Cjmsv3J8Qz--