Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 28622 invoked from network); 19 Jun 2008 21:44:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2008 21:44:56 -0000 Received: (qmail 21410 invoked by uid 500); 19 Jun 2008 21:44:58 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 21067 invoked by uid 500); 19 Jun 2008 21:44:57 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 21056 invoked by uid 99); 19 Jun 2008 21:44:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 14:44:57 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [217.150.250.44] (HELO ok2consulting.nine.ch) (217.150.250.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 21:44:07 +0000 Received: by ok2consulting.nine.ch (Postfix, from userid 1002) id 1C69E1981FF; Thu, 19 Jun 2008 23:44:24 +0200 (CEST) Received: from Macintosh.local (84-75-129-240.dclient.hispeed.ch [84.75.129.240]) by ok2consulting.nine.ch (Postfix) with ESMTP id 8026C1980DC for ; Thu, 19 Jun 2008 23:44:23 +0200 (CEST) Message-ID: <485AD337.5000709@apache.org> Date: Thu, 19 Jun 2008 23:44:23 +0200 From: Oleg Kalnichevski User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: HttpClient User Discussion Subject: Re: DefaultHttpClientConnection.isOpen(); References: <1f3854d50806181358tad912b0i6eb1f4fde38caa4c@mail.gmail.com> <1213826563.6038.7.camel@ubuntu> <1f3854d50806182313j245122c2ie615ce7259653273@mail.gmail.com> In-Reply-To: <1f3854d50806182313j245122c2ie615ce7259653273@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on ok2consulting.nine.ch X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=0.0 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=ham version=3.0.3 Quintin Beukes wrote: > I'm not sure why accessing it from different threads would cause this > to happen? Could you explain this please. > Quintin I am only guessing here. All I am saying HTTP connection objects are not threading safe. The only method one can safely can from a different thread is #shutdown. I would certainly help if you managed to reproduce the problem with a test case. Cheers Oleg > It is definitely a concurrency issue. I am still narrowing them all down. > > thanks, > Q > > On Thu, Jun 19, 2008 at 12:02 AM, Oleg Kalnichevski wrote: >> On Wed, 2008-06-18 at 22:58 +0200, Quintin Beukes wrote: >>> Hey, >>> >>> Is it possible for this method (DefaultHttpClientConnection.isOpen()) >>> to return "true" when the socket is closed. >>> >> If you are not accessing the same connection instance from multiple >> threads, I do not see how this could happen. >> >> Please note only HttpConnection#shutdown method is expected to be >> threading safe. >> >> This sounds like a concurrency issue to me >> >> Oleg >> >>> I have a case where netstat doesn't return ANY open connections to the >>> target server, but isOpen returns true. >>> >>> It's not very easy to reproduce my problem, but I've been able to do >>> it whenever needed by using high concurrency. I'm not sure if isOpen() >>> ever returns true when there is no socket when it seems like my >>> problem isn't there. I've only checked when my problem is occurring, >>> and this seems very odd. >>> >>> Thanks >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org >> For additional commands, e-mail: httpclient-users-help@hc.apache.org >> >> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org