Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 92160 invoked from network); 22 Nov 2006 01:12:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Nov 2006 01:12:14 -0000 Received: (qmail 51607 invoked by uid 500); 22 Nov 2006 01:12:24 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 51469 invoked by uid 500); 22 Nov 2006 01:12:23 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 51458 invoked by uid 99); 22 Nov 2006 01:12:23 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Nov 2006 17:12:23 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of trustin@gmail.com designates 66.249.82.226 as permitted sender) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Nov 2006 17:12:11 -0800 Received: by wx-out-0506.google.com with SMTP id h27so56294wxd for ; Tue, 21 Nov 2006 17:11:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Pa8iDhffAZy5LXy7fv3X1T2O6JNCavu3l7RvQXwbClqlgYHkXPEWOF9cfZ1mxK5C3w40E9CSrW4DGKHfPlZR6Oar2z5N5oA48IaaDNbYPdos7eo14nkmwJSRlINYXq+G6fm95gxN6e18MBz6tMmEME17WZdzcY8IuRchL3AOWtk= Received: by 10.70.61.1 with SMTP id j1mr2140655wxa.1164157910601; Tue, 21 Nov 2006 17:11:50 -0800 (PST) Received: by 10.35.62.18 with HTTP; Tue, 21 Nov 2006 17:11:50 -0800 (PST) Message-ID: <768dcb2e0611211711m5a3327b0r3f2316e8e2431487@mail.gmail.com> Date: Wed, 22 Nov 2006 10:11:50 +0900 From: "Trustin Lee" To: "Apache Directory Developers List" Subject: Re: Warning: serious VM leak/bug with BlockingQueue & polling timeouts In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_72939_13644346.1164157910466" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_72939_13644346.1164157910466 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/22/06, Holger Hoffstaette wrote: > > > Here's a heads up for those of you who have the source handy to check. > > Both JDK 1.5 and 1.6 have serious confirmed bugs that leak unreclaimable > memory and will bring *idle* servers down, e.g. during the night or over > the weekend when load is low or nonexistent. For more information see > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6460501 and related. > > In a nutshell BlockingQueue.poll(duration, TimeUnit) will leak *when that > wait times out*; it will not leak when something is returned from the > queue, as is the case with uninterrupted non-timed polling. > > The bug is confirmed and serious because it triggers extremely nasty GC > panic that has the potential to bring the whole machine down due to > excessive CPU spinning and unresponsiveness of the VM to external signals. > > I think it would be good if someone with the source would do a quick "find > all references to method" to see if and how Mina is affected by this. I > would not be surprised if this is the reason behind some reported leaks - > polling with timeout is extremely useful for service scheduling in various > forms and generally preferrable to complete blocking. Wow, this is shocking. Even Doug Lea and his co-workers make a mistake! :) I think the reason why this bug is found so late is because most people doesn't specify the polling timeout like we didn't for MINA. Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6 ------=_Part_72939_13644346.1164157910466 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/22/06, Holger Hoffstaette <holger@wizards.de> wrote:

Here's a heads up for those of you who have the source handy to check.

Both JDK 1.5 and 1.6 have serious confirmed bugs that leak unreclaimable
memory and will bring *idle* servers down, e.g. during the night or over
the weekend when load is low or nonexistent. For more information see
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6460501 and related.

In a nutshell BlockingQueue.poll(duration, TimeUnit) will leak *when that
wait times out*; it will not leak when something is returned from the
queue, as is the case with uninterrupted non-timed polling.

The bug is confirmed and serious because it triggers extremely nasty GC
panic that has the potential to bring the whole machine down due to
excessive CPU spinning and unresponsiveness of the VM to external signals.

I think it would be good if someone with the source would do a quick "find
all references to method" to see if and how Mina is affected by this. I
would not be surprised if this is the reason behind some reported leaks -
polling with timeout is extremely useful for service scheduling in various
forms and generally preferrable to complete blocking.

Wow, this is shocking.  Even Doug Lea and his co-workers make a mistake! :)  I think the reason why this bug is found so late is because most people doesn't specify the polling timeout like we didn't for MINA.

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6 ------=_Part_72939_13644346.1164157910466--