Date: Mon, 13 Oct 2025 09:32:45 +0100 From: Lexi Winter <ivy@freebsd.org> To: fs@freebsd.org, current@freebsd.org Subject: openat("./...", O_CREAT) fails even though the directory exists Message-ID: <aOy5LUUu5DCwY_XZ@amaryllis.le-fay.org>
next in thread | raw e-mail | index | archive | help
--8nP7eUhsxcXOAism Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hello, i'm trying to debug an issue with sendmail in main where smmsp stops working after upgrading the FreeBSD-sendmail package. i've narrowed this down to the following sequence of system calls: 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? 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. the full truss output is available here: https://people.freebsd.org/~ivy/tmp/smmsp.trace.txt does anyone have an idea what's going on here? --8nP7eUhsxcXOAism Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaOy5KgAKCRD1nT63mIK/ YPjBAQDZAHcY1mP/O1IdZHI62N3p/Mmsn5W3eQTroOt8NLC+HAEA3XcYfdiylOcv pavt2EylQQ64X9H2+urHN47/tLbwPQs= =mynk -----END PGP SIGNATURE----- --8nP7eUhsxcXOAism--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aOy5LUUu5DCwY_XZ>