例外:由于多次调用sun.misc.Unsafe.park

时间:2016-02-23 05:34:39

标签: java multithreading concurrency

由于OutOfMemoryError,我的Java程序在mac上崩溃。当我尝试打印所有活动线程时,我找到了下面的堆栈跟踪。这些线程的许多实例与“sun.misc.Unsafe.park”有关。其中一个可能的原因可能是存在死锁。有没有办法找出我的程序的哪个部分对此负责?

Thread Class: class java.lang.Thread|||
Thread id: 90|||||||
StackTrace:  sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745) 

0 个答案:

没有答案