Lukas O'Daniel created HTTPCORE-647:
---------------------------------------
Summary: Connection aborted infinite loop
Key: HTTPCORE-647
URL: https://issues.apache.org/jira/browse/HTTPCORE-647
Project: HttpComponents HttpCore
Issue Type: Bug
Affects Versions: 4.4.13
Environment: java 8
Reporter: Lukas O'Daniel
Attachments: Client.java, Entity.java, Server.java
There is some issue that occurs when a response is not fully written and the
connection closes or times out in 4.4.13. When this occurs, there is some
infinite loop that logs the stack trace multiple times per millisecond. I have
attached a simple example that can reproduce this behavior. The entity I'm
using is based on NByteArrayEntity. In practice this issue was extremely rare
on our servers, but requires restart to fix.
This can be reproduced by running [^Server.java] and then running [^Client.java]
For localhost I get the error and stack trace dumped infinitely:
{{java.io.IOException: An established connection was aborted by the software in
your host machinejava.io.IOException: An established connection was aborted by
the software in your host machine at sun.nio.ch.SocketDispatcher.write0(Native
Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51) at
sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) at
sun.nio.ch.IOUtil.write(IOUtil.java:65) at
sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) at
org.apache.http.impl.nio.reactor.SessionOutputBufferImpl.flush(SessionOutputBufferImpl.java:182)
at
org.apache.http.impl.nio.DefaultNHttpServerConnection.produceOutput(DefaultNHttpServerConnection.java:316)
at
org.apache.http.impl.nio.DefaultHttpServerIODispatch.onOutputReady(DefaultHttpServerIODispatch.java:248)
at
org.apache.http.impl.nio.DefaultHttpServerIODispatch.onOutputReady(DefaultHttpServerIODispatch.java:57)
at
org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(AbstractIODispatch.java:145)
at
org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:187)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:341)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
at
org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at
org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
at java.lang.Thread.run(Thread.java:748)}}
I was getting the equivalent on remote hosts with different error message:
{{ java.io.IOException: An existing connection was forcibly closed by the
remote host}}
Apologies for formatting, etc this is my first open source bug report.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]