I have a minor doubt on this article that may need adjusting please. If my own memory hasn't leaked that is!
https://knowledge.broadcom.com/external/article/20405/how-to-generate-a-java-heap-dump-on-outo.htmlOn option 1 it states the dump file will get overwritten; I thought the opposite was true and that it wouldn't write the heap dump if a matching filename was already present.
Example:
C:\>java -Xmx2m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./test.hprof OOM
java.lang.OutOfMemoryError: Java heap space
Dumping heap to ./test.hprof ...
Heap dump file created [2343574 bytes in 0.008 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.base/jdk.internal.misc.Unsafe.allocateUninitializedArray0(Unsafe.java:1276)
at java.base/jdk.internal.misc.Unsafe.allocateUninitializedArray(Unsafe.java:1269)
at java.base/java.lang.invoke.StringConcatFactory$MethodHandleInlineCopyStrategy.newArray(StringConcatFactory.java:1633)
at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
at java.base/java.lang.invoke.LambdaForm$MH/0x0000000100064840.invoke(LambdaForm$MH)
at java.base/java.lang.invoke.Invokers$Holder.linkToTargetMethod(Invokers$Holder)
at OOM.main(OOM.java:5)
C:\>java -Xmx2m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./test.hprof OOM
java.lang.OutOfMemoryError: Java heap space
Dumping heap to ./test.hprof ...
Unable to create ./test.hprof: File exists
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.base/jdk.internal.misc.Unsafe.allocateUninitializedArray0(Unsafe.java:1276)
at java.base/jdk.internal.misc.Unsafe.allocateUninitializedArray(Unsafe.java:1269)
at java.base/java.lang.invoke.StringConcatFactory$MethodHandleInlineCopyStrategy.newArray(StringConcatFactory.java:1633)
at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
at java.base/java.lang.invoke.LambdaForm$MH/0x0000000100064840.invoke(LambdaForm$MH)
at java.base/java.lang.invoke.Invokers$Holder.linkToTargetMethod(Invokers$Holder)
at OOM.main(OOM.java:5)
Note the second time it fails due to: Unable to create ./test.hprof: File exists
It doesn't overwrite.
Original Message:
Sent: 10-05-2020 06:15 AM
From: Suman Pramanik
Subject: Java memory leaking in Clarity 15.7
Increase memory utilization doesn't conclude its a memory leak, the very first step I would recommend is to set up a heap dump and let the app get into out of memory and have us review the heap dump
------------------------------
Thanks & Regards
Suman Pramanik
Sr. Principal Support Engineer | Customer Success & Support, Enterprise Software Division
Broadcom
Original Message:
Sent: 10-05-2020 06:03 AM
From: Karim DIOUF
Subject: Java memory leaking in Clarity 15.7
Hello folks,
We have a issue caused by java memory leaking. We cannot access to our ppm application.
I have incresed the memory of the java vm and restarted the services but we still have the problem.
Any recommandations will be helpful.
Many thnaks in advance.
Regards
Karim