Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
4.4.7
-
None
-
Wildfly 12 + jdk 1.8.144
Description
Hi,
we found the following deadlock :
Found one Java-level deadlock:
=============================
"I/O dispatcher 7627":
waiting to lock monitor 0x000000000bbb7428 (object 0x00000000bdf9d240, a java.lang.Object),
which is held by "default task-897"
"default task-897":
waiting to lock monitor 0x0000000004b38638 (object 0x00000000bdf9d158, a sun.nio.ch.SelectionKeyImpl),
which is held by "I/O dispatcher 7627"
Java stack information for the threads listed above:
===================================================
"I/O dispatcher 7627":
at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:111)
- waiting to lock <0x00000000bdf9d240> (a java.lang.Object)
at org.apache.http.impl.nio.reactor.IOSessionImpl.close(IOSessionImpl.java:226) - locked <0x00000000bdf9d158> (a sun.nio.ch.SelectionKeyImpl)
at org.apache.http.impl.nio.reactor.IOSessionImpl.shutdown(IOSessionImpl.java:254)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.connected(AbstractIODispatch.java:91)
at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionCreated(BaseIOReactor.java:250)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processNewChannels(AbstractIOReactor.java:429)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:289)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:590)
at java.lang.Thread.run(Thread.java:748)
"default task-897":
at java.nio.channels.spi.AbstractSelectionKey.cancel(AbstractSelectionKey.java:70) - waiting to lock <0x00000000bdf9d158> (a sun.nio.ch.SelectionKeyImpl)
at java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:240) - locked <0x00000000bdf9d280> (a java.lang.Object)
at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115) - locked <0x00000000bdf9d240> (a java.lang.Object)
at org.apache.http.impl.nio.reactor.SessionRequestImpl.cancel(SessionRequestImpl.java:215)
at org.apache.http.nio.pool.AbstractNIOConnPool.shutdown(AbstractNIOConnPool.java:214)
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.shutdown(PoolingNHttpClientConnectionManager.java:206)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.close(CloseableHttpAsyncClientBase.java:99)
_______________
we think the issue is due to SessionRequestImpl.java at 215 calling a channel.close() not synchronized while AbstractInterruptibleChannel.java:111 is synchronized
Attachments
Issue Links
- duplicates
-
HTTPCORE-564 Eliminate a deadlock in IOReactor
- Resolved