2013-11-22 45 views
1

我通过以下异常应用(桌面应用程序)在JVM崩溃hs_err_pidXXXX.log文件被创建。但HPROF文件不产生

java.lang.OutOfMemoryError: requested 4096000 bytes for GrET in C:\BUILD_AREA\jdk6_12\hotspot\src\share\vm\utilities\growableArray.cpp. Out of swap space? 

哪些是对上述错误的可能原因。

这里是一个被设置

VM变量的JVM参数:

jvm_args:-Dsun.net.inetaddr.ttl = 10 vfprintf出口中止-Xms5242880 -Xmx1711276032 -XX:新尺寸= 2621440 -XX :MaxNewSize = 855638016 -XX:+ HeapDumpOnOutOfMemoryError -Dsun.rmi.dgc.server.gcInterval = 60000 -Dsun.rmi.dgc.client.gcInterval = 60000 -Djava.security.properties = wigan.java.security -Xss512K

---------------系统---------------

Ø S:Windows NT 6.1 Build 7601 Service Pack 1

CPU:共计24个(每个cpu 16个内核,每个内核2个线程)系列6模型13步进7,cmov,cx8,fxsr,mmx,sse,sse2,sse3, SSSE3,HT

内存:4K页,物理4194303k(4194303k免费),交换4194303k(4194303k免费)

vm_info:Java的热点(TM)服务器VM(11.2-B01)的Windows-x86的JRE(1.6使用MS VC++ 7.1创建“java_re”2009年1月17日09:52:33构建于2007年1月17日09:52:33我为jvm参数添加了-XX:+ HeapDumpOnOutOfMemoryError,但它并未转储堆,我从来没有找到任何。 hprof文件。为什么?

是它必须放的是有史以来hs_err_pidXXXX.log文件中创建HPROF文件时,也创造?

回答

2

当OutOfMemoryError错误是伴随着“交换空间?”尝试在本机级别分配资源时发生错误。在你的情况下,它似乎是一个内部的C++程序未能分配所需的内存。这似乎可以解释为什么不创建堆转储的原因:在本机级别失败当虚拟机的内置错误处理可能不会有机会接管 - 而不是错误的Java的水平,就像跑出来的(Java的)堆空间。

默认情况下,Windows NT的用户空间为2GB,因为你的Java堆已经1,7GB没有留给非堆内存太多余量和您的应用程序似乎撞到天花板那里。

有两两件事你可以尝试修复错误:

  • 减少你的XMX允许更多的非堆内存
  • 尝试设置/ 3GB启动参数(不知道阉这是受支持在您的Windows版本),以降低系统空间为1GB,因此提高了操作空间3GB
+0

你能否建议Xmx的大小要减小。谢谢。 – Chandana

+0

这真的取决于你的应用程序 - 你可以从“-Xmx 1024m”开始,如果你的堆空间用完了,就增加一点。 –

2

报价Memory Analyzer wiki

Heap dumps are not written on OutOfMemoryError for the following reasons:

  • Application creates and throws OutOfMemoryError on its own
  • Another resource like threads per process is exhausted
  • C heap is exhausted

As for the C heap, the best way to see that you won't get a heap dump is if it happens in C code (eArray.cpp in the example below):

# An unexpected error has been detected by SAP Java Virtual Machine: 
# java.lang.OutOfMemoryError: requested 2048000 bytes for eArray.cpp:80: GrET*. Out of swap space or heap resource limit exceeded (check with limits or ulimit)? 
# Internal Error (\\...\hotspot\src\share\vm\memory\allocation.inline.hpp, 26), pid=6000, tid=468 

C heap problems may arise for different reasons, e.g. out of swap space situations, process limits exhaustion or just address space limitations, e.g. heavy fragmentation or just the depletion of it on machines with limited address space like 32 bit machines. The hs_err-file will help you with more information on this type of error. Java heap dumps wouldn't be of any help, anyways.

Also please note that a heap dump is written only on the first OutOfMemoryError. If the application chooses to catch it and continues to run, the next OutOfMemoryError will never cause a heap dump to be written!

如果创建了一个.hprof,它会一直这么说,在错误信息的时间。请注意,在Windows上,该文件不会位于应用程序文件夹中,而是位于临时文件夹或Dr. Watson安装文件夹中。

但是,由于“脱离交换空间”被明确列为不写入堆转储的原因,我认为这就是发生的情况。

相关问题