From nobody Mon Oct 13 09:19:54 2025 X-Original-To: current@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 4clWyt4jfNz6CF96; Mon, 13 Oct 2025 09:20: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4clWyt4Dqrz3lHh; Mon, 13 Oct 2025 09:20:06 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760347206; 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=0oHmQ/8uzLNrQmshoBX5UYEJCd4EvuauVVwKEYRFRvE=; b=sI4h+QxREn7BDWAUr2/rC2NFWh+zw3o9i1Kf46yF+SwoKr+m0dQyPBcIQX40+e/yEBzEzq Y6NVqtBGsmhJuOosJRMFwxKvIPiPpdqCTAjEeItHBYKSoFO6t4VGHNjP+grNOLqzB3BIzY PakQKkDtn728VuQbTjTwMf8fRVrOUrlTVg3iS/2K4LVf+eyb7E59zW1vUK+R3AMrpDo1H0 cdAfd8EA0reS6YqHt86HL2WNX1vBtNnhtlwjSCpPTRb1fuRrwhyZiAby0C+IxCLPOwETUH DT2Za6pJqPnuGFjbCqZBvWh5AE4FvlY2P4CljthXEVc+XjIF7hH3guuZaWzBgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760347206; 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=0oHmQ/8uzLNrQmshoBX5UYEJCd4EvuauVVwKEYRFRvE=; b=b4mrYh7q/WNC4evAM7dyjUzZCvYjMI94ftftRenn0ehg9XOkfWSftTEBr0Qp2EAC+OveND Utj9jSEfPRxM11mMGryU9CMQGoqzwUyir250X0yVcSGRjOEsK1fVuJ87ObQEalS2rjyxXc ODyXOUT1fJvjvuiyPOw40eN50G5dyS4CmIkZEU31FF4YrfEISl0+0hrRBDb59sWsoKYfUB njQMbuMFFJi5wOmSHggk2QHct0YPAklX68KcJKbFZcBufPka6OF/ovjEDlE5ZVJXU013Lj oiReGEnIpbNFpaF3H5uQsg3evQFbM0t+y7bOtL1Uwo326EzGVA1u7QQjpJnY5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760347206; a=rsa-sha256; cv=none; b=nvAlnPpfXdd9HwRbhYQO4pWdJq0CFxchiWxMhP/T9P6+Eafb9dBG9mK74SovHDSbmpA1a0 86sZ95218IhEWcWzISF40XgGm+J0+u3Q6xuCHd5h8pnYXSDnTdnMuXoR6tN9lBlZS8y5ru 2QGt2HRaqz6UPubCXZA8ptTWhJpoHSijz2vNOfWcqRzFlIfoGgCsbN1P5Ui8HBQyUcmMeA euNB4epPqDprWOldli4j7GJEM8rj7JAJAyXM6bm8OtRzBDAT0uSOxxbGSiMUkpPrdACARR 1fHmiMQ/z4zfIlEOPkvKEi/hG5KVwzdKALeEgtKaffXed9gmB2Zo8ZEZyCT7RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (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 4clWyt0qBMzY1; Mon, 13 Oct 2025 09:20:05 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Lexi Winter Cc: fs@freebsd.org, current@freebsd.org Subject: Re: openat("./...", O_CREAT) fails even though the directory exists Date: Mon, 13 Oct 2025 11:19:54 +0200 Message-ID: <2507674.THHZn3L5Ee@ravel> In-Reply-To: References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4139707.kAAoriTUSa"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart4139707.kAAoriTUSa Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Olivier Certner To: Lexi Winter Cc: fs@freebsd.org, current@freebsd.org Date: Mon, 13 Oct 2025 11:19:54 +0200 Message-ID: <2507674.THHZn3L5Ee@ravel> In-Reply-To: References: MIME-Version: 1.0 Hi, > 44288: fstatat(AT_FDCWD,"./df59D8I2px044288",0xecbda905210,0x0) ERR#2 'No such file or directory' > 44288: fstatat(AT_FDCWD,".",{ mode=drwxr-xr-x ,inode=129826,size=2,blksize=131072 },AT_SYMLINK_NOFOLLOW) = 0 (0x0) > 44288: geteuid() = 0 (0x0) > 44288: fstatat(AT_FDCWD,".",{ mode=drwxr-xr-x ,inode=129826,size=2,blksize=131072 },0x0) = 0 (0x0) > 44288: openat(AT_FDCWD,"./df59D8I2px044288",O_RDWR|O_CREAT|O_EXCL,0600) ERR#2 'No such file or directory' > > this doesn't make sense to me: since "." exists, how can openat() return > ENOENT here? How do you come to this conclusion? In what you pasted above, and in the full traces, the openat(AT_FDCWD) fails on the same file ("./df59D8I2px044288") on which the fstatat(AT_FDCWD) just above already failed with ENOENT. So the most plausible explanation is that that file just does not exist at this point. > the process cwd is /var/spool/clientmqueue, and i've checked that the > inode number for this directory doesn't change across upgrade, so we > aren't deleting and recreating it. Unrelated, but that the inode number didn't change in general is not a guarantee that the directory wasn't removed and recreated, that is up to the file system. IIRC, on UFS, the recreated directory could as well get allocated the same inode number. Regards. -- Olivier Certner --nextPart4139707.kAAoriTUSa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmjsxDsACgkQjKEwQJce JicB2g/+O0t55zTnIEFesmimRGVQf+iUa8ZeH601m3me8yznZGPPb9K2FsxeqdE4 P/N1eKunPTQUHp9d8NvyGj0L2JA6mUB84D7JoL/ZGe6PVeh7iplnaEVgbseEk690 xG56C19jU7/TiEwv+cuPdpIpU4QXvUogiFSgOULZBXeTmJmmnTCvF/Fy1GdEeH11 ksDb6rPKa2/8glLVMM9DSF5VK0UFFMzBYEkRX7A+ewbWGX/RM52b2goUkKkyxWIL sqdrtU4Dr/zXjMRHTCnp1xc0ILPqKrjr7hnHVQZz/A1Fm/hr0CTmlz/BmpzfDjec nQHrTa7tOQ+3A8+Q0DEXTNghOlMXq6YupepgE0+BBsem0Ve6kbfWaghTXJW3eKdS KJ6fM1vSjrzeuIsGMdBzrvfQOHfJp2r0Ah1egNH5MtdN2qAmiL14UqpwMj6Vb9jW diDCGLRq2TidPG0HYRQwbcmcvgKs93N/d5xkEf4VB6duc/Gcw20Vac8015M0d92b iDLIG8PmEJnMe3TqkREjGpet3icLuxNoReibsS2GPC05UX5og72PtEaduEetF5qX 2HLg43MhYzlXKYGNpmhcd0mXG9rxctyGLsS7MdUwGrp3QkjVZRy3YCHxNhiCNZwA j5Q0U1l51AzHg56irrmgC3ye1oXqNer3nd1/qQGD1CGHlFjxgbU= =9SOv -----END PGP SIGNATURE----- --nextPart4139707.kAAoriTUSa--