netdev
[Top] [All Lists]

Re: TCP hangs

To: Mikulas Patocka <mikulas@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: TCP hangs
From: Nivedita Singhvi <niv@xxxxxxxxxx>
Date: Tue, 04 May 2004 09:48:38 -0700
Cc: linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.58.0405041811300.11971@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <Pine.LNX.4.58.0405021602120.20423@xxxxxxxxxxxxxxxxxxxxxxxx> <409583B1.5040906@xxxxxxxxxx> <Pine.LNX.4.58.0405031238110.18691@xxxxxxxxxxxxxxxxxxxxxxxx> <4097B8D1.4010008@xxxxxxxxxx> <Pine.LNX.4.58.0405041811300.11971@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130
Mikulas Patocka wrote:

TCP should send RST on received data after shutdown(SHUT_RD) ---
RFC2525, sections 2.16, 2.17.

Yes, but that should lead to a shutdown on both ends. If you
have sent a reset, why are you not tearing down your end of
whatever remains of the connection? You have asked the
other side to tear down. RFC 793:

"The receiver of a RST first validates it, then changes state. If the receiver was in the LISTEN state, it ignores it. If the receiver was in SYN-RECEIVED state and had previously been in the LISTEN state, then the receiver returns to the LISTEN state, otherwise the receiver aborts the connection and goes to the CLOSED state. If the receiver was in any other state, it aborts the connection and advises the user
and goes to the CLOSED state."


It happens that the stack at the client ignores seq number if packet
doesn't contain any data. I fixed the client so that it replies with ack,
if sequence number doesn't match. Is it correct fix?


That will work.
The app didn't go away, it just called close.


See above.

App was just not receiving any data, until I stopped the connection in
browser.

Mikulas

Hmm, that sounds like a root cause issue, then (why the app wasn't
receiving data in the first place)..

Thanks for the info..

Nivedita




<Prev in Thread] Current Thread [Next in Thread>