JIRA JVM crashes with SIGSEGV in libc.so while looking up IPv6 address
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
- JIRA node was crashing again and again.
- The Java process is not running and it was not shut down manually.
Files with names like
hs_err_pidxxxxx.log
being created in the app server'sbin
directory, containing text such as the below:# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xfe9bb960, pid=xxxxx, tid=xx
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_01-b08 mixed mode)
# Problematic frame:
# V [libjvm.so+0x1bb960]
#
--------------- T H R E A D ---------------
Current thread (0x01a770e0): JavaThread "JiraQuartzScheduler_Worker-1" [_thread_in_vm, id=17]
siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000000
This indicates Java is crashing.
Cause
A Java virtual machine crash is analogous to getting a Windows Blue Screen of Death when using MS Office or a web browser. That said, JVM bugs causing crashes often appear when the JVM is running out of memory. There can be many reasons for JVM crash, please refer to Java Crashes page and follow the suggestions.
For this specific issue where JVM is crashing because of IPv6 lookup following appears in the hs_err_pid*.log
crash log
Stack: [0x00007f883adb0000,0x00007f883aeb1000], sp=0x00007f883aeaae60, free space=1003k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libc.so.6+0xe5ef1] gaih_inet.constprop.8+0x631
C [libc.so.6+0xe7704] getaddrinfo+0x124
C [libnet.so+0x5ec6] Java_java_net_Inet6AddressImpl_lookupAllHostAddr+0x96
J 181088 java.net.Inet6AddressImpl.lookupAllHostAddr(Ljava/lang/String;)[Ljava/net/InetAddress; java.base@11.0.13 (0 bytes) @ 0x00007f8d0e48050f [0x00007f8d0e480440+0x00000000000000cf]
J 186081 c1 java.net.InetAddress.getAddressesFromNameService(Ljava/lang/String;Ljava/net/InetAddress;)[Ljava/net/InetAddress; java.base@11.0.13 (172 bytes) @ 0x00007f8cf5e9a914 [0x00007f8cf5e9a820+0x00000000000000f4]
J 180645 c1 java.net.InetAddress$NameServiceAddresses.get()[Ljava/net/InetAddress; java.base@11.0.13 (209 bytes) @ 0x00007f8ce8172c14 [0x00007f8ce8172800+0x0000000000000414]
Solution
- Set the following parameter on JIRA startup. This JVM parameter would force IPv4 lookup instead of IPv6.
-Djava.net.preferIPv4Stack=true
- Restart JIRA