[ 
https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPASYNC-16.
----------------------------------------

    Resolution: Invalid

It looks like this is not a deadlock in HttpAsyncClient code but rather a 
synchronization problem in the application code.

Judging by the tread dump what is likely to be happening is that: 
AbstractNIOConnPool detects a timed out connection request and tries to notify 
the caller by invoking the failed() method of the future callback. The callback 
implementation starts a Hibernate transaction which gets blocked somewhere deep 
down on the BasicResourcePool class waiting for a resource to become available. 
The callback never returns. The pool remains locked.

Oleg

"I/O dispatcher 251" prio=10 tid=0x0000000002097800 nid=0x12e5 in Object.wait() 
[0x00007f234079c000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e6bbd210> (a 
com.mchange.v2.resourcepool.BasicResourcePool)
        at 
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1315)
...
        at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:57)
        at 
com.laadhari.musicdb.sing365.MyFutureCallBack.failed(MyFutureCallBack.java:208)
...
        at 
org.apache.http.impl.nio.client.DefaultResultCallback.failed(DefaultResultCallback.java:52)
        at 
org.apache.http.impl.nio.client.DefaultAsyncRequestDirector.connectionRequestFailed(DefaultAsyncRequestDirector.java:534)
...
        at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:122)
...
        at 
org.apache.http.nio.pool.AbstractNIOConnPool.processPendingRequests(AbstractNIOConnPool.java:244)
...
                
> DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs
> ---------------------------------------------------------------------
>
>                 Key: HTTPASYNC-16
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-16
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.0-beta2
>         Environment: JAVA 7 linux ubuntu 2.6.32-23
>            Reporter: LAADHARI saber
>         Attachments: ThreadsStack.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> the shutdown methode hangs sometime indefinitely.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to