hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Potapov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCORE-376) AbstractNIOConnPool.requestCancelled() should not call processNextPendingRequest() when ioreactor is shutting down
Date Tue, 25 Mar 2014 11:25:15 GMT
Dmitry Potapov created HTTPCORE-376:
---------------------------------------

             Summary: AbstractNIOConnPool.requestCancelled() should not call processNextPendingRequest()
when ioreactor is shutting down
                 Key: HTTPCORE-376
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-376
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore NIO
    Affects Versions: 4.3.2
            Reporter: Dmitry Potapov
            Priority: Minor


Currently AbstractMultiworkerIOReactor.doShutdown() sets its status to SHUTTING_DOWN causes
all pending request to be cancelled. This causes AbstractNIOConnPool.requestCancelled() to
be called, which in turn processed next pending request causing DefaultConnectingIOReactor.connect()
to be called. At this point assertion fails and we get the following stack trace:

Mar 21, 2014 3:04:49 PM org.apache.http.impl.nio.client.InternalHttpAsyncClient doExecute
SEVERE: I/O reactor terminated abnormally
java.lang.IllegalStateException: I/O reactor has been shut down
        at org.apache.http.util.Asserts.check(Asserts.java:34)
        at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.connect(DefaultConnectingIOReactor.java:226)
        at org.apache.http.nio.pool.AbstractNIOConnPool.processPendingRequest(AbstractNIOConnPool.java:425)
        at org.apache.http.nio.pool.AbstractNIOConnPool.processNextPendingRequest(AbstractNIOConnPool.java:336)
        at org.apache.http.nio.pool.AbstractNIOConnPool.requestCancelled(AbstractNIOConnPool.java:513)
        at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.cancelled(AbstractNIOConnPool.java:801)
        at org.apache.http.impl.nio.reactor.SessionRequestImpl.cancel(SessionRequestImpl.java:221)
        at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.cancelRequests(DefaultConnectingIOReactor.java:135)
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.doShutdown(AbstractMultiworkerIOReactor.java:402)
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:376)
        at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:190)
        at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.doExecute(CloseableHttpAsyncClientBase.java:67)
        at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.access$000(CloseableHttpAsyncClientBase.java:38)
        at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:57)
        at java.lang.Thread.run(Thread.java:780)

My suggestion is to forbid next pending request processing if ioreactor is shutting down



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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


Mime
View raw message