Hi,
JVM crashes with no information about the crash. Here are the details of our applications and environment :
OpenJDK version : 1.8.0_91
AppD Controller : 4.5.10.8362
GC : G1GC
I have already tried the option mentioned here:
But still getting the crashes.
Can some one provide some pointers.
I understand the issue. Usually when JVM crashes without any clear diagnostic information, then it’s not that easy to troubleshoot. That too in some special cases it’s still more difficult like when your setup involves any monitoring tools like AppDynamics combined with the G1GC garbage collector. In your case, the environment is actually running OpenJDK 1.8.0_91 along with AppDynamics Controller 4.5.10 and G1GC enabled. Most commonly, this type of combination will result in introducing few stability concerns. This is because early builds of Java 8 had left with several unresolved issues related to G1GC and agent integrations.
With that said, my first and foremost recommendation would be suggesting you to upgrade to a more recent build of OpenJDK 8, such as 1.8.0_292 or later, where many GC and native memory-related bugs have been addressed. Second, you can always keep the JVM options like -XX:+HeapDumpOnOutOfMemoryError and -XX:ErrorFile=<path> enabled. This will help you with capturing memory dumps and error logs when a crash occurs. This captured log will help you pinpoint the root cause of java.lang.outofmemoryerror when you go through it.
Next, you can review the native memory consumption. Actually crashes can also sometimes be triggered by native memory exhaustion rather than Java heap issues. Suppose if you doubt the issue is caused by an AppDynamics agent, you can check this by temporarily disabling the staging or test environment of AppDynamics agent. This will help you in isolating whether the agent is contributing to the crashes
Collecting and reviewing GC logs and thread dumps priorly can help you pin point the runtime state that led up to the crash. Reviewing thIS captured GC logs and thread dumps will help in revealing signs of memory pressure, thread contention, or in general any other bottlenecks app faces. Suppose if all these steps did not help, you should then raise a support ticket with AppDynamics, along with your JVM configurations, crash logs, and GC settings. This would be a practical next step to get it resolved..
Gathering more diagnostic data will make it easier to investigate this java.lang.outofmemoryerror further and identify a stable resolution path.
Vikas,
1.8.0_91 is extremely old (dating from April 2016) and there are a huge number of bug fixes in the subsequent releases.
Experience shows that JVM crashes of this kind are almost always fixed by upgrading to the latest JVM version, so I would recommend you try that (and make sure to pay attention to Oracle's licensing changes)
Warm regards,
Peter
Hi Peter,
We did upgrade the JDK to version "1.8.0_212" but still the JVM is crashing.
Do you have any other inputs on troubleshooting/fixing this problem.
Also one thing to notice is that some times Instance also restarts when we try to take the thread dump using the agent files.
Regards
Vikas Bhatia
Vikas,
I am beginning to wonder if your scenario is a JVM crash (i.e. the JVM terminated, due to a JVM bug) or a terminal out of memory error due to insifficient headroom in the heap.
For the JVM crash case, you will see a Fatal Error Log. If you have one of these, please share it.
For the out of memory case, you should see one or more java.lang.OutOfMemory exceptions in the application logs. Alternatively, if you see no out of memory exceptions logged, you could double confirm that memory headroom is not the root cause by setting the JVM to heap dump on out of memory and making sure there is no heap dump created.
If you do find a fatal error log, you will need to try and match the symptoms in the log with known JDK bugs. The fix for out of memory would be to increase Xmx to allow additional operating headroom.
Warm regards,
Peter
So I tried with the suggested options. here are the results :
Also i have deployed the application in cloud foundry and cloud foundry also doesn't show the crash reason as out of memory as it should show in case of OOM. But as heap dump is generated, it is giving an indication that OOM is happening but doesn't look like heap.
Suggestions?