From patchwork Thu Aug 27 04:47:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edoardo Canepa X-Patchwork-Id: 2293514 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hW4BY2kXvz1xvx for ; Fri, 28 Aug 2026 00:48:04 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1wzbOU-0001JM-IB; Thu, 27 Aug 2026 14:47:54 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1wzbOS-0001J6-Jw for kernel-team@lists.ubuntu.com; Thu, 27 Aug 2026 14:47:52 +0000 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 6EAE53F28A for ; Thu, 27 Aug 2026 14:47:52 +0000 (UTC) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-49b83093fe4so86455e9.3 for ; Thu, 27 Aug 2026 07:47:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787842072; x=1788446872; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=ky0tgKe7G3F2o51+QL/lOr+th16jkMWp8pJosCP4VAI=; b=ZlMD4n2jhYwyrwtDl3bMRIEIv0TmHyxwvr2mI5BmR6WpmeSkKgEM3u2H9WHGdHCJJu 5/JyEuqhn3IkGeHOzmP9QYCg6uErJJPerO2N7MgNlWMPw6iPJCaGQp3pvsH5o8qG/+F9 fFBut5NLLH4w9lu6fGJuJOQhlD4tNu6X6+am4Iutcj+pwwdELSoDeSvySJLnIv6S2tb/ /SLrv0+h9mzCmoZ+lwcG40vMSWikVWsS5IpBQD7dxKz2+1sWx6G+CnaclUfESqpBBVc/ CwOtYP830r7JqN/ds3P8gurRaJ6FJmzuZI32Nok+sh6E5gdSf1q5DN6jzHo+3GobeR4O cozw== X-Gm-Message-State: AFuF++mIpf9veNCMhwctyjTLz3vHz3ajY+Vj/GDMP+rbfm4YpoatLIhe HcnF6d8Nx6Km0eX35dLgdGljLn519I1t2oQ6MDUhsiAgEKpZcbT/nEEV3JJTURtEnSucSdY7c2k Zgo7W0aShdS2ia33R2SIPmdoLz52looqduA3PW2zyS/RON8mNq4Belfs1sfD1BfarJfLqQ/EkdH z+7ldlTNZfkVc53N4y X-Gm-Gg: AR+sD10L6fDh6uwyVUO0aJSaZZEa82KW8mrmQDzXAuqzxBfljGOzY+HfcNYnhHHndHK 9UC4RHn7kjJB6yoqXP+nIXhqhzbzwRWMgzar1JZEgUsTcYxmM7YgSDF/E3ID9JMoOJcpBeLf9pB 2GBc6RL3d1dIw/X+DhL/bs84fyzV2JpGU4x2i5V3KSxMgEhn2zkQS+7wwkTC8F6yA213f9NSTEf s7Bak3SbMcNGq1LKxnvWYFtbsd9X3PaebtDRPq0flqQMVT8F6sP0L3q7h/q59PKjcrFt38NmOhz PLK5j2mlPqdRFrgQlto7eJ2wI8hNvHQBXYDxFAP9JTPKFnsmKLFMi9+8aPThCOVuI8B+q6N6S18 GAQ+/lAAW X-Received: by 2002:a05:600c:3e18:b0:499:5b0f:72b with SMTP id 5b1f17b1804b1-49b0c92c19amr66704665e9.1.1787842071963; Thu, 27 Aug 2026 07:47:51 -0700 (PDT) X-Received: by 2002:a05:600c:3e18:b0:499:5b0f:72b with SMTP id 5b1f17b1804b1-49b0c92c19amr66704175e9.1.1787842071513; Thu, 27 Aug 2026 07:47:51 -0700 (PDT) Received: from localhost ([151.18.46.120]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482e279eb1csm9648533f8f.4.2026.08.27.07.47.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2026 07:47:50 -0700 (PDT) To: kernel-team@lists.ubuntu.com Subject: [SRU][R][PATCH 0/1] New 7.0 ubuntu_kselftests_net/net:tun tests flaky (LP: #2158217) Date: Thu, 27 Aug 2026 17:47:46 +0300 Message-ID: <178784100453.66359.11703988426858088454@ecanepa-zbook.public> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Edoardo Canepa via kernel-team From: Edoardo Canepa Reply-To: Edoardo Canepa Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2158217 [Impact] The tun_vnet_udptnl selftests (introduced in the 7.0 cycle) are flaky in ubuntu_kselftests_net/net:tun, causing sporadic CI failures. The send_gso_packet variants fail with zero bytes received on the inner UDP socket after packets are written into the TUN file descriptor: tun.c:947:send_gso_packet:Expected ret (0) == variant->data_size (1423) tun.c:948:send_gso_packet:Expected r_num_mss (0) == variant->r_num_mss (2) The failures are non-deterministic: different variants fail on each run and all tunnel types (4in4, 4in6, 6in4, 6in6) are affected. Only the decap direction (TUN fd -> geneve -> socket) is impacted; the encap direction (socket -> geneve -> TUN fd) always succeeds. Two independent root causes were identified: 1. The test IPv6 addresses fall in the 2002::/16 range reserved for the 6to4 transition mechanism (RFC 3056). When the sit module is loaded the kernel claims this prefix, creating a competing local route that prevents geneve from decapsulating IPv6-outer packets. 2. The geneve fixture binds a UDP encap socket on port 4789 in the default network namespace. Any host network activity that also touches that port or the test address ranges (VPN tunnels, container overlay networks, libvirt bridges, etc.) can silently divert or drop packets in the geneve decapsulation path. This is not a kernel regression; the tests exhibit the same flakiness when the 7.0 test binary is run on a 6.17 kernel. [Fix] Two patches: Patch 1 (upstream cherry-pick ef01724fa235): Replaces the 2002::/16 IPv6 test addresses with fd00:db8::/32 ULA addresses that carry no special kernel semantics. Patch 2 (SAUCE): Calls unshare(CLONE_NEWNET) at program startup so the test runs in a pristine, isolated network namespace free of competing traffic. This follows the same pattern already used by several other net selftests (so_incoming_cpu, tcp_port_share, icmp_rfc4884, ipv6_fragmentation, so_netns_cookie, ipsec, tcp_ao). [Test] Built the tun test binary from the resolute kernel source tree and executed it repeatedly before and after the fix: Before: 7 out of 55 runs had at least one failure (~12.7% failure rate), with 9 individual test failures spread across all tunnel types. After: 0 failures across 20 consecutive runs. [Where problems could occur] The unshare(CLONE_NEWNET) call requires CAP_SYS_ADMIN, which the test already needs to create TUN/TAP devices. Running in an isolated namespace means the test cannot exercise interactions with pre-existing host network configuration, but that is not the purpose of these unit tests. Acked-by: Rickey Castillo