[
https://issues.apache.org/jira/browse/HTTPASYNC-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oleg Kalnichevski resolved HTTPASYNC-36.
----------------------------------------
Resolution: Cannot Reproduce
Clinton
I do see how this issue could be a result of a race condition given that
timeout event can be triggered by an I/O dispatch thread only. I may well be
missing something but without a reproducer there is no way for me to find that
out.
On the other hand there might be a simpler explanation for multiple log
entries. This is how timeout handling code looks like:
---
public synchronized void failed(final Exception ex) {
try {
if (!this.requestSent) {
this.requestProducer.failed(ex);
}
this.responseConsumer.failed(ex);
} finally {
try {
this.resultCallback.failed(ex, this);
} finally {
close();
}
}
}
---
As you can see the same exception instance can be potentially passed to three
different callbacks (request producer / response consumer / future callback).
If all of them log that exception there can be three entires for the same
exception. Could that be the reason?
Oleg
> SocketTimeoutException can result in failed() being called multiple times
> -------------------------------------------------------------------------
>
> Key: HTTPASYNC-36
> URL: https://issues.apache.org/jira/browse/HTTPASYNC-36
> Project: HttpComponents HttpAsyncClient
> Issue Type: Bug
> Affects Versions: 4.0-beta3
> Reporter: Clinton Nielsen
>
> Appears to be a race condition, so I am having trouble duplicating, but we
> have observed the failed callback method being called twice for a single
> request that timed out.
> Following stack trace was logged twice for a single request:
> HttpAsyncRequestExecutor.java:279:org.apache.http.nio.protocol.HttpAsyncRequestExecutor:timeout
> LoggingAsyncRequestExecutor.java:128:org.apache.http.impl.nio.client.LoggingAsyncRequestExecutor:timeout
> DefaultHttpClientIODispatch.java:136:org.apache.http.impl.nio.DefaultHttpClientIODispatch:onTimeout
> DefaultHttpClientIODispatch.java:50:org.apache.http.impl.nio.DefaultHttpClientIODispatch:onTimeout
> AbstractIODispatch.java:169:org.apache.http.impl.nio.reactor.AbstractIODispatch:timeout
> BaseIOReactor.java:257:org.apache.http.impl.nio.reactor.BaseIOReactor:sessionTimedOut
> AbstractIOReactor.java:494:org.apache.http.impl.nio.reactor.AbstractIOReactor:timeoutCheck
> BaseIOReactor.java:207:org.apache.http.impl.nio.reactor.BaseIOReactor:validate
> AbstractIOReactor.java:284:org.apache.http.impl.nio.reactor.AbstractIOReactor:execute
> BaseIOReactor.java:106:org.apache.http.impl.nio.reactor.BaseIOReactor:execute
> AbstractMultiworkerIOReactor.java:604:org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker:run
> Thread.java:636:java.lang.Thread:run | class java.net.SocketTimeoutException
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]