Jira crashes on with EXCEPTION_ACCESS_VIOLATION thrown by tcnative-1.dll library
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Summary
Jira crashes seemingly at random when running on Windows Server.
Environment
Jira Data Center running on Windows Server.
Diagnosis
When Java Crashes, a file like hs_err_pid12345.log
is created in the app server'sbin
directory.
In this error, we see something like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000747e6880, pid=6112, tid=3332
(...)
Current thread (0x000000007697b800): JavaThread "https-openssl-nio-443-exec-6" daemon [_thread_in_native, id=3332, stack(0x000000007cd20000,0x000000007ce20000)]
Stack: [0x000000007cd20000,0x000000007ce20000], sp=0x000000007ce1f170, free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [tcnative-1.dll+0x16880]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 8999 org.apache.tomcat.jni.SSL.freeSSL(J)V (0 bytes) @ 0x0000000019eae361 [0x0000000019eae320+0x0000000000000041]
J 131806 c2 org.apache.tomcat.util.net.openssl.OpenSSLEngine.wrap([Ljava/nio/ByteBuffer;IILjava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult; (492 bytes) @ 0x00000000221b9c98 [0x00000000221b9800+0x0000000000000498]
J 549118 c2 org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doClose()V (318 bytes) @ 0x000000001c29395c [0x000000001c293660+0x00000000000002fc]
J 618997 c2 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun()V (593 bytes) @ 0x0000000024d14cf4 [0x0000000024d14760+0x0000000000000594]
J 108857% c2 org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(Lorg/apache/tomcat/util/threads/ThreadPoolExecutor$Worker;)V (187 bytes) @ 0x00000000204b4d74 [0x00000000204b4b40+0x0000000000000234]
j org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run()V+5
j org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run()V+4
j java.lang.Thread.run()V+11 java.base@11.0.19
v ~StubRoutines::call_stub
Cause
An EXCEPTION_ACCESS_VIOLATION is thrown by the Open SSL engine, which is implemented by the tcnative-1.dll
library referenced in the crash.
Solution
We can use Java Secure Socket Extension (JSSE) instead of OpenSSL:
Open the server.xml file. Its default path looks likeC:\Program Files\Atlassian\JIRA\conf\server.xml
In the connector, add the parameter sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation".
The connector will look like this:
1 2 3 4 5
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true" bindOnInit="false" sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation"/>
Restart Jira.
For more detail on the Apache Tomcat connector configuration, please check Apache Tomcat 8 Configuration Reference.
Was this helpful?