记一次Java多线程程序调试经历:HttpClient 死锁

我自己写了一个爬虫程序,跑了半天后程序就卡死了,没有任何输出和动静。
先是使用jstatdVisualVM,参考这篇文章:jstatd,VisualVM使用和报错解决
结果如下图:
记一次Java多线程程序调试经历:HttpClient 死锁_第1张图片
看到内存毫无变化,应该是发生了死锁。


使用命令jstack查看线程堆栈状态:

-> % jstack 26924      
2019-12-23 09:53:38
Full thread dump OpenJDK 64-Bit Server VM (11.0.4+11-post-Ubuntu-1ubuntu218.04.3 mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x00007f35dc0035b0, length=20, elements={
0x00007f360c011000, 0x00007f360c0b0800, 0x00007f360c0b2800, 0x00007f360c0b8800,
0x00007f360c0ba800, 0x00007f360c0bd000, 0x00007f360c0bf000, 0x00007f360c0f9000,
0x00007f360c0fe800, 0x00007f360c20f800, 0x00007f360c249000, 0x00007f360c378800,
0x00007f360c38b000, 0x00007f360c389800, 0x00007f360c390000, 0x00007f360c391800,
0x00007f360c393000, 0x00007f360c395800, 0x00007f360c38e000, 0x00007f35dc001800
}

"main" #1 prio=5 os_prio=0 cpu=697257.22ms elapsed=65383.05s tid=0x00007f360c011000 nid=0x692d waiting on condition  [0x00007f3612f97000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000e3c00020> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at org.apache.http.pool.AbstractConnPool.getPoolEntryBlocking(AbstractConnPool.java:379)
	at org.apache.http.pool.AbstractConnPool.access$200(AbstractConnPool.java:69)
	at org.apache.http.pool.AbstractConnPool$2.get(AbstractConnPool.java:245)
	- locked <0x00000000e3c000b0> (a org.apache.http.pool.AbstractConnPool$2)
	at org.apache.http.pool.AbstractConnPool$2.get(AbstractConnPool.java:193)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:304)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:280)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:190)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
	at com.zhang.spider.getHtml(spider.java:219)
	at com.zhang.spider.main(spider.java:145)


"pool-1-thread-1" #13 prio=5 os_prio=0 cpu=68909.14ms elapsed=65380.72s tid=0x00007f360c378800 nid=0x693f waiting on condition  [0x00007f35f0c38000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.4/LinkedBlockingQueue.java:433)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)
	
JNI global refs: 17, weak refs: 0

看到线程池中的线程状态是java.lang.Thread.State: WAITING (parking)parking to wait for <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject),这是正常的线程等待状态。

发现主线程有问题,虽然同样是java.lang.Thread.State: WAITING (parking)
但在等锁parking to wait for <0x00000000e3c00020> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

发现问题是由org.apache.http.impl.client.CloseableHttpClient造成的。
然后看到了这篇文章:记一次 HttpClient 死锁问题 | Mr.Kail’s Blog


一个解决办法是升级库的版本:

    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.5.10</version>
    </dependency>

另一个办法是记得关闭连接:

try (CloseableHttpClient httpclient = HttpClients.createDefault()) {
	CloseableHttpResponse response = httpclient.execute(url);
	response.close();
}

还有就是记得设置超时:

CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet httpGet=newHttpGet("http://www.baidu.com");//HTTP Get请求(POST雷同)
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(2000).setConnectTimeout(2000).build();//设置请求和传输超时时间
httpGet.setConfig(requestConfig);
httpClient.execute(httpGet);//执行请求


jstack完整结果:

-> % jstack 26924      
2019-12-23 09:53:38
Full thread dump OpenJDK 64-Bit Server VM (11.0.4+11-post-Ubuntu-1ubuntu218.04.3 mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x00007f35dc0035b0, length=20, elements={
0x00007f360c011000, 0x00007f360c0b0800, 0x00007f360c0b2800, 0x00007f360c0b8800,
0x00007f360c0ba800, 0x00007f360c0bd000, 0x00007f360c0bf000, 0x00007f360c0f9000,
0x00007f360c0fe800, 0x00007f360c20f800, 0x00007f360c249000, 0x00007f360c378800,
0x00007f360c38b000, 0x00007f360c389800, 0x00007f360c390000, 0x00007f360c391800,
0x00007f360c393000, 0x00007f360c395800, 0x00007f360c38e000, 0x00007f35dc001800
}

"main" #1 prio=5 os_prio=0 cpu=697257.22ms elapsed=65383.05s tid=0x00007f360c011000 nid=0x692d waiting on condition  [0x00007f3612f97000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000e3c00020> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at org.apache.http.pool.AbstractConnPool.getPoolEntryBlocking(AbstractConnPool.java:379)
	at org.apache.http.pool.AbstractConnPool.access$200(AbstractConnPool.java:69)
	at org.apache.http.pool.AbstractConnPool$2.get(AbstractConnPool.java:245)
	- locked <0x00000000e3c000b0> (a org.apache.http.pool.AbstractConnPool$2)
	at org.apache.http.pool.AbstractConnPool$2.get(AbstractConnPool.java:193)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:304)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:280)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:190)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
	at com.zhang.spider.getHtml(spider.java:219)
	at com.zhang.spider.main(spider.java:145)

"Reference Handler" #2 daemon prio=10 os_prio=0 cpu=633.83ms elapsed=65383.04s tid=0x00007f360c0b0800 nid=0x692f waiting on condition  [0x00007f35f2e05000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.ref.Reference.waitForReferencePendingList(java.base@11.0.4/Native Method)
	at java.lang.ref.Reference.processPendingReferences(java.base@11.0.4/Reference.java:241)
	at java.lang.ref.Reference$ReferenceHandler.run(java.base@11.0.4/Reference.java:213)

"Finalizer" #3 daemon prio=8 os_prio=0 cpu=416.22ms elapsed=65383.04s tid=0x00007f360c0b2800 nid=0x6930 in Object.wait()  [0x00007f35f2d04000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@11.0.4/Native Method)
	- waiting on <no object reference available>
	at java.lang.ref.ReferenceQueue.remove(java.base@11.0.4/ReferenceQueue.java:155)
	- waiting to re-lock in wait() <0x00000000ece87490> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@11.0.4/ReferenceQueue.java:176)
	at java.lang.ref.Finalizer$FinalizerThread.run(java.base@11.0.4/Finalizer.java:170)

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 cpu=0.58ms elapsed=65383.03s tid=0x00007f360c0b8800 nid=0x6931 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #5 daemon prio=9 os_prio=0 cpu=45406.61ms elapsed=65383.03s tid=0x00007f360c0ba800 nid=0x6932 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"C1 CompilerThread0" #6 daemon prio=9 os_prio=0 cpu=3312.09ms elapsed=65383.03s tid=0x00007f360c0bd000 nid=0x6933 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Sweeper thread" #7 daemon prio=9 os_prio=0 cpu=823.19ms elapsed=65383.03s tid=0x00007f360c0bf000 nid=0x6934 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #8 daemon prio=9 os_prio=0 cpu=0.06ms elapsed=65382.99s tid=0x00007f360c0f9000 nid=0x6935 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #9 daemon prio=8 os_prio=0 cpu=47.58ms elapsed=65382.99s tid=0x00007f360c0fe800 nid=0x6937 in Object.wait()  [0x00007f35f23c2000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(java.base@11.0.4/Native Method)
	- waiting on <no object reference available>
	at java.lang.ref.ReferenceQueue.remove(java.base@11.0.4/ReferenceQueue.java:155)
	- waiting to re-lock in wait() <0x00000000ece87c80> (a java.lang.ref.ReferenceQueue$Lock)
	at jdk.internal.ref.CleanerImpl.run(java.base@11.0.4/CleanerImpl.java:148)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)
	at jdk.internal.misc.InnocuousThread.run(java.base@11.0.4/InnocuousThread.java:134)

"commons-pool-evictor-thread" #11 daemon prio=5 os_prio=0 cpu=229.97ms elapsed=65382.54s tid=0x00007f360c20f800 nid=0x6938 waiting on condition  [0x00007f35f1a8e000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ece87e58> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.4/LockSupport.java:234)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@11.0.4/AbstractQueuedSynchronizer.java:2123)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.4/ScheduledThreadPoolExecutor.java:1182)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.4/ScheduledThreadPoolExecutor.java:899)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"Abandoned connection cleanup thread" #12 daemon prio=5 os_prio=0 cpu=737.84ms elapsed=65382.34s tid=0x00007f360c249000 nid=0x6939 in Object.wait()  [0x00007f35f178a000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(java.base@11.0.4/Native Method)
	- waiting on <no object reference available>
	at java.lang.ref.ReferenceQueue.remove(java.base@11.0.4/ReferenceQueue.java:155)
	- waiting to re-lock in wait() <0x00000000ece880b8> (a java.lang.ref.ReferenceQueue$Lock)
	at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1128)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"pool-1-thread-1" #13 prio=5 os_prio=0 cpu=68909.14ms elapsed=65380.72s tid=0x00007f360c378800 nid=0x693f waiting on condition  [0x00007f35f0c38000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.4/LinkedBlockingQueue.java:433)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"pool-1-thread-2" #14 prio=5 os_prio=0 cpu=68813.70ms elapsed=65380.48s tid=0x00007f360c38b000 nid=0x6940 waiting on condition  [0x00007f35f0937000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.4/LinkedBlockingQueue.java:433)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"pool-1-thread-3" #15 prio=5 os_prio=0 cpu=68525.68ms elapsed=65380.15s tid=0x00007f360c389800 nid=0x6942 waiting on condition  [0x00007f35f0836000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.4/LinkedBlockingQueue.java:433)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"pool-1-thread-4" #16 prio=5 os_prio=0 cpu=68409.74ms elapsed=65379.87s tid=0x00007f360c390000 nid=0x6943 waiting on condition  [0x00007f35f0735000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.4/LinkedBlockingQueue.java:433)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"pool-1-thread-5" #17 prio=5 os_prio=0 cpu=68613.59ms elapsed=65379.60s tid=0x00007f360c391800 nid=0x6944 waiting on condition  [0x00007f35f0634000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.4/LinkedBlockingQueue.java:433)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"pool-1-thread-6" #18 prio=5 os_prio=0 cpu=68764.39ms elapsed=65379.37s tid=0x00007f360c393000 nid=0x6945 waiting on condition  [0x00007f35f0333000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.4/LinkedBlockingQueue.java:433)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"pool-1-thread-7" #19 prio=5 os_prio=0 cpu=68636.98ms elapsed=65379.17s tid=0x00007f360c395800 nid=0x694b waiting on condition  [0x00007f35f0232000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.4/LinkedBlockingQueue.java:433)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"pool-1-thread-8" #20 prio=5 os_prio=0 cpu=68529.14ms elapsed=65378.94s tid=0x00007f360c38e000 nid=0x694c waiting on condition  [0x00007f35f0131000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.4/Native Method)
	- parking to wait for  <0x00000000ecfae070> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.4/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.4/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.4/LinkedBlockingQueue.java:433)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.4/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.4/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.4/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.4/Thread.java:834)

"Attach Listener" #21 daemon prio=9 os_prio=0 cpu=0.33ms elapsed=0.10s tid=0x00007f35dc001800 nid=0x6473 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"VM Thread" os_prio=0 cpu=37188.73ms elapsed=65383.04s tid=0x00007f360c0ad800 nid=0x692e runnable  

"VM Periodic Task Thread" os_prio=0 cpu=40128.86ms elapsed=65382.99s tid=0x00007f360c0fb800 nid=0x6936 waiting on condition  

JNI global refs: 17, weak refs: 0

你可能感兴趣的:(java,行走的问题解决机)