mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kuznet@ms2.inr.ac.ru
To: berd@elf.ihep.su (Eugene B. Berdnikov)
Cc: linux-kernel@vger.kernel.org, davem@redhat.com (Dave Miller)
Subject: Re: Bug report: tcp staled when send-q != 0, timers == 0.
Date: Tue, 10 Apr 2001 21:38:43 +0400 (MSK DST)	[thread overview]
Message-ID: <200104101738.VAA21467@ms2.inr.ac.ru> (raw)
In-Reply-To: <20010409184338.B1396@elf.ihep.su> from "Eugene B. Berdnikov" at Apr 9, 1 06:43:38 pm

Hello!

>  In brief: a stale state of the tcp send queue was observed for 2.2.17
>  while send-q counter and connection window sizes are not zero: 

I think I pinned down this. The patch is appended.


>  diagnostic, I'll try to get it. In any case, I plan to run something through
>  this connection in hope to reproduce this state again.

If my guess is right, you can easily put this socket to funny state
just catting a large file and kill -STOP'ing ssh. ssh will close window,
but sshd will not send zero probes. Any socket with keepalives enabled
enters this state after the first keepalive is sent.
[ Note, that it is not Butenko's problem, it is still to be discovered. 8) ]

I think you will not able to reproduce full problem: socket will revive
after the first received ACK. It is another bug and its probability is
astronomically low.

Alexey


--- linux/net/ipv4/tcp_input.c.orig	Mon Apr  9 22:46:56 2001
+++ linux/net/ipv4/tcp_input.c	Tue Apr 10 21:23:33 2001
@@ -733,8 +733,6 @@
 	if (tp->retransmits) {
 		if (tp->packets_out == 0) {
 			tp->retransmits = 0;
-			tp->fackets_out = 0;
-			tp->retrans_out = 0;
 			tp->backoff = 0;
 			tcp_set_rto(tp);
 		} else {
@@ -781,8 +779,10 @@
 	if(sk->zapped)
 		return(1);	/* Dead, can't ack any more so why bother */
 
-	if (tp->pending == TIME_KEEPOPEN)
+	if (tp->pending == TIME_KEEPOPEN) {
 	  	tp->probes_out = 0;
+		tp->pending = 0;
+	}
 
 	tp->rcv_tstamp = tcp_time_stamp;
 
@@ -850,8 +850,6 @@
 		if (tp->retransmits) {
 			if (tp->packets_out == 0) {
 				tp->retransmits = 0;
-				tp->fackets_out = 0;
-				tp->retrans_out = 0;
 			}
 		} else {
 			/* We don't have a timestamp. Can only use
@@ -878,6 +876,8 @@
 			tcp_ack_packets_out(sk, tp);
 	} else {
 		tcp_clear_xmit_timer(sk, TIME_RETRANS);
+		tp->fackets_out = 0;
+		tp->retrans_out = 0;
 	}
 
 	flag &= (FLAG_DATA | FLAG_WIN_UPDATE);
--- linux/net/ipv4/tcp_output.c.orig	Mon Apr  9 22:47:06 2001
+++ linux/net/ipv4/tcp_output.c	Tue Apr 10 21:23:33 2001
@@ -546,6 +546,8 @@
 		 */
 		kfree_skb(next_skb);
 		sk->tp_pinfo.af_tcp.packets_out--;
+		if (sk->tp_pinfo.af_tcp.fackets_out)
+			sk->tp_pinfo.af_tcp.fackets_out--;
 	}
 }
 

  reply	other threads:[~2001-04-10 17:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-09 14:43 Eugene B. Berdnikov
2001-04-10 17:38 ` kuznet [this message]
2001-04-10 21:19   ` Eugene B. Berdnikov
2001-04-11 10:16     ` Eugene B. Berdnikov
2001-04-11 16:56       ` kuznet
2001-04-11 18:35         ` Eugene B. Berdnikov
2001-04-11 19:04           ` kuznet
2001-04-11 19:28             ` Eugene B. Berdnikov
2001-04-11 19:37               ` kuznet
2001-04-11 16:35     ` kuznet
2001-04-11 18:50       ` Eugene B. Berdnikov
2001-04-11 19:09         ` kuznet
2001-04-11 19:18           ` Eugene B. Berdnikov
2001-04-13  8:54           ` Eugene B. Berdnikov
     [not found]             ` <200104181928.XAA04912@ms2.inr.ac.ru>
2001-04-21 15:45               ` Eugene B. Berdnikov
2001-04-21 17:02                 ` kuznet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200104101738.VAA21467@ms2.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --cc=berd@elf.ihep.su \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®