On Wed, 15 Jan 2025 21:29:18 -0500 Jon Maloy <jmaloy(a)redhat.com> wrote:Testing with iperf3 using the "pasta" protocol splicer has revealed a bug in the way tcp handles window advertising in extreme memory squeeze situations. The problem occurs on the server side, and the socket in question is a completely regular socket with the default settings for the fedora40 kernel. We do not use SO_PEEK or SO_RCV_BUF on this socket.SO_RCVBUF I think what's missing, at this point, is a short description of the issue. That is (if I recall correctly), under memory pressure, we temporarily advertise a zero-sized window, but this is not stored as part of socket data, the reasoning being that it's a temporary setting which shouldn't influence any further calculation. However, by not storing this information in socket data, we also fail to advertise a non-zero window once we have enough memory to receive data. Our notion of the window size is now different from what we advertised to the peer. The peer won't send any data as a result, but we won't recalculate the window, either, as long as we don't receive any. The rest looks good and very reasonable to me. -- Stefano