Details
-
Question
-
Status: Open
-
Major
-
Resolution: Unresolved
-
4.4.0
-
None
-
None
Description
Sometimes when we open (and sometimes not even interact) with the Karaf web console Gogo plugin we get a very high CPU load (100%) from that point and Karaf never seems to recover from this.
Analysis of the showed us the following thread caused this: "Thread-210" #16393 prio=5 os_prio=0 cpu=22819544.54ms elapsed=77820.53s tid=0x00007f21101c86c0 nid=0x406e runnable [0x00007f20c319a000] java.lang.Thread.State: RUNNABLE at org.apache.karaf.webconsole.gogo.GogoPlugin$SessionTerminal.run(GogoPlugin.java:247) at java.lang.Thread.run(java.base@17.0.2/Thread.java:833) Locked ownable synchronizers: None
which points to the GogoPlugin.
A quick look at the gogo plugin shows some suspicious code: https://github.com/apache/karaf/blob/main/webconsole/gogo/src/main/java/org/apache/karaf/webconsole/gogo/GogoPlugin.java#L55
where the plugin could end in and endless loop causing high CPU load.
Strange thing is we can only find a few appearances of people who ran into this, like https://community.talend.com/s/question/0D53p00007vCkucCAC/runtime-esb-high-cpu-load-caused-by-webconsole-gogo-?language=en_US
It could be caused by the fact that we run Karaf on AWS and also behind an nginx, but by debugging Karaf locally we can also reproduce the issue somehow; the plugin sometimes receives strange characters and seems to go into an endless loop.
Is this a known issue?