简体   繁体   中英

How to force Garbage Collection related Heap Dump in Websphere?

I am having a problem with my Java EE application where I am seeing a heap dump now and then in production environment which uses WebSphere application server. This dump is occurring at some random time in a class where it uses the PDF generation library that uses a DLL file to generate some reports. This is also causing the JVM to restart automatically.

Looking at the dump files and native_stderr.log, it seems that there was problem with Garbage collection at the same time. There are errors like:

reason="insufficient time being spent in gc" gctimepercent="1" 

Also, the segmentation fault error looks like:

 Unhandled exception Type=Segmentation error vmState=0x00000000
J9Generic_Signal_Number=00000004 ExceptionCode=c0000005 ExceptionAddress=7F030F32 ContextFlags=0001003f
Handler1=7F040D90 Handler2=7F0E7D70 InaccessibleAddress=35A13000
EDI=0CD776C8 ESI=35A13000 EAX=0004AEF8 EBX=24DB5500
ECX=00009FC6 EDX=0004AEF8
EIP=7F030F32 ESP=2C14FD5C EBP=2C14FDC4
Module=E:\u01\was61\java\jre\bin\j9vm23.dll
Module_base_address=7F020000 Offset_in_DLL=00010f32
Target=2_30_20090224_30451_lHdSMr (Windows Server 2003 5.2 build 3790 Service Pack 2)
CPU=x86 (4 logical CPUs) (0x1fff37000 RAM)
JVMDUMP006I Processing Dump Event "gpf", detail "" - Please Wait.
JVMDUMP007I JVM Requesting System Dump using 'E:\data\servers\MyApp\workdir\core.20120103.101629.9812.0001.dmp'
JVMDUMP010I System Dump written to E:\data\servers\MyApp\workdir\core.20120103.101629.9812.0001.dmp
JVMDUMP007I JVM Requesting Snap Dump using 'E:\data\servers\MyApp\workdir\Snap.20120103.101629.9812.0002.trc'
JVMDUMP010I Snap Dump written to E:\data\servers\MyApp\workdir\Snap.20120103.101629.9812.0002.trc
JVMDUMP007I JVM Requesting Java Dump using 'E:\data\servers\MyApp\workdir\javacore.20120103.101629.9812.0003.txt'
JVMDUMP010I Java Dump written to E:\data\servers\MyApp\workdir\javacore.20120103.101629.9812.0003.txt
JVMDUMP013I Processed Dump Event "gpf", detail "".

The heap dump says that the cause of the dump was "gpf" and talks about Segmentation Fault.

I am trying to reproduce the same in my local environment without any success. What I am trying to do is force some kind of frequent Garbage collection by setting some parameters while I try to generate the report. What are the weird parameters that I can set in the Websphere Admin Console so that it does GC more often?

The GC issue (not enough time in GC) is a red herring. It just means your heap is bigger than it needs to be, and the JVM will likely decrease that number.

However, the GPF is serious - it's an internal JVM crash. Please update to the latest service level of your IBM Java 5 JVM (you're running an old version) and if that doesn't fix it, report the issue to IBM support.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM