Java CPU 99% 谁能帮我看看那个点出现死循环

发布于 2022-03-07 22:43:01 字数 19557 浏览 697 评论 5


2017-09-05 19:55:55
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.79-b02 mixed mode):

"Inactive RequestProcessor thread [Was:Default RequestProcessor/com.sun.tools.visualvm.application.views.threads.ThreadMXBeanDataManager$1]" daemon prio=2 tid=0x000000000ab04000 nid=0x15c4 in Object.wait() [0x000000000cd9f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f0b73aa0> (a java.lang.Object)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1939)
    - locked <0x00000000f0b73aa0> (a java.lang.Object)

   Locked ownable synchronizers:
    - None

"Default RequestProcessor" daemon prio=2 tid=0x000000000aafe000 nid=0x53c runnable [0x000000000cf9f000]
   java.lang.Thread.State: RUNNABLE
    at sun.tools.attach.WindowsVirtualMachine.enqueue(Native Method)
    at sun.tools.attach.WindowsVirtualMachine.execute(WindowsVirtualMachine.java:96)
    at sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:217)
    at sun.tools.attach.HotSpotVirtualMachine.remoteDataDump(HotSpotVirtualMachine.java:174)
    at com.sun.tools.visualvm.attach.AttachModelImpl.takeThreadDump(AttachModelImpl.java:59)
    - locked <0x00000000fc574848> (a com.sun.tools.visualvm.attach.AttachModelImpl)
    at com.sun.tools.visualvm.jvm.JVMImpl.takeThreadDump(JVMImpl.java:394)
    at com.sun.tools.visualvm.threaddump.impl.ThreadDumpProvider$1.run(ThreadDumpProvider.java:62)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1384)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1994)

   Locked ownable synchronizers:
    - None

"pool-4-thread-1" prio=6 tid=0x000000000aafe800 nid=0x96c waiting on condition [0x000000000cc9e000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000000f0954a00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
    - None

"Timer-0" daemon prio=2 tid=0x000000000ab00000 nid=0x18c4 in Object.wait() [0x000000000e85e000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f0a45688> (a java.util.TaskQueue)
    at java.util.TimerThread.mainLoop(Timer.java:552)
    - locked <0x00000000f0a45688> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:505)

   Locked ownable synchronizers:
    - None

"Thread-4" daemon prio=2 tid=0x000000000aaff800 nid=0x1870 in Object.wait() [0x000000000e6ae000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f03bc2e0> (a java.util.LinkedList)
    at java.lang.Object.wait(Object.java:503)
    at java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1476)
    - locked <0x00000000f03bc2e0> (a java.util.LinkedList)

   Locked ownable synchronizers:
    - None

"Inactive RequestProcessor thread [Was:TimedSoftReference/org.openide.util.TimedSoftReference]" daemon prio=2 tid=0x0000000008f12800 nid=0x6bc in Object.wait() [0x000000000e5af000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f0945468> (a java.lang.Object)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1939)
    - locked <0x00000000f0945468> (a java.lang.Object)

   Locked ownable synchronizers:
    - None

"DestroyJavaVM" prio=6 tid=0x0000000008f0f800 nid=0x1e04 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
    - None

"TimerQueue" daemon prio=6 tid=0x0000000008f0e800 nid=0x1828 waiting on condition [0x000000000bbce000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000000f0a46798> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2082)
    at java.util.concurrent.DelayQueue.take(DelayQueue.java:220)
    at javax.swing.TimerQueue.run(TimerQueue.java:171)
    at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
    - <0x00000000f0a467c0> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)

"Inactive RequestProcessor thread [Was:Default RequestProcessor/com.sun.tools.visualvm.tools.jmx.CachedMBeanServerConnectionFactory$SnapshotInvocationHandler$2]" daemon prio=2 tid=0x0000000008f0e000 nid=0x1ee4 in Object.wait() [0x000000000b9cf000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f0ad1a78> (a java.lang.Object)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1939)
    - locked <0x00000000f0ad1a78> (a java.lang.Object)

   Locked ownable synchronizers:
    - None

"File Watcher" daemon prio=2 tid=0x0000000008f0c800 nid=0x1edc waiting on condition [0x000000000b8ce000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000000f04edda8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
    at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:489)
    at java.util.concurrent.LinkedBlockingDeque.take(LinkedBlockingDeque.java:678)
    at sun.nio.fs.AbstractWatchService.take(AbstractWatchService.java:118)
    at org.netbeans.modules.masterfs.watcher.nio2.NioNotifier.nextEvent(NioNotifier.java:62)
    at org.netbeans.modules.masterfs.providers.Notifier$1.nextEvent(Notifier.java:89)
    at org.netbeans.modules.masterfs.watcher.Watcher$Ext.run(Watcher.java:299)
    at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
    - None

"Thread-2" daemon prio=2 tid=0x0000000008f0d000 nid=0x1ee8 runnable [0x000000000a4ff000]
   java.lang.Thread.State: RUNNABLE
    at sun.nio.fs.WindowsNativeDispatcher.GetQueuedCompletionStatus0(Native Method)
    at sun.nio.fs.WindowsNativeDispatcher.GetQueuedCompletionStatus(WindowsNativeDispatcher.java:996)
    at sun.nio.fs.WindowsWatchService$Poller.run(WindowsWatchService.java:524)
    at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
    - None

"AWT-EventQueue-0" prio=6 tid=0x000000000975f800 nid=0x1e70 runnable [0x000000000a67e000]
   java.lang.Thread.State: RUNNABLE
    at com.sun.tools.visualvm.application.views.monitor.ApplicationMonitorView$HeapViewSupport.refresh(ApplicationMonitorView.java:392)
    at com.sun.tools.visualvm.application.views.monitor.ApplicationMonitorView$1.run(ApplicationMonitorView.java:107)
    at com.sun.tools.visualvm.application.views.monitor.ApplicationMonitorView$2.stateChanged(ApplicationMonitorView.java:118)
    at com.sun.tools.visualvm.application.views.monitor.ApplicationMonitorModel.fireChange(ApplicationMonitorModel.java:527)
    at com.sun.tools.visualvm.application.views.monitor.ApplicationMonitorModel.access$400(ApplicationMonitorModel.java:45)
    at com.sun.tools.visualvm.application.views.monitor.ApplicationMonitorModel$6$1.run(ApplicationMonitorModel.java:472)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:706)
    at java.awt.EventQueue$3.run(EventQueue.java:704)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:126)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

   Locked ownable synchronizers:
    - None

"AWT-Windows" daemon prio=6 tid=0x0000000008f7e800 nid=0x1aa4 runnable [0x000000000a17f000]
   java.lang.Thread.State: RUNNABLE
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:312)
    at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
    - None

"AWT-Shutdown" prio=6 tid=0x0000000008f7d800 nid=0x1cc in Object.wait() [0x000000000a07f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f0133208> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:503)
    at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:296)
    - locked <0x00000000f0133208> (a java.lang.Object)
    at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
    - None

"Java2D Disposer" daemon prio=10 tid=0x0000000008f2e000 nid=0x860 in Object.wait() [0x0000000009f7e000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f0060700> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
    - locked <0x00000000f0060700> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
    at sun.java2d.Disposer.run(Disposer.java:145)
    at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
    - None

"RequestProcessor queue manager" daemon prio=6 tid=0x0000000008dba000 nid=0x1cf8 in Object.wait() [0x00000000094df000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f013b250> (a java.lang.Class for org.openide.util.RequestProcessor$TickTac)
    at org.openide.util.RequestProcessor$TickTac.obtainFirst(RequestProcessor.java:2217)
    - locked <0x00000000f013b250> (a java.lang.Class for org.openide.util.RequestProcessor$TickTac)
    at org.openide.util.RequestProcessor$TickTac.run(RequestProcessor.java:2193)

   Locked ownable synchronizers:
    - None

"CLI Requests Server" daemon prio=6 tid=0x0000000008da2800 nid=0x1c80 runnable [0x00000000091df000]
   java.lang.Thread.State: RUNNABLE
    at java.net.DualStackPlainSocketImpl.accept0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:131)
    at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
    - locked <0x00000000f01329f0> (a java.net.SocksSocketImpl)
    at java.net.ServerSocket.implAccept(ServerSocket.java:530)
    at java.net.ServerSocket.accept(ServerSocket.java:498)
    at org.netbeans.CLIHandler$Server.run(CLIHandler.java:1061)

   Locked ownable synchronizers:
    - None

"Active Reference Queue Daemon" daemon prio=2 tid=0x0000000008de6000 nid=0x1e9c in Object.wait() [0x000000000907f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f0277c80> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
    - locked <0x00000000f0277c80> (a java.lang.ref.ReferenceQueue$Lock)
    at org.openide.util.lookup.implspi.ActiveQueue$Daemon.run(ActiveQueue.java:145)
    - locked <0x00000000f0277c80> (a java.lang.ref.ReferenceQueue$Lock)

   Locked ownable synchronizers:
    - None

"Service Thread" daemon prio=6 tid=0x0000000007231000 nid=0x1aac runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
    - None

"C2 CompilerThread1" daemon prio=10 tid=0x000000000722a000 nid=0x1e6c waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
    - None

"C2 CompilerThread0" daemon prio=10 tid=0x0000000007220000 nid=0x1e68 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
    - None

"Attach Listener" daemon prio=10 tid=0x000000000721f000 nid=0x1e1c waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
    - None

"Signal Dispatcher" daemon prio=10 tid=0x000000000721b800 nid=0x708 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
    - None

"Finalizer" daemon prio=8 tid=0x00000000071d0800 nid=0x138 in Object.wait() [0x000000000857f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f003c3a0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
    - locked <0x00000000f003c3a0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

   Locked ownable synchronizers:
    - None

"Reference Handler" daemon prio=10 tid=0x00000000071c7000 nid=0x1db8 in Object.wait() [0x000000000847f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000000f013c348> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:503)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
    - locked <0x00000000f013c348> (a java.lang.ref.Reference$Lock)

   Locked ownable synchronizers:
    - None

"VM Thread" prio=10 tid=0x00000000071c2000 nid=0x165c runnable 

"GC task thread#0 (ParallelGC)" prio=6 tid=0x0000000002e67800 nid=0x121c runnable 

"GC task thread#1 (ParallelGC)" prio=6 tid=0x0000000002e69000 nid=0xfc0 runnable 

"GC task thread#2 (ParallelGC)" prio=6 tid=0x0000000002e6b000 nid=0x1e38 runnable 

"GC task thread#3 (ParallelGC)" prio=6 tid=0x0000000002e6d800 nid=0xc60 runnable 

"VM Periodic Task Thread" prio=10 tid=0x000000000723b000 nid=0x1e20 waiting on condition 

JNI global references: 1436

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

噩梦成真你也成魔 2022-03-10 23:54:44

这是线程的dump日志,只能看到线程状态,目前没有死锁的线程。

你得去看看堆dump日志,看看cup或内存占用情况

月牙弯弯 2022-03-10 21:34:52

top、pid、16进制、jstack是正解。

甜扑 2022-03-10 20:46:08

凭老夫多年写代码的经验来看有两个可能,1:io问题,可能是像数据库这样的资源没关闭;2:还有多线程问题,查看你的并发的地方

策马西风 2022-03-10 20:22:48

还要看哪个线程执行耗费cpu,,如果是linux可以看top命令

像你 2022-03-09 12:11:03

top找出CPU占用最多的pid,把这个pid转成16进制,使用jstack对应去找

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文