You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "LAADHARI saber (Created) (JIRA)" <ji...@apache.org> on 2012/04/10 05:17:33 UTC

[jira] [Created] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

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
            Priority: Blocker


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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "William R. Speirs (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250697#comment-13250697 ] 

William R. Speirs commented on HTTPASYNC-16:
--------------------------------------------

Can you submit a reproducer?
                
> 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
>            Priority: Blocker
>   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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "LAADHARI saber (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

LAADHARI saber updated HTTPASYNC-16:
------------------------------------

    Attachment: ThreadsStack.txt

Here is the attached threads.

Also notice that my logger:

At 21:56:47.771 [main] INFO  com.laadhari.musicdb.sing365.App [AsyncClientHttpExchangeFutureCallback.java:136] - Shutting down
then the main thread called shutdown().

Then after shutdown() it was supossed to print "Was shutdown"

At 2012-04-13 23:56:50. I did kill -3 pidOfJVM


Also my dependency:

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpasyncclient</artifactId>
            <version>4.0-beta2-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore-nio</artifactId>
            <version>4.2-beta1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.2-beta1</version>
        </dependency>
                
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "Oleg Kalnichevski (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPASYNC-16:
---------------------------------------

    Priority: Major  (was: Blocker)
    
> 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
>   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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "LAADHARI saber (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13251211#comment-13251211 ] 

LAADHARI saber commented on HTTPASYNC-16:
-----------------------------------------

i try to update from to a repository at URL 'https://svn.apache.org/repos/asf/httpcomponents/httpasyncclient/trunk

but it still  At revision 1312057. last change date 30 mars 2012 17:18:24. 

Have you committed the changes Oleg ?
                
> 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
>            Priority: Blocker
>   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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Resolved] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "Oleg Kalnichevski (Resolved) (JIRA)" <ji...@apache.org>.
     [ 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "LAADHARI saber (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13251069#comment-13251069 ] 

LAADHARI saber commented on HTTPASYNC-16:
-----------------------------------------

hi.
i cant submit a reproducer but does happens quite ofthen every 1 or hours. while heavly crawling a web server
                
> 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
>            Priority: Blocker
>   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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "Oleg Kalnichevski (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13251104#comment-13251104 ] 

Oleg Kalnichevski commented on HTTPASYNC-16:
--------------------------------------------

Can you upgrade to the latest SVN snapshot and re-test your application? I fixed a deadlock condition in the shutdown code just recently.

Oleg
                
> 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
>            Priority: Blocker
>   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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "Oleg Kalnichevski (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13251528#comment-13251528 ] 

Oleg Kalnichevski commented on HTTPASYNC-16:
--------------------------------------------

Yes, I have. You just need the latest snapshot. There have been no changes in April.

Oleg
                
> 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
>   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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "Oleg Kalnichevski (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253584#comment-13253584 ] 

Oleg Kalnichevski commented on HTTPASYNC-16:
--------------------------------------------

My bad. Here's the commit that I had in mind, but obviously the fix was included in 4.0-beta1

https://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/AbstractHttpAsyncClient.java?r1=1174794&r2=1240744&pathrev=1240744

I understand it may be difficult to reproduce the problem but could you please at least post a thread dump taken after the deadlock?

Oleg 
                
> 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
>   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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPASYNC-16) DefaultHttpAsyncClient/AbstractHttpAsyncClient shutdown medthod hangs

Posted by "LAADHARI saber (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPASYNC-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253010#comment-13253010 ] 

LAADHARI saber commented on HTTPASYNC-16:
-----------------------------------------

Witch tag / repos ? i can not find the changes ? could you high lights the changes or post a patch.
                
> 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
>   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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org