From nobody Thu Oct 23 15:22:00 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 4csqX4202nz6DlXH; Thu, 23 Oct 2025 15:22:12 +0000 (UTC) (envelope-from ivy@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 4csqX36B9Lz3YQx; Thu, 23 Oct 2025 15:22:11 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761232931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fgWK3LaTJkbvmYpSwnCqVHxv8iFZmAX4MY+UMR3iwlU=; b=Q+tQ7Y2qWiyzgcJKfpPfnZuOQfkvxHtK1WL4kcI4Dq+KvIX0AUjC597Q1AYu/plNm8n/UL hHmZ8Y0FBJ+gI7RsCykxOwuYx0XPRrBWcKKlCSKxpKPD6eZP/M+5OjVB89iU139c8P2Eg9 BTQsdJV7zxFj4Ka6uMFZ4gVQikonqxTtFhOVqEFzSl8HnVtY/zcsR8L2XF7OvfpFRsWCpe Ge2pNaVZg+b+A+6lcpmXofeZPfKKKXx6npk7IWhiO/ioKqwNlxqc0wBRp9+YEVtarQo4mK qY8r0bpWSAGfLdNC9XvVaT7cYvVJxKeBg5eda8YVsMMDwXijnD8Nxxpip4ykTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761232931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fgWK3LaTJkbvmYpSwnCqVHxv8iFZmAX4MY+UMR3iwlU=; b=JVeAGo8E85TLI5hvtu2aEn3Vl5L4A1/cWOpQIFT4wCD06B234S2dQMbWqsku2817o7PtV8 /iPSRwoW8uhrj40IpDiZw5qtwZF2F4WAG5xVRrYXH9bTnt+O4xcwmt0KPCZ4aOYrz9CpQe ii1S8FvJHMcjfRr83X8H6Rx4jLhHdT2Ea5L6RISW4wCTZrdCNkBKt1fM1Tqnyo77zzaUw9 00HHV6tqkI906wki7zlM5GCj56/peZpH6V1309w8efKkeYGJ39E7S1RBormXkXUc5+RCMJ dm+cg4WWEvnr3Ci5MLhW/tiyvxy4KDU4KkMQ5h7cp7UPb24lzFIQtG7aIdzcAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761232931; a=rsa-sha256; cv=none; b=LIHDYLgGz8z70Wfp/2/NXVbMuI7CmzjQo7k7UewAsXFO9j8dmJHWgRZ5vDP3jYK4jc58cK tmd3NrQuEysMmXkVi35nIRHF7/zo0XHs46Kk9l5CWZtdHIAUSziQomP65r53EG5aL640AE ejmCQOFIS53Bm5MinINEW3WR1lpQ5QKBRWqQQZ8VLlgQCgul951eCBlfZ9fNxxX8ZJdEBX 3VLNQGGCtCkSooZLRtSBlm+NU9Wb2LQ4Wsmu8rymLvRkcvUrnEVEnmeuD00lfKSsJg1X4A hBiOUiCIDfdnoYdORbEnsX02QM3he3PFq/bIQdHAMdbfBJWPeU245aAvPRSCNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from amaryllis.le-fay.org (amaryllis.le-fay.org [IPv6:2a00:1098:6b:400::9]) (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: ivy/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4csqX33RYWzFdd; Thu, 23 Oct 2025 15:22:11 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Thu, 23 Oct 2025 16:22:00 +0100 From: Lexi Winter To: fs@freebsd.org, current@freebsd.org Subject: Re: openat("./...", O_CREAT) fails even though the directory exists Message-ID: Mail-Followup-To: fs@freebsd.org, current@freebsd.org References: <2507674.THHZn3L5Ee@ravel> 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; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xPNM7LLxSjdYmbBq" Content-Disposition: inline In-Reply-To: --xPNM7LLxSjdYmbBq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Marcin Cieslak wrote in : > On Mon, 13 Oct 2025, Lexi Winter wrote: >=20 > > 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. >=20 > 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. --xPNM7LLxSjdYmbBq Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaPpIFQAKCRD1nT63mIK/ YIriAQDsyHJwmoCup2ZIyci17raEGnQzag5+Vr5JoGFCNMJ1JgD/f7/Om5UHTq42 L0WqYX7q9G+AlSxw0AHbefWBaHW81QY= =XAQn -----END PGP SIGNATURE----- --xPNM7LLxSjdYmbBq--