You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2019/10/23 09:16:01 UTC

[jira] [Resolved] (HTTPASYNC-154) Deadlock (?) when using HttpAsyncClient in Java 11

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

Oleg Kalnichevski resolved HTTPASYNC-154.
-----------------------------------------
    Resolution: Cannot Reproduce

[~MadEgg] I cannot do much about this issue without a reproducer or at least a connection manager log. Please re-open once there is more information.

Oleg 

> Deadlock (?) when using HttpAsyncClient in Java 11
> --------------------------------------------------
>
>                 Key: HTTPASYNC-154
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-154
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.1.4
>         Environment: Ubuntu 19.04 amd64
> openjdk-8-jdk ~8u222-b10-1ubuntu1~19.04.1
> openjdk-11-jdk ~11.0.4+11-1ubuntu2~19.04
>            Reporter: Egbert
>            Priority: Minor
>
> I'm working on with a Java Webcrawler based on HttpAsyncClient, and I've encountered a situation where a deadlock occurs in Java 11, where it does not in Java 8. The software is based on a fork of crawler4j, jcrawler ([ https://bintray.com/pointpro/jcrawler/JCrawler#files/nl%2Fpointpro%2Fjcrawler%2F2.0.0-snapshot-201910090600|https://bintray.com/pointpro/jcrawler/JCrawler#files/nl%2Fpointpro%2Fjcrawler%2F2.0.0-snapshot-201910090600] to be exact)
> The lock occurs in `org.apache.http.nio.pool.AbstractNIOConnPool#lease(T, java.lang.Object, long, long, java.util.concurrent.TimeUnit, org.apache.http.concurrent.FutureCallback<E>)` on line 278 where the `ReentrantLock` `lock` is locked.
> A set of several dozen pages is fetched successfully, but after the 20th request, it just hangs there. A created a thread dump that shows the thread is waiting to lock, but the thread dump doesn't show any other thread locking this lock. It never acquires the lock - it just waits there indefinitely. I left it running for an hour or so before killing it. The lock AbstractNIOConnPool is waiting for never becomes available but no other thread seems to have locked it.
> I'm not sure where to begin gathering more information on this issue. The two versions I've tried are:
> openjdk-8-jdk ~8u222-b10-1ubuntu1~19.04.1
> and
> openjdk-11-jdk ~11.0.4+11-1ubuntu2~19.04
> I'm willing to collect additional information but I can see so many directions in where I can debug that I don't know where to start.
> I've switched back to Java 8 for now.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org