jira-importer opened a new issue, #861: URL: https://github.com/apache/httpcomponents-core/issues/861
**[Scott Stanton](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=stanton)** opened **[HTTPCORE-334](https://issues.apache.org/jira/browse/HTTPCORE-334?redirect=false)** and commented Steps to reproduce: * Start a process that listens on a socket, accepts the connection, but does not read any data * In a second processs, establish an https connection At this point, one reactor thread will go into a busy loop getting writable events but not writing any data. As far as I can tell, this continues indefinitely until either the client or the server closes the port. Ideally this scenario would result in no cpu overhead as the selector should only be waiting for read events if it doesn't have any data to write. Eventually it should hit an idle timeout so the client can recover from a non responsive server. Here is a stack snapshot for the busy thread: Agent-003 [RUNNABLE, IN_NATIVE] CPU time: 39s com.yourkit.probes.Table.createRow() com.yourkit.probes.Table.createRow(int) com.yourkit.probes.builtin.Sockets$SocketChannel_write_Probe.onEnter(SocketChannel) sun.nio.ch.SocketChannelImpl.write(ByteBuffer) org.apache.http.nio.reactor.ssl.SSLIOSession.sendEncryptedData() org.apache.http.nio.reactor.ssl.SSLIOSession.outboundTransport() org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(IOSession) org.apache.http.impl.nio.reactor.BaseIOReactor.writable(SelectionKey) org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(SelectionKey) org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(Set) org.apache.http.impl.nio.reactor.AbstractIOReactor.execute() org.apache.http.impl.nio.reactor.BaseIOReactor.execute(IOEventDispatch) org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run() java.lang.Thread.run() com.electriccloud.util.EcThread.run() --- **Affects:** 4.2.4 **Attachments:** - [HTTPCORE-334.patch](https://issues.apache.org/jira/secure/attachment/12570022/HTTPCORE-334.patch) (_2.27 kB_) - [TestHttpsAsyncTimeout.java](https://issues.apache.org/jira/secure/attachment/12570037/TestHttpsAsyncTimeout.java) (_4.07 kB_) **Backported to:** [4.2.4](https://github.com/apache/httpcomponents-core/milestone/27?closed=1) -- 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]
