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 2022/07/21 13:04:00 UTC

[jira] [Resolved] (HTTPCORE-719) Infinite loop when setIOSessionDecorator() is used

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

Oleg Kalnichevski resolved HTTPCORE-719.
----------------------------------------
    Resolution: Invalid

> Infinite loop when setIOSessionDecorator() is used
> --------------------------------------------------
>
>                 Key: HTTPCORE-719
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-719
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 5.1.4
>            Reporter: Isaac Cruz Ballesteros
>            Priority: Major
>         Attachments: infiniteLoop.zip
>
>
> Initializing an async HTTPS server with setIOSessionDecorator makes library to enter on an infinite loop with following exception when client closes connection abruptly:
> {noformat}
> java.net.SocketException: Connection reset
>     at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:367) ~[?:?]
>     at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:383) ~[?:?]
>     at org.apache.hc.core5.reactor.IOSessionImpl.read(IOSessionImpl.java:202) ~[httpcore5-5.1.4.jar:5.1.4]
>     at org.apache.hc.core5.reactor.ssl.SSLIOSession.receiveEncryptedData(SSLIOSession.java:519) ~[httpcore5-5.1.4.jar:5.1.4]
>     at org.apache.hc.core5.reactor.ssl.SSLIOSession.access$200(SSLIOSession.java:72) ~[httpcore5-5.1.4.jar:5.1.4]
>     at org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:170) ~[httpcore5-5.1.4.jar:5.1.4]
>     at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:133) [httpcore5-5.1.4.jar:5.1.4]
>     at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51) [httpcore5-5.1.4.jar:5.1.4]
>     at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178) [httpcore5-5.1.4.jar:5.1.4]
>     at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127) [httpcore5-5.1.4.jar:5.1.4]
>     at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85) [httpcore5-5.1.4.jar:5.1.4]
>     at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) [httpcore5-5.1.4.jar:5.1.4]
>     at java.lang.Thread.run(Thread.java:832) [?:?]{noformat}
> I have attached a maven project with a simple example, it initializes server and connects from a client. It reproduces when client does not consume what server writes.
> If you comment out line 75 of HttpsServer.java, then it works correctly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org