Date: Thu, 23 Oct 2025 16:22:00 +0100
From: Lexi Winter <ivy@freebsd.org>
To: fs@freebsd.org, current@freebsd.org
Subject: Re: openat("./...", O_CREAT) fails even though the directory exists
Message-ID: <aPpIGE2oZ_UxlPxQ@amaryllis.le-fay.org>
In-Reply-To: <s1qo29n2-23s2-sqp5-2060-n8qr5rsr5584@fncre.vasb>
References: <aOy5LUUu5DCwY_XZ@amaryllis.le-fay.org> <2507674.THHZn3L5Ee@ravel> <aOzF-JAOyg-T-Ule@amaryllis.le-fay.org> <s1qo29n2-23s2-sqp5-2060-n8qr5rsr5584@fncre.vasb>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] Marcin Cieslak wrote in <s1qo29n2-23s2-sqp5-2060-n8qr5rsr5584@fncre.vasb>: > On Mon, 13 Oct 2025, Lexi Winter wrote: > > > after some more debugging, i think what's going on here is that pkg(8) > > is deleting and recreating /var/spool/mqueue on upgrade, which means > > smmsp's open fd to that directory is no longer valid, and therefore > > openat() returns this unusual error. > > I think mail spool queues should be left untouched by pkg(8). There might be some mail > there waiting to be sent. if there are files in the directory, it won't be removed, as far as i know. this is why /var/spool/clientmqueue isn't affected, because smmsp puts it PID file there, so pkg doesn't remove the directory. one proposal to "fix" this problem was to have sendmail's rc.d script create a dummy file there while sendmail is running, but this doesn't fix the underlying issue. my preference would be to fix this in pkg(8). there is some additional discussion on the review: https://reviews.freebsd.org/D53061. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaPpIFQAKCRD1nT63mIK/ YIriAQDsyHJwmoCup2ZIyci17raEGnQzag5+Vr5JoGFCNMJ1JgD/f7/Om5UHTq42 L0WqYX7q9G+AlSxw0AHbefWBaHW81QY= =XAQn -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aPpIGE2oZ_UxlPxQ>
