Java causing 100% CPU load

#1

I built a new PC recently. After the PC has been powered on for a few hours, the CPU will flatline at 100% load on all cores and hyperthreads. The CPU is an i7-5960X. I narrowed it down to the Java.exe process. If I suspend the process when the issue happens, CPU load instantly drops to normal. If I end the process, it will auto restart but be ok in load for another few hours and then it will happen again.

I have updated Java to the most recent release. I have also monitored the console, but there are no events which occur when the issue happens.

Quite annoying as I can’t leave the PC by itself as the temp rises when it happens.

0 Likes

#2

Is this the gateway machine/process that’s taking up CPU? Can you get a screenshot of the threads tab of the console on the gateway status page?

0 Likes

#3

Thanks for quick reply Kevin. Do you mean from here: localhost:8088/main/web/config/system.console?22

I will get a screenshot of this the next time it spikes

0 Likes

#4

Here is the screenshot:

I scrolled down to the highest taxed threads.

Does the 96% CPU usage shown on the left (highlighted in system status) indicate that Ignition is causing the 96% load? Or is that just a display of the CPU load in general.

0 Likes

#5

The screenshots are too small to see any of the text. Can you export a thread dump (same page, link up top) while the CPU usage is high like that?

0 Likes

#6

Attached. This time instead of restarting the java.exe, I went into the gateway control and stopped Ignition. The CPU load dropped to normal when I did this.
thread-dump full load.txt (115 KB)
thread-dump normal.txt (107 KB)

0 Likes

#7

Here is a close up of the last image:

It seems to be the server connector managers causing the load. Is there any way I can cure this?

0 Likes

#8

What are those threads doing? Can you expand them and capture the stack traces?

0 Likes

#9

When the issue is not occuring (i.e. normal CPU load) they sit at 0% CPU usage

Here is one expanded at 0%:

qtp1694852790-62-selector-ServerConnectorManager@5a37f1a/0 (62) 0.00% RUNNABLE Hide LockingOwns monitor sun.nio.ch.Util$2@453a79b3Owns monitor java.util.Collections$UnmodifiableSet@2cc5a84fOwns monitor sun.nio.ch.WindowsSelectorImpl@4edcd0dbStacksun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)sun.nio.ch.SelectorImpl.select(Unknown Source)sun.nio.ch.SelectorImpl.select(Unknown Source)org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:531)org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:484)org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)java.lang.Thread.run(Unknown Source)

I will check next time it flatlines if the text is any different

0 Likes

#10

Here are two expanded under full load, attached
exp.txt (1.95 KB)

0 Likes

#11

Yuck. We’ll look into it.

It’s gonna be a really tough thing to track down, it looks like a bug deep in either the Jetty web server’s networking code or the JVM’s selector implementation on Windows. The first thing we’ll probably try is simply upgrading Jetty to the latest version…

0 Likes

#12

Is that something I can do myself?

0 Likes

#13

I updated to 7.7.5. The issue still occurs, but now the CPU goes to ~25% on multiple (but not all) cores. Was anything changed between 7.7.3 and .5?


0 Likes

#14

I upgraded to 7.7.6, the issue is still there:

0 Likes

#15

Is it an option for you to try this on a Linux machine?

0 Likes

#16

Generally when I get anything that causes crazy performance bugs like that I always uninstall/reinstall java.

0 Likes

#17

I’m running windows 10 pro now on the same hardware (except NVME not SSD) and no issues. So looks like a problem with windows 7.

0 Likes