Refer to Incident Manager Report # 192388:
When dealing with a reasonably large application, the JVM can take an
hour or more to provide a heap dump when requested. Further, the JVM
remains unresponsive for an indeterminate amount of time after the JVMPI
client has finished operations with the heap dump -- leaving the Java
application unresponsive for hours.
Environment:
The problems do not seem specific to OS version or VM -- Solaris 7/8/9
have been tried with JDK 1.3.1_08, 1.4.0_03, 1.4.1_02, and 1.4.2.
How to repeat:
1) Attached is a class called HeapThrasher -- save it and compile it.
2) Run the application on Solaris using a 1.3.1 or newer JVM and the
following command line (current structures in the application will
require a 512MB heap -- see the source code if you intend to adjust the
heap size):
java -Xrunhprof:heap=all -Xms512M -Xmx512M HeapThrasher
3) Wait for the application to 'settle' -- eventually it will print a
message every 15 seconds reporting heap size. Let the application run
for another hour or so (it will churn away, allocating and releasing
objects).
4) Request a heap dump -- send the process a SIGQUIT
The amount of time it takes to generate a dump does not directly relate
to the size of the heap -- the attached application will take upwards of
30 minutes to generate a heap dump and continue processing. Application
servers that have been running for a day or more may take hours with a
heap size a quarter that of the attached application.
When dealing with a reasonably large application, the JVM can take an
hour or more to provide a heap dump when requested. Further, the JVM
remains unresponsive for an indeterminate amount of time after the JVMPI
client has finished operations with the heap dump -- leaving the Java
application unresponsive for hours.
Environment:
The problems do not seem specific to OS version or VM -- Solaris 7/8/9
have been tried with JDK 1.3.1_08, 1.4.0_03, 1.4.1_02, and 1.4.2.
How to repeat:
1) Attached is a class called HeapThrasher -- save it and compile it.
2) Run the application on Solaris using a 1.3.1 or newer JVM and the
following command line (current structures in the application will
require a 512MB heap -- see the source code if you intend to adjust the
heap size):
java -Xrunhprof:heap=all -Xms512M -Xmx512M HeapThrasher
3) Wait for the application to 'settle' -- eventually it will print a
message every 15 seconds reporting heap size. Let the application run
for another hour or so (it will churn away, allocating and releasing
objects).
4) Request a heap dump -- send the process a SIGQUIT
The amount of time it takes to generate a dump does not directly relate
to the size of the heap -- the attached application will take upwards of
30 minutes to generate a heap dump and continue processing. Application
servers that have been running for a day or more may take hours with a
heap size a quarter that of the attached application.
- duplicates
-
JDK-4985509 JVMs on Solaris take a very long time to produce heap dumps and remain unrespons
-
- Closed
-
- relates to
-
JDK-5032216 NEWHPROF: performance issue with -Xrunhprof (HeapThrasher testcase)
-
- Resolved
-