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

   **[Lukas 
O'Daniel](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=lukasodaniel)**
 opened 
**[HTTPCORE-647](https://issues.apache.org/jira/browse/HTTPCORE-647?redirect=false)**
 and commented
   
   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 seems like it could be related to the fix for 
[HTTPCORE-607](https://issues.apache.org/jira/browse/HTTPCORE-607). I don't get 
this issue, at least for this example code, using 4.4.12 and previous.
    
   
   
   ---
   
   **Affects:** 4.4.13
   
   **Attachments:**
   - 
[Client.java](https://issues.apache.org/jira/secure/attachment/13010122/Client.java)
 (_1.76 kB_)
   - 
[Entity.java](https://issues.apache.org/jira/secure/attachment/13010124/Entity.java)
 (_3.69 kB_)
   - 
[Server.java](https://issues.apache.org/jira/secure/attachment/13010123/Server.java)
 (_2.27 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