Tomcat is crashing unexpectedly randomly with hs_err file generated.
A fatal error has been detected by the Java Runtime Environment:
Internal Error (safepoint.cpp:687), pid=14568, tid=0x0000000000002edc
fatal error: Deadlock in safepoint code. Should have called back to the VM before blocking.
JRE version: Java(TM) SE Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)
Java VM: Java HotSpot(TM) 64-Bit Server VM (25.181-b13 mixed mode windows-amd64 compressed oops)
Failed to write core dump. Minidump has been disabled from the command line
A week ago we were getting Invalid Cert Authority Warning on chrome, so the devOps team updated some ports and SSL configurations in server.xml including:
- --> changed to shutdown="SECURITY" <Connector port="80" protocol="HTTP/1.1" --> redirectPort="443" changed to 8443
- <Connector port="8080" protocol="HTTP/1.1" --> redirectPort="443" changed to 8443
- <Connector port="443" protocol="HTTP/1.1" --> Port changed from 443 to 8443 and Keystore file also updated.
- Connector protocol="AJP/1.3" --> Port changed from 8009 to 8004
I am not sure which thread is causing the deadlock and why.
I am attaching two hs_err files the crash is internal with different stacktrace. https://drive.google.com/drive/folders/1ieJ6wZKIOVPe-RJexvUNSZUDQ4Us6wzf?usp=sharing
I searched on internet and some suggestions are to update the JDK, I can not update the JDK as our application is old and would start causing compatibility issues.
The code i found from where the error is generating in openJDK https://alvinalexander.com/java/jwarehouse/openjdk-8/hotspot/src/share/vm/runtime/safepoint.cpp.shtml