[jboss-jira] [JBoss JIRA] Commented: (JGRP-1180) OutOfMemoryError
Peter Kormos (JIRA)
jira-events at lists.jboss.org
Thu Apr 1 03:03:37 EDT 2010
[ https://jira.jboss.org/jira/browse/JGRP-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12523311#action_12523311 ]
Peter Kormos commented on JGRP-1180:
------------------------------------
{quote}
8 MB of heap, you gotta be kidding ?
{quote}
I wanted to let the program crash soon and not to "wait forever"
As I wrote - even with 8M heap - the program doesn't always crash. Let's say, 2 times out of 3 it doesn't but it's completely unpredictable. But no matter what the heap size is, what about the number of message instances in memory?
> OutOfMemoryError
> ----------------
>
> Key: JGRP-1180
> URL: https://jira.jboss.org/jira/browse/JGRP-1180
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 2.8
> Environment: 2.8.0.GA
> Reporter: Peter Kormos
> Assignee: Bela Ban
>
> Hi Guys,
> I wrote a simple program.
> public testbed() throws Exception
> {
> JChannel channel = new JChannel();
> channel.connect("channelName");
> for (int i = 0; i < 100000000; i++)
> {
> Message msg = new Message(
> null,
> null,
> "Test");
> channel.send(msg);
> // Thread.sleep(10);
> if (i % 1000 == 0)
> System.out.print(".");
> }
> }
> When I run it with
> java -Xmx8m -XX:+HeapDumpOnOutOfMemoryError -cp .;jgroups-all.jar testbed
> not always, but quite often it dies with OutOfMemoryError
> When I look at the heap dump with jhat, for "Instance Counts" it tells me
> 22036 instances of class org.jgroups.Message
> 22036 instances of class org.jgroups.protocols.pbcast.NakAckHeader
> 22036 instances of class org.jgroups.util.Headers
> 21316 instances of class org.jgroups.Event
> 21314 instances of class org.jgroups.util.Queue$Element
> 304 instances of class org.jgroups.util.UUID
> Why are there so many message objects stuck in memory?
> java org.jgroups.Version prints
> Version: 2.8.0.GA
> CVS: $Id: Version.java,v 1.81 2009/12/01 10:31:13 belaban Exp $
> I'm using Windows Xp with 1.6 JDK
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list