Re: negative tcp_tw_count and other TIME_WAIT weirdness?

From: John Salmon (
Date: Tue Jul 01 2003 - 12:12:18 EST

Thanks for the tip. I'll try the patch.

Another question - is there any chance that this bug could be
responsible for a slowdown in network processing. Some of my machines
get themselves into a state in which their ability to serve
network traffic (they're running squid) is significantly reduced -
perhaps by a factor of two. I wish I had more specific data, but at
this point it's a mystery. What I'm really wondering is whether
there's any chance at all that this kernel bug could be behind my
performance problem, or should I look elsewhere.

John Salmon

>>>>> "David" == David S Miller <> writes:

David> From: John Salmon <>
David> Date: Mon, 30 Jun 2003 17:25:16 -0700

David> I have several fairly busy servers reporting a negative value
David> for tcp_tw_count.

David> I have a sneaking suspicion that this patch (already in 2.4.22-preX)
David> will fix your problem.

David> # This is a BitKeeper generated patch for the following project:
David> # Project Name: Linux kernel tree
David> # This patch format is intended for GNU patch command version 2.5 or higher.
David> # This patch includes the following deltas:
David> # ChangeSet 1.930.114.22 -> 1.930.114.23
David> # net/ipv4/tcp_minisocks.c 1.13 -> 1.14
David> #
David> # The following is the BitKeeper ChangeSet Log
David> # --------------------------------------------
David> # 03/05/07 1.930.114.23
David> # [TCP]: tcp_twkill leaves death row list in inconsistent state over tcp_timewait_kill.
David> # --------------------------------------------
David> #
David> diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
David> --- a/net/ipv4/tcp_minisocks.c Tue Jul 1 01:25:26 2003
David> +++ b/net/ipv4/tcp_minisocks.c Tue Jul 1 01:25:26 2003
David> @@ -447,6 +447,8 @@
David> while((tw = tcp_tw_death_row[tcp_tw_death_row_slot]) != NULL) {
David> tcp_tw_death_row[tcp_tw_death_row_slot] = tw->next_death;
David> + if (tw->next_death)
David> + tw->next_death->pprev_death = tw->pprev_death;
tw-> pprev_death = NULL;
David> spin_unlock(&tw_death_lock);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:13 EST