[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92daa9c2-7bfc-94ff-bb06-91ef03cd0d66@hpe.com>
Date: Tue, 17 Jan 2017 11:04:48 -0800
From: Rick Jones <rick.jones2@....com>
To: Jason Baron <jbaron@...mai.com>, davem@...emloft.net
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next] tcp: accept RST for rcv_nxt - 1 after receiving
a FIN
On 01/17/2017 10:37 AM, Jason Baron wrote:
> From: Jason Baron <jbaron@...mai.com>
>
> Using a Mac OSX box as a client connecting to a Linux server, we have found
> that when certain applications (such as 'ab'), are abruptly terminated
> (via ^C), a FIN is sent followed by a RST packet on tcp connections. The
> FIN is accepted by the Linux stack but the RST is sent with the same
> sequence number as the FIN, and Linux responds with a challenge ACK per
> RFC 5961. The OSX client then sometimes (they are rate-limited) does not
> reply with any RST as would be expected on a closed socket.
>
> This results in sockets accumulating on the Linux server left mostly in
> the CLOSE_WAIT state, although LAST_ACK and CLOSING are also possible.
> This sequence of events can tie up a lot of resources on the Linux server
> since there may be a lot of data in write buffers at the time of the RST.
> Accepting a RST equal to rcv_nxt - 1, after we have already successfully
> processed a FIN, has made a significant difference for us in practice, by
> freeing up unneeded resources in a more expedient fashion.
Drifting a bit, and it doesn't change the value of dealing with it, but
out of curiosity, when you say mostly in CLOSE_WAIT, why aren't the
server-side applications reacting to the read return of zero triggered
by the arrival of the FIN?
happy benchmarking,
rick jones
Powered by blists - more mailing lists