High CPU in XNIO accept thread
Environment
- JBoss Enterprise Application Platform (EAP) 7.0.x
Issue
- We see high CPU in EAP 7's XNIO accept threads:
"default Accept" #125 prio=5 os_prio=0 tid=0x00007fc6e81ee000 nid=0xbcea runnable [0x00007fc6ed7d8000]
java.lang.Thread.State: RUNNABLE
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Throwable.java:783)
- locked <0x00000007170b0b00> (a java.io.IOException)
at java.lang.Throwable.(Throwable.java:265)
at java.lang.Exception.(Exception.java:66)
at java.io.IOException.(IOException.java:58)
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
- locked <0x00000005c222d048> (a java.lang.Object)
at org.xnio.nio.QueuedNioTcpServer.handleReady(QueuedNioTcpServer.java:466)
at org.xnio.nio.QueuedNioTcpServerHandle.handleReady(QueuedNioTcpServerHandle.java:38)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:567)
Resolution
- Upgrade to EAP 7.0.6+
Root Cause
- Content from issues.jboss.org is not included.XNIO-279
- Exceptions raised during the accept call were not properly handled, leading to high CPU loops
Diagnostic Steps
- Check thread dumps and logs for exceptions raised from the accept threads
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.