netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* KERNEL: assertion ((int)tp->sacked_out >= 0) failed at net/ipv4/tcp_input.c (2626)
@ 2007-03-28 12:03 Patrick McHardy
  2007-03-28 13:24 ` Ilpo Järvinen
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2007-03-28 12:03 UTC (permalink / raw)
  To: Linux Netdev List

I got this warning with the current net-2.6.22 tree:

KERNEL: assertion ((int)tp->sacked_out >= 0) failed at
net/ipv4/tcp_input.c (2626)
Leak s=4294967292 3

Can't say what exactly triggered it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: KERNEL: assertion ((int)tp->sacked_out >= 0) failed at net/ipv4/tcp_input.c (2626)
  2007-03-28 12:03 KERNEL: assertion ((int)tp->sacked_out >= 0) failed at net/ipv4/tcp_input.c (2626) Patrick McHardy
@ 2007-03-28 13:24 ` Ilpo Järvinen
  2007-03-28 19:06   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2007-03-28 13:24 UTC (permalink / raw)
  To: Patrick McHardy, David Miller; +Cc: Linux Netdev List

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1614 bytes --]

On Wed, 28 Mar 2007, Patrick McHardy wrote:

> I got this warning with the current net-2.6.22 tree:
> 
> KERNEL: assertion ((int)tp->sacked_out >= 0) failed at
> net/ipv4/tcp_input.c (2626)
> Leak s=4294967292 3
> 
> Can't say what exactly triggered it.

It seems I'm being guilty to this one, Dave please apply to net-2.6.22 
(besides this I think the tcp_sync_left_out should be changed but I'll 
prepare a patch for that later). Btw, how should this kind of email with 
some non-patch description+patch be formatted?).

[PATCH] [TCP]: Timedout loop must skip SACKed skbs too while marking

Marking skb with both S and L is invalid, and that could easily
happen in the timedout loop. Later on the tcp_sync_left_out
reduces sacked_out if lost_out + sacked_out > packets_out and
then eventually sacked_out underflows triggering a debug trap in
tcp_clean_rtx_queue.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
 net/ipv4/tcp_input.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index d116887..7a59ffe 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1777,7 +1777,8 @@ static void tcp_timedout_mark_forward(st
 		if (skb == tcp_send_head(sk) || !tcp_skb_timedout(sk, skb))
 			break;
 		/* Could be lost already from a previous timedout check */
-		if (!(TCP_SKB_CB(skb)->sacked & TCPCB_LOST)) {
+		if (!(TCP_SKB_CB(skb)->sacked &
+		     (TCPCB_LOST|TCPCB_SACKED_ACKED))) {
 			TCP_SKB_CB(skb)->sacked |= TCPCB_LOST;
 			tp->lost_out += tcp_skb_pcount(skb);
 			tcp_verify_retransmit_hint(tp, skb);
-- 
1.4.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: KERNEL: assertion ((int)tp->sacked_out >= 0) failed at net/ipv4/tcp_input.c (2626)
  2007-03-28 13:24 ` Ilpo Järvinen
@ 2007-03-28 19:06   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2007-03-28 19:06 UTC (permalink / raw)
  To: ilpo.jarvinen; +Cc: kaber, netdev

From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi>
Date: Wed, 28 Mar 2007 16:24:40 +0300 (EEST)

> It seems I'm being guilty to this one, Dave please apply to net-2.6.22 
> (besides this I think the tcp_sync_left_out should be changed but I'll 
> prepare a patch for that later). Btw, how should this kind of email with 
> some non-patch description+patch be formatted?).

Thanks for figuring out the problem so quickly, this formatting
is fine.

> [PATCH] [TCP]: Timedout loop must skip SACKed skbs too while marking
> 
> Marking skb with both S and L is invalid, and that could easily
> happen in the timedout loop. Later on the tcp_sync_left_out
> reduces sacked_out if lost_out + sacked_out > packets_out and
> then eventually sacked_out underflows triggering a debug trap in
> tcp_clean_rtx_queue.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>

Patch applied, thanks a lot!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-28 19:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-28 12:03 KERNEL: assertion ((int)tp->sacked_out >= 0) failed at net/ipv4/tcp_input.c (2626) Patrick McHardy
2007-03-28 13:24 ` Ilpo Järvinen
2007-03-28 19:06   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).