hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPASYNC-6) I/O reactor (client) terminates abnormally when a connection is prematurely closed probably because of timeout settings. A NullpointerException is thrown when a response is being read and the connection is already closed and set to null
Date Tue, 06 Sep 2011 11:53:09 GMT

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

Oleg Kalnichevski resolved HTTPASYNC-6.
---------------------------------------

    Resolution: Fixed

Menno,

I applied a fix for the problem to SVN trunk. However, since there was no reliable reproducer
the fix is based on my assumption as to what the cause might have been. It would be great
if you could reproduce the problem with the wire / context logging turned on and attach the
log to this ticket.

Please re-test your application against the latest SVN snapshot to verify the fix.

Oleg   

> I/O reactor (client) terminates abnormally when a connection is prematurely closed probably
because of timeout settings. A NullpointerException is thrown when a response is being read
and the connection is already closed and set to null
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPASYNC-6
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-6
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.0-alpha2
>         Environment: Windows Vista , Sun Java SDK 1.6.0_26
>            Reporter: Menno van Gangelen
>            Priority: Critical
>             Fix For: 4.0-alpha3
>
>
> The following line should have a check for null.
> org.apache.http.impl.nio.client.DefaultAsyncRequestDirector.responseCompleted(DefaultAsyncRequestDirector.java:366);
> =>           if (this.managedConn.isOpen()) {
> Hard to reproduce as it seems to be a racing issue when reading from slow websites.
> 2011-09-03 10:40:53,312 [I/O dispatcher 2] ERROR DefaultHttpAsyncClient - Fatal runtime
error
> java.lang.NullPointerException
> 	at org.apache.http.impl.nio.client.DefaultAsyncRequestDirector.responseCompleted(DefaultAsyncRequestDirector.java:366)
> 	at org.apache.http.impl.nio.client.NHttpClientProtocolHandler.processResponse(NHttpClientProtocolHandler.java:357)
> 	at org.apache.http.impl.nio.client.NHttpClientProtocolHandler.inputReady(NHttpClientProtocolHandler.java:196)
> 	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:172)
> 	at org.apache.http.impl.nio.client.InternalClientEventDispatch.inputReady(InternalClientEventDispatch.java:76)
> 	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:161)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:335)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:275)
> 	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
> 	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:542)
> 	at java.lang.Thread.run(Thread.java:662)
> 2011-09-03 10:40:53,692 [Thread-4] ERROR DefaultHttpAsyncClient - I/O reactor terminated
abnormally
> org.apache.http.nio.reactor.IOReactorException: I/O dispatch worker terminated abnormally
> 	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:321)
> 	at org.apache.http.impl.nio.conn.PoolingClientConnectionManager.execute(PoolingClientConnectionManager.java:91)
> 	at org.apache.http.impl.nio.client.AbstractHttpAsyncClient.doExecute(AbstractHttpAsyncClient.java:441)
> 	at org.apache.http.impl.nio.client.AbstractHttpAsyncClient.access$000(AbstractHttpAsyncClient.java:95)
> 	at org.apache.http.impl.nio.client.AbstractHttpAsyncClient$1.run(AbstractHttpAsyncClient.java:462)
> Caused by: java.lang.NullPointerException
> 	at org.apache.http.impl.nio.client.DefaultAsyncRequestDirector.responseCompleted(DefaultAsyncRequestDirector.java:366)
> 	at org.apache.http.impl.nio.client.NHttpClientProtocolHandler.processResponse(NHttpClientProtocolHandler.java:357)
> 	at org.apache.http.impl.nio.client.NHttpClientProtocolHandler.inputReady(NHttpClientProtocolHandler.java:196)
> 	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:172)
> 	at org.apache.http.impl.nio.client.InternalClientEventDispatch.inputReady(InternalClientEventDispatch.java:76)
> 	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:161)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:335)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:275)
> 	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
> 	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:542)
> 	at java.lang.Thread.run(Thread.java:662)
> Subsequent calls fail with the following exception
> java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Client has
been shut down

--
This message is automatically generated by JIRA.
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


Mime
View raw message