From owner-freebsd-questions@FreeBSD.ORG Wed Jun 18 17:21:07 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC164106567A for ; Wed, 18 Jun 2008 17:21:07 +0000 (UTC) (envelope-from freebsd-questions@transip.nl) Received: from relay0.transip.nl (relay0.transip.nl [80.69.67.21]) by mx1.freebsd.org (Postfix) with ESMTP id 6B9468FC2D for ; Wed, 18 Jun 2008 17:21:07 +0000 (UTC) (envelope-from freebsd-questions@transip.nl) Received: from [192.168.0.3] (ip86-50-212-87.adsl2.versatel.nl [87.212.50.86]) by relay0.transip.nl (Postfix) with ESMTP id E1E51103E17; Wed, 18 Jun 2008 19:21:03 +0200 (CEST) Message-ID: <485943FC.5060807@transip.nl> Date: Wed, 18 Jun 2008 19:21:00 +0200 From: Ali Niknam Organization: Transip BV User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Wojciech Puchar References: <4859197A.8040203@transip.nl> <20080618164345.B34431@wojtek.tensor.gdynia.pl> In-Reply-To: <20080618164345.B34431@wojtek.tensor.gdynia.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Sockets stuck in CLOSED state... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2008 17:21:07 -0000 Wojciech Puchar wrote: > #define socket TEST_SOCKET <...> > and write one .c program where all these TEST_* functions are defined, > doing the same as original PLUS logging to file. > > after a while (when you see this closed/unclosed connections) stop it > and look at logs. > Thank you for the suggestions. I had considered that myself, however the server is doing about 300 DNS queries per second, so that's not easy to log. And even if it is logged you have sooo much information that it's nearly impossible to comprehend it. The thing is that the problem does not occur always; the same ip can connect and do queries for thousands of times before 1 connection gets stuck. To give you an idea: after about 24 hours (so that's about 26 million queries) I get about 10 stuck connections. > i'm almost sure you will notice where is a problem. > possibly threads implementation changed... I can imagine; still, as far as I know, it should not be possible to be stuck in "CLOSED"...