我面临一个问题,在这个问题中,我的spring引导应用程序的所有线程都处于阻塞状态。服务器很长一段时间运行良好,突然挂起。下面是线程转储:
Thread 227: (state = IN_NATIVE) - sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(long, int, int[], int[], int[], long) @bci=0 (Compiled frame; information may be imprecise) - sun.nio.ch.WindowsSelectorImpl$SubSelector.poll() @bci=43 (Compiled frame) - sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(sun.nio.ch.WindowsSelectorImpl$SubSelector) @bci=1 (Compiled frame) - sun.nio.ch.WindowsSelectorImpl.doSelect(long) @bci=63 (Compiled frame) - sun.nio.ch.SelectorImpl.lockAndDoSelect(long) @bci=37 (Compiled frame) - sun.nio.ch.SelectorImpl.select(long) @bci=30 (Compiled frame) - sun.nio.ch.SelectorImpl.select() @bci=2 (Compiled frame) - org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select() @bci=64, line=422 (Compiled frame) - org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce() @bci=20, line=359 (Compiled frame) - org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produceTask() @bci=4, line=357 (Compiled frame) - org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(boolean) @bci=1, line=181 (Compiled frame) - org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(boolean) @bci=134, line=168 (Compiled frame) - org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run() @bci=2, line=126 (Compiled frame) - org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run() @bci=203, line=366 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(java.lang.Runnable) @bci=1, line=765 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool$2.run() @bci=104, line=683 (Compiled frame) - java.lang.Thread.run() @bci=11 (Compiled frame) Thread 226: (state = BLOCKED) - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) - java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20 (Compiled frame) - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(long, java.util.concurrent.TimeUnit) @bci=97 (Compiled frame) - org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.reservedWait() @bci=97, line=292 (Compiled frame) - org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run() @bci=188, line=357 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(java.lang.Runnable) @bci=1, line=765 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool$2.run() @bci=104, line=683 (Compiled frame) - java.lang.Thread.run() @bci=11 (Compiled frame) Thread 225: (state = BLOCKED) - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) - java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20 (Compiled frame) - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78 (Compiled frame) - org.eclipse.jetty.util.BlockingArrayQueue.poll(long, java.util.concurrent.TimeUnit) @bci=57, line=392 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll() @bci=12, line=656 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool.access$800(org.eclipse.jetty.util.thread.QueuedThreadPool) @bci=1, line=49 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool$2.run() @bci=358, line=720 (Compiled frame) - java.lang.Thread.run() @bci=11 (Compiled frame) Thread 224: (state = BLOCKED) - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) - java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20 (Compiled frame) - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78 (Compiled frame) - org.eclipse.jetty.util.BlockingArrayQueue.poll(long, java.util.concurrent.TimeUnit) @bci=57, line=392 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll() @bci=12, line=656 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool.access$800(org.eclipse.jetty.util.thread.QueuedThreadPool) @bci=1, line=49 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool$2.run() @bci=358, line=720 (Compiled frame) - java.lang.Thread.run() @bci=11 (Compiled frame) Thread 223: (state = BLOCKED) - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) - java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20 (Compiled frame) - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(long, java.util.concurrent.TimeUnit) @bci=97 (Compiled frame) - org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.reservedWait() @bci=97, line=292 (Compiled frame) - org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run() @bci=188, line=357 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(java.lang.Runnable) @bci=1, line=765 (Compiled frame) - org.eclipse.jetty.util.thread.QueuedThreadPool$2.run() @bci=104, line=683 (Compiled frame) - java.lang.Thread.run() @bci=11 (Compiled frame) Thread 221: (state = BLOCKED) - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) - java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20 (Compiled frame) - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78 (Compiled frame) - java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124 (Compiled frame) - java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1 (Compiled frame) - java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149 (Compiled frame) - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26 (Interpreted frame) - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5 (Interpreted frame) - java.lang.Thread.run() @bci=11 (Interpreted frame) Thread 1: (state = BLOCKED) Thread 220: (state = BLOCKED) - org.springframework.web.socket.adapter.AbstractWebSocketSession.checkNativeSessionInitialized() @bci=4, line=94 (Compiled frame) - org.springframework.web.socket.adapter.AbstractWebSocketSession.sendMessage(org.springframework.web.socket.WebSocketMessage) @bci=1, line=99 (Compiled frame) - com.example.SocketHandler.sendMessage(org.springframework.web.socket.WebSocketSession, java.lang.String, boolean) @bci=22, line=32 (Compiled frame) - com.example.RequestProcessor.handleRequest(org.springframework.web.socket.WebSocketSession, org.springframework.web.socket.TextMessage) @bci=620, line=123 (Compiled frame) - com.example.RequestProcessor.run() @bci=36, line=55 (Interpreted frame) - java.util.concurrent.Executors$RunnableAdapter.call() @bci=4 (Interpreted frame)