From owner-freebsd-net@FreeBSD.ORG Wed Apr 4 17:08:38 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ECEBE16A408 for ; Wed, 4 Apr 2007 17:08:38 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id A6D8113C487 for ; Wed, 4 Apr 2007 17:08:38 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so317799ana for ; Wed, 04 Apr 2007 10:08:38 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=iNl0QeSK9kKiAh1PV3mJ1nPchGn4JxqDu8coCPZjTRgwYH9o4JWyPBqC+mhkN3uqceZxVdQVjVyTbGdBBWegSNn24HV4qAgFm2AvVtakifC+DPZ0U+N0IE7XrkbB3mtWFdbmmV/evp1lbJt1bhUlNMLPVfTZNWx8lzzy7Ab2+Hs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UXHyn6n7E9yPm+YQMP7j91nw46rXHHFAmi81KVkInjl+1WhfTd5FJZ4J9H3xpwn9bDnu+1+ppyXuBlcfk+GqOpXAvrrPnA/LXsLdgrvLB114ylipoWv6Ts9Cnzo5iQzPIQIL4lZ+aDf4X653JjDu/xsCRNA3th+frRYy8QDUX5M= Received: by 10.100.251.9 with SMTP id y9mr562714anh.1175706517810; Wed, 04 Apr 2007 10:08:37 -0700 (PDT) Received: by 10.100.9.7 with HTTP; Wed, 4 Apr 2007 10:08:37 -0700 (PDT) Message-ID: Date: Wed, 4 Apr 2007 21:08:37 +0400 From: pluknet To: stefan.lambrev@sun-fish.com In-Reply-To: <461365C2.9080609@sun-fish.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <461365C2.9080609@sun-fish.com> Cc: freebsd-net@freebsd.org Subject: Re: sockets without owner. 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: Wed, 04 Apr 2007 17:08:39 -0000 On 04/04/07, Stefan Lambrev wrote: > Hello list, > > I'm having very strange problem. > I have near 200 sockets reported by netstat -An, which are NOT reported > by sockstat and fstat. > All of them look like (output from netstat -An) : > > ffffff0169282000 tcp4 0 0 192.168.13.12.4965 > 192.168.13.3.8080 FIN_WAIT_2 > > I'm trying to figure out what keeps them active (tcpdump shows traffic > from 192.168.13.12 to 192.168.13.3) > The application that create them is stopped before more then a week but > request are still "flying" around. > > I tried fstat |grep ffffff0169282000, but the output is 0 lines. > Is there any way to close those sockets, as it appears that they are > stalled and without owner? > > And what is the timeout for FIN_WAIT_2 in freebsd ? > (the rfc doesn't define timeout but I read somewhere that freebsd's > network stack have timeout) > > FreeBSD 6.2-PRERELEASE SMP amd64. > > I have access to both IPs - 192.168.13.12 is http balancer and > 192.168.13.3 is apache server (both were restarted) > Maybe I'm wrong, but it looks like if your server didn't close() its connection for the socket. In that case the server will not send the FIN segment and the client will not receive it and than will not send the ACK segment to the server. AFAIK in the Berkeley implementation it should be 11 min timeout for the client's connection and never (with possible descriptor exhaustion) for the server' in this situation. > -- > Best Wishes, > Stefan Lambrev > ICQ# 24134177 > wbr, pluknet