From owner-freebsd-net@FreeBSD.ORG Fri Jul 22 13:15:27 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68E291065672 for ; Fri, 22 Jul 2011 13:15:27 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from mail-chaos.rambler.ru (mail-chaos.rambler.ru [81.19.68.130]) by mx1.freebsd.org (Postfix) with ESMTP id 27F3A8FC1B for ; Fri, 22 Jul 2011 13:15:26 +0000 (UTC) Received: from citrin.office.vega.ru (unknown [178.214.36.169]) (Authenticated sender: citrin@citrin.ru) by mail-chaos.rambler.ru (Postfix) with ESMTPSA id 6A5781702C for ; Fri, 22 Jul 2011 17:03:47 +0400 (MSD) Message-ID: <4E297533.4040109@citrin.ru> Date: Fri, 22 Jul 2011 17:03:47 +0400 From: Anton Yuzhaninov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.17) Gecko/20110527 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: connections in CLOSED state X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2011 13:15:27 -0000 It seems to be there is some race and/or leak in tcp stack: 1. Netstat show connections in closed state (for a long time): > netstat -n | egrep '(Proto|CLOSED)' Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 10.25.1.54.35543 10.25.1.54.35544 CLOSED tcp4 0 0 10.25.1.54.57273 10.25.1.54.57274 CLOSED tcp4 0 0 10.25.1.54.40445 10.25.1.54.62378 CLOSED tcp4 0 0 10.25.1.54.43403 10.25.1.54.43404 CLOSED tcp4 0 0 10.25.1.54.36380 10.25.1.54.36381 CLOSED ... 2. sockstat don't show any processes to which this sockets can belong to. some info from kgdb: > netstat -nA -p tcp | egrep '(Tcpcb|CLOSED)' Tcpcb Proto Recv-Q Send-Q Local Address Foreign Address (state) ffffff01abfb8370 tcp4 0 0 10.25.1.54.35543 10.25.1.54.35544 CLOSED (kgdb) set $t = (struct tcpcb) *0xffffff01abfb8370 (kgdb) p $t->t_inpcb->inp_socket->so_count $18 = 0 > uname -srp FreeBSD 8.2-PRERELEASE-20110101 amd64 -- Anton Yuzhaninov