High CPU in selector polls with HTTP/2 enabled on EAP 7
Environment
- JBoss Enterprise Application Platform (EAP)
- 7
Issue
- On EAP 7, we note high CPU in default I/O threads performing selector polls:
"default I/O-24" #142 prio=5 os_prio=0 tid=0x0000000005e7a800 nid=0x1ce7d runnable [0x00007fff4b934000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000000899d7720> (a sun.nio.ch.Util$3)
- locked <0x00000000899d7730> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000899d76d8> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:551)
Resolution
This was fixed in EAP 7.2 CP 3. Please, upgrade to the latest version available to have all the fixes applied.
As a workaround, disable HTTP2 on Undertow listener if no HTTP2 traffic is present in the network.
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="false"/>
If seeing this without HTTP/2, then consider High CPU in selector polls on EAP 7
Root Cause
Check the below Jira related to the issue:
- Content from issues.jboss.org is not included.JBEAP-16856
- Content from issues.jboss.org is not included.UNDERTOW-1534
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.