[Bug] JVMService-produce high cpu 100% #9309
Replies: 3 comments 20 replies
-
We can't do an analysis from a CPU usage, especially you just post a stack showing queue blocked. |
Beta Was this translation helpful? Give feedback.
-
@wu-sheng hello wu,I think I found the problem,this code use cpu 100% ,when i have 5000 threads in my process and JDK < 17。 As shown in the figure,When I have a lot of thread, getThreadMetrics will use more cpu。because jdk lookup thread info is slow。 |
Beta Was this translation helpful? Give feedback.
-
Maybe you can try: java -Dskywalking.jvm.metrics_collect_period=60 |
Beta Was this translation helpful? Give feedback.
-
Search before asking
Apache SkyWalking Component
Java Agent (apache/skywalking-java)
What happened
After the service runs for a period of time, SkywalkingAgent-5-JVMService-produce-0 will occupy 100% CPU
"SkywalkingAgent-5-JVMService-produce-0" #9 daemon prio=5 os_prio=0 cpu=199370183.56ms elapsed=606196.06s tid=0x00007feb31359800 nid=0x7c5 runnable [0x00007feae9e99000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000700399d28> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
What you expected to happen
nothing
How to reproduce
Not all services will happen, only one can be seen。
environment:
jdk: openjdk version "1.8.0_312"
runtime: k8s-container
Anything else
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions