jira-importer opened a new issue, #1396:
URL: https://github.com/apache/httpcomponents-core/issues/1396

   **[Andrea 
Grassi](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andgra)** 
opened 
**[HTTPCORE-580](https://issues.apache.org/jira/browse/HTTPCORE-580?redirect=false)**
 and commented
   
   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
   
   
   
   ---
   
   **Affects:** 4.4.7
   
   **Issue Links:**
   - [HTTPCORE-564](https://issues.apache.org/jira/browse/HTTPCORE-564) 
Eliminate a deadlock in IOReactor
    (_**"duplicates"**_)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to