From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202512 header.b=FZCkuxBO; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 0ACBC5A0271 for ; Tue, 09 Dec 2025 01:01:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1765238492; bh=XWSKyOSbEfhtDl6ADNT4wOyH6FsydDNrUOMQTP7r41c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FZCkuxBOcO6xIUlq7uKmUGKBacaZHYbgCEVKBF/8t1NjawqOBWA9YWB8nrM1POh1h p4kXYMVrE/H44W9o9fmQ3ixo0dG2crU/DElXUj8sG9n+qT49aDoCP+3PyLTD5/gQd2 57c2ZFYHZ59k1jogH8odUTRdnt1dArAArlTcXkL7wESpnmLBHWwFP0jjDv02D/fJWy /ezsS1DRJi1q2YmZH/aA0rw7cQ+tJGjj8Lvpx2dQjzhhu6OwBQfR2DLbM9zqaNtOWE AL5dFFBFqewyc8cEN4YVOoFqMhhdf+hFra5iNuvqJHBdPkoXJXhJUWZGD+DNTE+keM vQB4orNoAKlhQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dQJt43ppqz4wMS; Tue, 09 Dec 2025 11:01:32 +1100 (AEDT) Date: Tue, 9 Dec 2025 11:01:27 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] flow: Set EPOLLFD_ID_DEFAULT on newly allocated flows, not EPOLLFD_ID_INVALID Message-ID: References: <20251208212822.2721774-1-sbrivio@redhat.com> <20251208225400.6a054d22@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zkF2B1DO/UB22NeL" Content-Disposition: inline In-Reply-To: <20251208225400.6a054d22@elisabeth> Message-ID-Hash: AKJO47I4S6CRRT2OBJN5DMZFWQPOCZMH X-Message-ID-Hash: AKJO47I4S6CRRT2OBJN5DMZFWQPOCZMH X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --zkF2B1DO/UB22NeL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 08, 2025 at 10:54:00PM +0100, Stefano Brivio wrote: > On Mon, 8 Dec 2025 22:28:22 +0100 > Stefano Brivio wrote: >=20 > > We're somehow hitting: > >=20 > > ASSERTION FAILED in flow_epollfd (flow.c:362): f->epollid < ((1 << 8)= - 1) > >=20 > > on an inbound spliced connection, with a single forwarded port, an > > HTTP server in a Podman container, and a GET request. Reproducer at > > https://bodhi.fedoraproject.org/updates/FEDORA-2025-93b4eb64c3#comment-= 4473411 > >=20 > > printf 'FROM registry.fedoraproject.org/fedora:latest\nRUN /usr/bin/d= nf install -y httpd\nEXPOSE 80\nCMD ["-D", "FOREGROUND"]\nENTRYPOINT ["/usr= /sbin/httpd"]\n' > Containerfile > > podman build -t fedora-httpd $(pwd) > > podman run -d -p 8080:80 localhost/fedora-httpd > >=20 > > curl http://localhost:8080 > >=20 > > I guess we don't set EPOLLFD_ID_DEFAULT early enough on inbound spliced > > sockets for some reason and we get a socket event while we still have > > EPOLLFD_ID_INVALID set. > >=20 > > As we're not really using epoll identifiers yet, set > > EPOLLFD_ID_DEFAULT right away on newly allocated flows, while we > > figure this out. > >=20 > > Link: https://bodhi.fedoraproject.org/updates/FEDORA-2025-93b4eb64c3#co= mment-4473411 > > Signed-off-by: Stefano Brivio > > --- > > I just merged this, posting for awareness / review. >=20 > Ah, never mind, this makes it worse somehow: >=20 > 5.6384: Flow 0 (TCP connection (spliced)): SPLICE_CONNECT > 5.6384: Flow 0 (TCP connection (spliced)): ERROR on epoll_ctl(): No such = file or directory This makes sense: epollfd !=3D EPOLLFD_ID_INVALID indicates that the flow's fds are already in the epoll (flow_in_epoll() will return true). With epollfd initialised to EPOLLFD_ID_DEFAULT, we'll attempt EPOLL_CTL_MOD on the very first tcp_splice_epoll_ctl(), having never added the fds to the epoll set, hence this error. > ...still looking for a workaround / fix. Could the flow - for some other reason - be closing almost immediately, before it even adds itself to the epoll? If that's the case, we could potentially trigger this in the (flag =3D=3D CLOSING) section of conn_flag_do(). I haven't managed to reproduce, so I can't test this myself. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --zkF2B1DO/UB22NeL Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmk3ZtYACgkQzQJF27ox 2Gd2EhAAhTXUO1Hhb2q6yeoywMogqu9VJc/t73qTBkbsni22CN71IG5yXKff291w ohueOQSG/Jx9VUx5RFcKrcoHlnCD5WOcJJS0eOB27/mT+gK5LA/xJWGRxIiEG9IO VP0BqNYw9SmBWqDqXCyNrk/sVnO0Rn0ArX3/EJsKbFdDa01IziOCRrOR+14ZotvI /L/xR/KtsU41AXHUIOwFhFf2+ubfdgSp0DHcnQRzwtWz17G58ciBniGiz5r8zAus ni21sLNB+TxsCpMTru5u0uYKXWc5jUM0516aTSZXXF1ATQbZhPI5yummThqVtuFt KkI6mdxzBqnI1LoKtBoj/EWcYjGKhJVEsIgU5e6w+yNQ2CtYaAoAQaGU8kNpUU/l mMDRgEyHCp55hG+jTCBhW/5aNnT5SItyed7XTO8uW+oNhOY+OwdaHaWYYhBB7XCf qgIXuHJBPWAIhVclRkgtXAeXvuQp7GhzmeryQdZpjhvFnCBs5m/QAyg3jBfdj43k C0Xx/bjwbJk1xuRNMXRezRKhUcTnxoprJDKqm7h++wAiHUtfnbT8Ak+iVFAfWxmb soICipxOPe2np5fI/F7LpweBHdKywU/77EfYJ3EIINvL/jfLNVWBFJ2iFqQSk22A 25SG9yAC6xdDx26H9oD+v/OAtFuqiAiLZOBS5wyvaDjLP0G1RKI= =DYqj -----END PGP SIGNATURE----- --zkF2B1DO/UB22NeL--