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

   **[Dmitry 
Potapov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hirthwork)**
 opened 
**[HTTPCORE-376](https://issues.apache.org/jira/browse/HTTPCORE-376?redirect=false)**
 and commented
   
   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
   
   
   ---
   
   **Affects:** 4.3.2
   
   **Attachments:**
   - [patch](https://issues.apache.org/jira/secure/attachment/12636666/patch) 
(_2.21 kB_)
   


-- 
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