[ 
https://issues.apache.org/jira/browse/HTTPCORE-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16949677#comment-16949677
 ] 

Hunter Presnall commented on HTTPCORE-605:
------------------------------------------

I did remove this from the classpath and switch to the default JSSE provider 
and I am not hitting an infinite loop any more.

It lower priority to debug this for me now that we have a work around. You can 
close this if you want, unless you think there will need to be code in httpcore 
to fix this like in HTTPCORE-601.

> Infinite loop on half close
> ---------------------------
>
>                 Key: HTTPCORE-605
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-605
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.4.11
>            Reporter: Hunter Presnall
>            Priority: Major
>
> When the server half-closes the connection, the http client gets stuck in an 
> infinite loop with a writable selection key, but no data to send. They 
> selection key is never cleared and empty buffers are continually sent.
> The stack trace when this happens is:
> {{"I/O dispatcher 2" #30 prio=5 os_prio=0 tid=0x00007fd7cc0a5000 nid=0x2c 
> runnable [0x00007fd7db6fb000]"I/O dispatcher 2" #30 prio=5 os_prio=0 
> tid=0x00007fd7cc0a5000 nid=0x2c runnable [0x00007fd7db6fb000]   
> java.lang.Thread.State: RUNNABLE at sun.nio.ch.NativeThread.current(Native 
> Method) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:468) - 
> locked <0x0000000091fb63b0> (a java.lang.Object) - locked 
> <0x0000000091fb63a0> (a java.lang.Object) at 
> org.apache.http.nio.reactor.ssl.SSLIOSession.sendEncryptedData(SSLIOSession.java:423)
>  at 
> org.apache.http.nio.reactor.ssl.SSLIOSession.outboundTransport(SSLIOSession.java:549)
>  - locked <0x0000000091fb6630> (a 
> org.apache.http.nio.reactor.ssl.SSLIOSession) at 
> org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(AbstractIODispatch.java:154)
>  at 
> org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:188)
>  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)}}
>  
> This is similar to 
> [HTTPCORE-528|https://issues.apache.org/jira/browse/HTTPCORE-528]  which was 
> fixed in 4.4.10. When we upgraded the client to 4.4.11, this new issue 
> appeared. I suspect similar handling where there is write interest but no 
> data needs to remove the write mask.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to