3

I observed my application (based on undertow) constantly eat CPU percentage after running a while:

enter image description here

In the end I found if I suspend one of the XNIO I/O thread the CPU percentage will be released.

The stack frame after suspended the I/O thread:

enter image description here

The CPU consumption after suspended and resumed that thread:

enter image description here

Any idea what triggered this issue?

Updates

The suspended place of normal I/O thread:

enter image description here

The suspended place of error I/O thread:

enter image description here

Update 2 - More findings

There are dead loop found in the logic:

  1. WorkerThread call select: enter image description here

  2. Thread interupted: enter image description here

  3. Selected key is null and it breaks out the loop: enter image description here

  4. It repeats the infinit loop again: enter image description here

  5. And back to the select() call: enter image description here

Gelin Luo
  • 14,035
  • 27
  • 86
  • 139

0 Answers0