From owner-freebsd-questions Sat Aug 10 9:29:14 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E65B37B400 for ; Sat, 10 Aug 2002 09:29:12 -0700 (PDT) Received: from sub21-156.member.dsl-only.net (sub21-156.member.dsl-only.net [63.105.21.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51E7543E70 for ; Sat, 10 Aug 2002 09:29:11 -0700 (PDT) (envelope-from nkinkade@dsl-only.net) Received: from sub21-156.member.dsl-only.net (freebsd.localhost.localdomain [127.0.0.1]) by sub21-156.member.dsl-only.net (8.12.5/8.12.4) with SMTP id g7AGTu8U021444; Sat, 10 Aug 2002 09:29:56 -0700 (PDT) (envelope-from nkinkade@dsl-only.net) Date: Sat, 10 Aug 2002 09:29:51 -0700 From: Nathan Kinkade To: freebsd-questions@FreeBSD.ORG Cc: Ruben de Groot Subject: Re: kill active tcp connection w/no controlling process? Message-Id: <20020810092951.004f0df8.nkinkade@dsl-only.net> In-Reply-To: <20020810102455.GA77683@ei.bzerk.org> References: <20020809170018.2546181c.nkinkade@dsl-only.net> <20020810102455.GA77683@ei.bzerk.org> X-Mailer: Sylpheed version 0.7.8claws (GTK+ 1.2.10; i386-portbld-freebsd4.6) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 10 Aug 2002 12:24:55 +0200 Ruben de Groot wrote: > On Fri, Aug 09, 2002 at 05:00:18PM -0700, Nathan Kinkade typed: > > A few minutes ago I noticed the activity lights on my switch were > > blinking like mad. I knew that there was nothing I was doing that > > should cause the network activity, so I checked my processes to see > > if someone had connected to my httpd/ftpd and was downloading > > something. Nothing there. So I ran a `netstat -f inet` and saw that > > there was a TCP connection to cookies.cmpnet.com in the FIN_WAIT_1 > > state. I launched a program from ports called "trafshow" and saw > > that my machine was actively transfering data with > > cookies.cmpnet.com, so I checked netstat again, but still only one > > connection to cookies.cmpnet.com in the FIN_WAIT_1 state. This > > network activity went on for about 5 minutes on my DSL connection - > > many megabytes must have been transfered. I've since found that it > > appears to be something related to Opera, but even killing Opera > > didn't kill the rogue TCP connection. This brings me to my > > question: is there any way, through a shell, to kill a socket that > > apparently has no proccess associated with it?...It seems that this > > scenario should never happen? I can reproduce this problem simply > > by reloading the questionable page in Opera. Any ideas, thoughts? > > By the way I'm running 4.6 Stable cvsuped and built about a week ago > > -also, Opera for Linux v6.01. > > Use sockstat(1) to see what process is connected. Kill that process. Didn't I read somewhere that sockstat was essentially a wrapper for netstat? In any case, I did try sockstat, but it didn't show a connection at all. That's the strange thing, there doesn't appear to be an associated process that is viewable with `ps` or `netstat` or `sockstat`. Also, `sockstat` would not show the connection at all, while `netstat` did. Is this possibly because the connection was in a FIN_WAIT_1 state? The problem seems to be triggered by Opera, but even killing every process associated with Opera does not kill the connection. Nay, killing everything save X and the standard processes still does not get rid of the connection - it just keeps transferring data. Is this a bug? Nathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message