From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HgNxrYUU; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 6D2D85A061E for ; Mon, 27 Jan 2025 11:01:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737972087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rq8pbYHQyCtCKmvNznuWUqZxLibrhcyPAMFJSYXwA7w=; b=HgNxrYUUkUT6ltx1wcr51zhdX+U4qqN5ojtNjYViKCY1Tv9AajSZfQUqLhFYdXUzQeduKP QQmY5X7RP5lptzE7b7SwpiAbDkFSzsv/lYhPAT/rpcTXHDZcY8KJPUjJ/fWvK2iQSD50EE l1M1QROI/OQpIB9U0k4dJs6QaTRd5ss= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-615-7fzYS0s2MLOyM7aDOJPV8w-1; Mon, 27 Jan 2025 05:01:25 -0500 X-MC-Unique: 7fzYS0s2MLOyM7aDOJPV8w-1 X-Mimecast-MFC-AGG-ID: 7fzYS0s2MLOyM7aDOJPV8w Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-388d1f6f3b2so1690417f8f.0 for ; Mon, 27 Jan 2025 02:01:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737972084; x=1738576884; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rq8pbYHQyCtCKmvNznuWUqZxLibrhcyPAMFJSYXwA7w=; b=KD5GDOk9oynr5Xm5G2568R1Og6+RiOqPw3IIfvS6oOWoWbcTaQqrIZTKa2kuKP8C0w XwX4kq2hgK+UL7xKrVvd8jx2p/b/ixqrajf7IjWsiU+X1G1gY2/1RRQikcKlBsB5tBTs EHeQZLO0At1w769fFHZBQomoTP1FUpeG7ykbhn63FXzbMGxR83BMeHz7cS9AG7x2BM60 tS2PGKBakfr1UaWmFI/jONEH7dqN77MB5qZPnh0f7EoYSWL0b/v4gN11NygE0oQG3Rm3 0/ULYDlQLKEg57CNSWnlDv4/Ji7raGqeNQmnubo7RUlVoMAeQkDk5Zl6hbHy4/ic2f+h eSgw== X-Forwarded-Encrypted: i=1; AJvYcCVIoKGCmN4xjUVWDxR/KBAizSVj+1gh5CSBi9gTyTs2dy0XScpqMD9Q8YQl001dd15y/Z5ViUUPxhI=@passt.top X-Gm-Message-State: AOJu0YyprWXxnMdX3SIcArQk24t7LJQ4Jy2nKV6AbI0LkSZ88FpPEHUt hduZ5QmKD3P6KZ7z5/HNH+ovxg7UPB+vy11GwFn2R+c1Oyqcuz/wAn63dYkrQYOVAxnroxIn2+o ZQtSS0ZHxrnQHoNS0EzmXFyC3Z7jaEO1ABu10eLUg6udiYsI2FQ== X-Gm-Gg: ASbGnct74zkGgoJu94h8SuACleNkui798QnUNJ1i8ERknkFcOaBTY4WqgZvlNX6IoMK 07bDLEnxbI+p8iv4cw6Gpai7R7kd57rNN4icuy5+He0WradH3pdgXiUusYv+4aDv4no+5y4vl5H aHEtY10rDh5365vbGXWW6qf9Lmrh1quZVQqQxA2lEsxc62G3x0pChusJ8egpp5vM7fUJGvEbvMB uXCABVXWC4zfYXV27gHNxFfKDm59+NxdP7nD/dLnLcWWQb0viEKLhBI4r2+Q5TjJ5r/IroUG8uO MsLdtpkjkCc2UZsiZqdac0sRfm+sQeM9/A== X-Received: by 2002:adf:f811:0:b0:385:e3c5:61ae with SMTP id ffacd0b85a97d-38bf56785f2mr31482970f8f.31.1737972084266; Mon, 27 Jan 2025 02:01:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IERgycqNpISQ7GKlK506OJK+4JFwgnw9zCW59eh5kM4ir5Mcdj703dGfSe/yNBreLyftA9QeA== X-Received: by 2002:adf:f811:0:b0:385:e3c5:61ae with SMTP id ffacd0b85a97d-38bf56785f2mr31482944f8f.31.1737972083936; Mon, 27 Jan 2025 02:01:23 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c3ec83e20sm3893371f8f.23.2025.01.27.02.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 02:01:23 -0800 (PST) Date: Mon, 27 Jan 2025 11:01:21 +0100 From: Stefano Brivio To: Jon Maloy , Eric Dumazet Subject: Re: [net,v2] tcp: correct handling of extreme memory squeeze Message-ID: <20250127110121.1f53b27d@elisabeth> In-Reply-To: References: <20250117214035.2414668-1-jmaloy@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Jn3jIlPRkx67iJ-7DE8yrarlG0uyAeQCKkSs34KhXYY_1737972084 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 6TVQFIDDKZAHCUUX4LQYQBAMFKTS4FZJ X-Message-ID-Hash: 6TVQFIDDKZAHCUUX4LQYQBAMFKTS4FZJ X-MailFrom: sbrivio@redhat.com 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: Neal Cardwell , netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com, eric.dumazet@gmail.com, Menglong Dong 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: On Fri, 24 Jan 2025 12:40:16 -0500 Jon Maloy wrote: > I can certainly clear tp->pred_flags and post it again, maybe with > an improved and shortened log. Would that be acceptable? =20 Talking about an improved log, what strikes me the most of the whole problem is: $ tshark -r iperf3_jon_zero_window.pcap -td -Y 'frame.number in { 1064 .. 1= 068 }' 1064 0.004416 192.168.122.1 =E2=86=92 192.168.122.198 TCP 65534 34482 = =E2=86=92 5201 [ACK] Seq=3D1611679466 Ack=3D1 Win=3D36864 Len=3D65480 1065 0.007334 192.168.122.1 =E2=86=92 192.168.122.198 TCP 65534 34482 = =E2=86=92 5201 [ACK] Seq=3D1611744946 Ack=3D1 Win=3D36864 Len=3D65480 1066 0.005104 192.168.122.1 =E2=86=92 192.168.122.198 TCP 56382 [TCP Win= dow Full] 34482 =E2=86=92 5201 [ACK] Seq=3D1611810426 Ack=3D1 Win=3D36864 L= en=3D56328 1067 0.015226 192.168.122.198 =E2=86=92 192.168.122.1 TCP 54 [TCP ZeroWi= ndow] 5201 =E2=86=92 34482 [ACK] Seq=3D1 Ack=3D1611090146 Win=3D0 Len=3D0 1068 6.298138 fe80::44b3:f5ff:fe86:c529 =E2=86=92 ff02::2 ICMPv6 70= Router Solicitation from 46:b3:f5:86:c5:29 ...and then the silence, 192.168.122.198 never announces that its window is not zero, so the peer gives up 15 seconds later: $ tshark -r iperf3_jon_zero_window_cut.pcap -td -Y 'frame.number in { 1069 = .. 1070 }' 1069 8.709313 192.168.122.1 =E2=86=92 192.168.122.198 TCP 55 34466 =E2= =86=92 5201 [ACK] Seq=3D166 Ack=3D5 Win=3D36864 Len=3D1 1070 0.008943 192.168.122.198 =E2=86=92 192.168.122.1 TCP 54 5201 =E2=86= =92 34482 [FIN, ACK] Seq=3D1 Ack=3D1611090146 Win=3D778240 Len=3D0 Data in frame #1069 is iperf3 ending the test. This didn't happen before e2142825c120 ("net: tcp: send zero-window ACK when no memory") so it's a relatively recent (17 months) regression. It actually looks pretty simple (and rather serious) to me. --=20 Stefano