Igor Sysoev wrote:
> The TIME_WAIT sockets suddenly started to grow on a host running
> FreeBSD 7.2-STABLE, date=2009.09.06.23.59.59
> Usually there are 3,000-5,000 TIME_WAIT sockets on the host.
> However, today they stared to grow, have reached 110,000 sockets in hour
> and still remain on this level.
> net.inet.tcp.msl is 30000.
> The host uptime is 24 days, 21:53.

Perhaps you need this patch?

Author: peter
Date: Thu Aug 20 22:53:28 2009
New Revision: 196410
URL: http://svn.freebsd.org/changeset/base/196410

Log:
  Fix signed comparison bug when ticks goes negative after 24 days of
  uptime.  This causes the tcp time_wait state code to fail to expire
  sockets in timewait state.

  Approved by:  re (kensmith)

Modified:
  head/sys/netinet/tcp_timewait.c

Modified: head/sys/netinet/tcp_timewait.c
--- head/sys/netinet/tcp_timewait.c     Thu Aug 20 22:39:20 2009        
(r196409)
+++ head/sys/netinet/tcp_timewait.c     Thu Aug 20 22:53:28 2009        
(r196410)
@@ -603,7 +603,7 @@ tcp_tw_2msl_scan(int reuse)
        INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
        for (;;) {
                tw = TAILQ_FIRST(&V_twq_2msl);
-               if (tw == NULL || (!reuse && tw->tw_time > ticks))
+               if (tw == NULL || (!reuse && (tw->tw_time - ticks) > 0))
                        break;
                INP_WLOCK(tw->tw_inpcb);
                tcp_twclose(tw, reuse);
-- 
Skip
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to