You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Trustin Lee <tr...@gmail.com> on 2006/11/23 03:08:04 UTC

Fwd: Warning: serious VM leak/bug with BlockingQueue & polling timeouts

Just a heads-up though MINA isn't using the mentioned method.

HTH,
Trustin
---------- Forwarded message ----------
From: Holger Hoffstaette <ho...@wizards.de>
Date: Nov 23, 2006 1:30 AM
Subject: Warning: serious VM leak/bug with BlockingQueue & polling timeouts
To: dev@directory.apache.org

[sorry if this is a duplicate - the first one did not seem to make it?]

Here's a heads up for those of you who have the Mina 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.

hope this helps :)
Holger




-- 
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