You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Will Glass-Husain <wg...@gmail.com> on 2010/06/01 21:01:58 UTC

Out of Memory exception (hotspot compilation)

Hi,

I noticed in recent emails that Leon Kolchinsky was running Tomcat and Java
requested 2GB of memory unexpectedly then died due to an out of memory
exception.

Bizarrely, the same thing happened to me today with very similar symptoms.
Specifically, the JVM requested 8GB of memory while hotspot was trying to
compile the exact same Velocity/Foreach method as Leon's example.  I'm
running 64 bit JDK 1.6.0_18-b07 / Tomcat 6.0.24 / APR 1.1.19.

I wanted to highlight this, (someone was talking about posting a bug
report).  Since it's the exact same method, I'm guessing the Velocity method
triggers a bug in the hotspot compilation.  Note that we've been running
this configuration for 5 months and I haven't seen this previously, so it's
probably rare.

Excerpt from hs_err

--
java.lang.OutOfMemoryError: requested 8589934608 bytes for Chunk::new. Out
of swap space?

Current thread (0x000000005449c800):  JavaThread "CompilerThread0" daemon
[_thread_in_native, id=25458, stack(0x00000000
40638000,0x0000000040739000)]

Current CompileTask:
C2:2532  !
org.apache.velocity.runtime.directive.Foreach.render(Lorg/apache/velocity/context/InternalContextAdapter;Ljava/io/Writer;Lorg/apache/velocity/runtime/p
arser/node/Node;)Z (529 bytes)
---

[root@main ~]# uname -a
Linux main 2.6.18-164.9.1.el5 #1 SMP Wed Dec 9 03:27:37 EST 2009 x86_64
x86_64 x86_64 GNU/Linux

--

CATALINA_OPTS="-Djava.awt.headless=true "$CATALINA_OPTS
CATALINA_OPTS="-Xmx6G "$CATALINA_OPTS
CATALINA_OPTS="-Xms500M "$CATALINA_OPTS
CATALINA_OPTS="-server "$CATALINA_OPTS
CATALINA_OPTS="-XX:PermSize=50M -XX:MaxPermSize=100M "$CATALINA_OPTS
CATALINA_OPTS="-XX:+UseParallelOldGC "$CATALINA_OPTS
CATALINA_OPTS="-XX:ThreadStackSize=512 "$CATALINA_OPTS

WILL

Re: Out of Memory exception (hotspot compilation)

Posted by Leon Kolchinsky <lk...@gmail.com>.
Hello,

Just wanted to update on this issue.
Atlassian support confirms that this is a known issue with Java 6.0_18 and
up.
So, the best solution for now is to use 6.0_17
Here - http://jira.atlassian.com/browse/CONF-19049<http://jira.atlassian.com/browse/CONF-19049?focusedCommentId=197013#action_197013>

Regards,
Leon Kolchinsky


On Thu, Jun 3, 2010 at 16:14, Leon Rosenberg <ro...@gmail.com>wrote:

> On Thu, Jun 3, 2010 at 1:54 AM, Leon Kolchinsky <lk...@gmail.com>
> wrote:
> > Yep :)
> > You're right Charles.
> >
> > Thanks,
> > Leon
>
> From Leon To Leon,
> an advice from personal experience and the golden rule of the tomcat
> user list, write it down in glowing red letters on the wall you are
> looking at most:
> Charles is ALWAYS right. ;-)
>
> regards
> Leon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Out of Memory exception (hotspot compilation)

Posted by Leon Rosenberg <ro...@gmail.com>.
On Thu, Jun 3, 2010 at 1:54 AM, Leon Kolchinsky <lk...@gmail.com> wrote:
> Yep :)
> You're right Charles.
>
> Thanks,
> Leon

>From Leon To Leon,
an advice from personal experience and the golden rule of the tomcat
user list, write it down in glowing red letters on the wall you are
looking at most:
Charles is ALWAYS right. ;-)

regards
Leon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Out of Memory exception (hotspot compilation)

Posted by Leon Kolchinsky <lk...@gmail.com>.
Yep :)
You're right Charles.

Thanks,
Leon

On Wed, Jun 2, 2010 at 16:27, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Leon Kolchinsky [mailto:lkolchin@gmail.com]
> > Subject: Re: Out of Memory exception (hotspot compilation)
> >
> > I'd like to file a bug report on similar issue I had.
> > Can you please tell me where can I do it?
>
> Let's see what your original post had in it...
>
> > > Yesterday I've got this error in catalina.out and Tomcat died
> > > (I'm attaching hs_err_pid5460.log file):
> > > #
> > > # A fatal error has been detected by the Java Runtime Environment:
> > > #
> > > # java.lang.OutOfMemoryError: requested 2147483664 bytes for
> Chunk::new.
> > > Out of swap space?
> > > #
> > > #  Internal Error (allocation.cpp:215), pid=5460, tid=1085901120
> > > #  Error: Chunk::new
> > > #
> > > # JRE version: 6.0_18-b07
> > > # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode
> > > linux-amd64 )
> > > # An error report file with more information is saved as:
> > > # /tmp/hs_err_pid5460.log
> > > #
> > > # If you would like to submit a bug report, please visit:
> > > #   http://java.sun.com/webapps/bugreport/crash.jsp
>
> Does that give you a hint?
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Out of Memory exception (hotspot compilation)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Leon Kolchinsky [mailto:lkolchin@gmail.com]
> Subject: Re: Out of Memory exception (hotspot compilation)
> 
> I'd like to file a bug report on similar issue I had.
> Can you please tell me where can I do it?

Let's see what your original post had in it...

> > Yesterday I've got this error in catalina.out and Tomcat died 
> > (I'm attaching hs_err_pid5460.log file):
> > #
> > # A fatal error has been detected by the Java Runtime Environment:
> > #
> > # java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new.
> > Out of swap space?
> > #
> > #  Internal Error (allocation.cpp:215), pid=5460, tid=1085901120
> > #  Error: Chunk::new
> > #
> > # JRE version: 6.0_18-b07
> > # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode 
> > linux-amd64 )
> > # An error report file with more information is saved as:
> > # /tmp/hs_err_pid5460.log
> > #
> > # If you would like to submit a bug report, please visit:
> > #   http://java.sun.com/webapps/bugreport/crash.jsp

Does that give you a hint?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Out of Memory exception (hotspot compilation)

Posted by Leon Kolchinsky <lk...@gmail.com>.
Hmm,

I'd like to file a bug report on similar issue I had.
Can you please tell me where can I do it?


Cheers,
Leon

On Wed, Jun 2, 2010 at 06:46, Will Glass-Husain <wg...@gmail.com>wrote:

> The JDK has been the same since early February.  I don't think there's been
> any other system upgrades.  (it's possible there was a upgrade to the OS
> I'm
> not aware of, but definitely not the JDK).
>
> WILL
>
> On Tue, Jun 1, 2010 at 12:45 PM, Caldarale, Charles R <
> Chuck.Caldarale@unisys.com> wrote:
>
> > > From: Will Glass-Husain [mailto:wglasshusain@gmail.com]
> > > Subject: Out of Memory exception (hotspot compilation)
> > >
> > > Specifically, the JVM requested 8GB of memory while hotspot was
> > > trying to compile the exact same Velocity/Foreach method as Leon's
> > > example.  I'm running 64 bit JDK 1.6.0_18-b07
> >
> > > Since it's the exact same method, I'm guessing the Velocity method
> > > triggers a bug in the hotspot compilation.  Note that we've been
> > > running this configuration for 5 months
> >
> > Using the same JDK for those 5 months, or did you recently upgrade?
> >
> >  - Chuck
> >
> >
> > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> > MATERIAL and is thus for use only by the intended recipient. If you
> received
> > this in error, please contact the sender and delete the e-mail and its
> > attachments from all computers.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

Re: Out of Memory exception (hotspot compilation)

Posted by Will Glass-Husain <wg...@gmail.com>.
The JDK has been the same since early February.  I don't think there's been
any other system upgrades.  (it's possible there was a upgrade to the OS I'm
not aware of, but definitely not the JDK).

WILL

On Tue, Jun 1, 2010 at 12:45 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Will Glass-Husain [mailto:wglasshusain@gmail.com]
> > Subject: Out of Memory exception (hotspot compilation)
> >
> > Specifically, the JVM requested 8GB of memory while hotspot was
> > trying to compile the exact same Velocity/Foreach method as Leon's
> > example.  I'm running 64 bit JDK 1.6.0_18-b07
>
> > Since it's the exact same method, I'm guessing the Velocity method
> > triggers a bug in the hotspot compilation.  Note that we've been
> > running this configuration for 5 months
>
> Using the same JDK for those 5 months, or did you recently upgrade?
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Out of Memory exception (hotspot compilation)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Will Glass-Husain [mailto:wglasshusain@gmail.com]
> Subject: Out of Memory exception (hotspot compilation)
> 
> Specifically, the JVM requested 8GB of memory while hotspot was 
> trying to compile the exact same Velocity/Foreach method as Leon's
> example.  I'm running 64 bit JDK 1.6.0_18-b07

> Since it's the exact same method, I'm guessing the Velocity method
> triggers a bug in the hotspot compilation.  Note that we've been
> running this configuration for 5 months

Using the same JDK for those 5 months, or did you recently upgrade?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org