You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2019/10/12 09:51:00 UTC

[jira] [Updated] (HTTPCORE-605) Infinite loop on half close

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

Oleg Kalnichevski updated HTTPCORE-605:
---------------------------------------
    Fix Version/s: 4.4.13
         Priority: Minor  (was: Major)

> 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: Minor
>             Fix For: 4.4.13
>
>
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org