-
Bug
-
Resolution: Answered
-
High (View bug fix roadmap)
-
None
-
8.4.2
-
8.04
-
13
-
Severity 3 - Minor
-
1
-
This problem is caused by a bug in the Java runtime: JDK-8214418 HttpClient falls in running with 100% cpu usage after an error signalled on channel (Backported as JDK-8241054)
The fix has been verified to be available in AdoptOpenJDK 11.0.8 - https://github.com/AdoptOpenJDK/openjdk-jdk11u/commit/8d1b63a4db2c6348a97b3cf45bd4d2caa7cad6b5
Issue Summary
High CPU usage is noticed on I/O Dispatcher threads.
Jira is up on Java 11.
Steps to Reproduce
No particular steps to reproduce, issue happens randomly even when Jira is not under load.
Expected Results
I/O Dispatcher threads shouldn't be using lots of CPU.
Actual Results
At least One I/O Dispatcher thread is using up 99% CPU.
You can see from the below Thread dump snapshot that the I/O Dispatcher is stuck in runnable and is using a lot of CPU time:
"I/O dispatcher 12" #94 daemon prio=5 os_prio=0 cpu=3439222.56ms elapsed=5220.64s tid=0x0000ff0e98033000 nid=0x3cf5 runnable [0x0000ff0e98033000] java.lang.Thread.State: RUNNABLE at sun.security.ssl.SSLEngineImpl.wrap(java.base@11.0.4/SSLEngineImpl.java:136) - locked <0x00000006dfc4cb18> (a sun.security.ssl.SSLEngineImpl) at sun.security.ssl.SSLEngineImpl.wrap(java.base@11.0.4/SSLEngineImpl.java:116) - locked <0x00000006dfc4cb18> (a sun.security.ssl.SSLEngineImpl) at javax.net.ssl.SSLEngine.wrap(java.base@11.0.4/SSLEngine.java:479) at org.apache.http.nio.reactor.ssl.SSLIOSession.doWrap(SSLIOSession.java:263) at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:301) at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:503) - locked <0x00000006dfc4c5a8> (a org.apache.http.nio.reactor.ssl.SSLIOSession) at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:120) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588) at java.lang.Thread.run(java.base@11.0.4/Thread.java:834) Locked ownable synchronizers: - None
The CPU data also shows the same thread is using more than 90% of CPU:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 15605 tcjira 20 0 11.8g 5.2g 68m R 99.2 44.5 58:02.42 I/O dispatcher 15321 tcjira 20 0 11.8g 5.2g 68m S 1.9 44.5 0:06.70 VM Periodic Tas
Note:
- The problem is related to a bug in the httpcore library that ships with Apache Httpclient used by Jira to communicate with remote services: https://issues.apache.org/jira/browse/HTTPCORE-583.
- The bug in httpcore was fixed in 4.4.12.
- The bug is triggered when Java 11 is used in combination with a version of httpcore that has the problem.
- Jira ships with multiple versions of the httpcore library, main Jira 8.4.2 uses httpcore-4.4.9.jar, while some other bundled plugins use other versions:
- jira-workflow-sharing-plugin-2.2.3.jar-embedded uses httpcore-4.4.1.jar
- atlassian-remote-event-common-plugin-6.1.0.jar-embedded uses httpcore-4.4.10.jar
Solution
Upgrade AdoptOpenJDK to version 11.0.8 which has this issue solved.
Workaround
- Downgrade your JDK version from jdk 11 to jdk 1.8, Java 1.8 is not known to cause this problem.
- The issue is observed with Java 11 that uses TLS v1.3. TLS v1.2 is unaffected by this. It's possible to force Java 11 to use TLS v1.2 by adding the following JVM parameter: -Dhttps.protocols=TLSv1.2 to your startup properties.
- is duplicated by
-
JRASERVER-70189 When Jira is running against Java 11, TLS 1.3 requests can cause httpclient threads to become blocked
-
- Closed
-
Form Name |
---|
High CPU usage from IO Dispatcher threads when using Java 11
-
Bug
-
Resolution: Answered
-
High
-
None
-
8.4.2
-
8.04
-
13
-
Severity 3 - Minor
-
1
-
This problem is caused by a bug in the Java runtime: JDK-8214418 HttpClient falls in running with 100% cpu usage after an error signalled on channel (Backported as JDK-8241054)
The fix has been verified to be available in AdoptOpenJDK 11.0.8 - https://github.com/AdoptOpenJDK/openjdk-jdk11u/commit/8d1b63a4db2c6348a97b3cf45bd4d2caa7cad6b5
Issue Summary
High CPU usage is noticed on I/O Dispatcher threads.
Jira is up on Java 11.
Steps to Reproduce
No particular steps to reproduce, issue happens randomly even when Jira is not under load.
Expected Results
I/O Dispatcher threads shouldn't be using lots of CPU.
Actual Results
At least One I/O Dispatcher thread is using up 99% CPU.
You can see from the below Thread dump snapshot that the I/O Dispatcher is stuck in runnable and is using a lot of CPU time:
"I/O dispatcher 12" #94 daemon prio=5 os_prio=0 cpu=3439222.56ms elapsed=5220.64s tid=0x0000ff0e98033000 nid=0x3cf5 runnable [0x0000ff0e98033000] java.lang.Thread.State: RUNNABLE at sun.security.ssl.SSLEngineImpl.wrap(java.base@11.0.4/SSLEngineImpl.java:136) - locked <0x00000006dfc4cb18> (a sun.security.ssl.SSLEngineImpl) at sun.security.ssl.SSLEngineImpl.wrap(java.base@11.0.4/SSLEngineImpl.java:116) - locked <0x00000006dfc4cb18> (a sun.security.ssl.SSLEngineImpl) at javax.net.ssl.SSLEngine.wrap(java.base@11.0.4/SSLEngine.java:479) at org.apache.http.nio.reactor.ssl.SSLIOSession.doWrap(SSLIOSession.java:263) at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:301) at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:503) - locked <0x00000006dfc4c5a8> (a org.apache.http.nio.reactor.ssl.SSLIOSession) at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:120) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588) at java.lang.Thread.run(java.base@11.0.4/Thread.java:834) Locked ownable synchronizers: - None
The CPU data also shows the same thread is using more than 90% of CPU:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 15605 tcjira 20 0 11.8g 5.2g 68m R 99.2 44.5 58:02.42 I/O dispatcher 15321 tcjira 20 0 11.8g 5.2g 68m S 1.9 44.5 0:06.70 VM Periodic Tas
Note:
- The problem is related to a bug in the httpcore library that ships with Apache Httpclient used by Jira to communicate with remote services: https://issues.apache.org/jira/browse/HTTPCORE-583.
- The bug in httpcore was fixed in 4.4.12.
- The bug is triggered when Java 11 is used in combination with a version of httpcore that has the problem.
- Jira ships with multiple versions of the httpcore library, main Jira 8.4.2 uses httpcore-4.4.9.jar, while some other bundled plugins use other versions:
- jira-workflow-sharing-plugin-2.2.3.jar-embedded uses httpcore-4.4.1.jar
- atlassian-remote-event-common-plugin-6.1.0.jar-embedded uses httpcore-4.4.10.jar
Solution
Upgrade AdoptOpenJDK to version 11.0.8 which has this issue solved.
Workaround
- Downgrade your JDK version from jdk 11 to jdk 1.8, Java 1.8 is not known to cause this problem.
- The issue is observed with Java 11 that uses TLS v1.3. TLS v1.2 is unaffected by this. It's possible to force Java 11 to use TLS v1.2 by adding the following JVM parameter: -Dhttps.protocols=TLSv1.2 to your startup properties.
- is duplicated by
-
JRASERVER-70189 When Jira is running against Java 11, TLS 1.3 requests can cause httpclient threads to become blocked
-
- Closed
-