With a hybrid server that negotiates HTTP1 or HTTP2, the server does *not* spin after an HTTP2 request, only after an HTTP1 request.
Roy On Thu, Sep 12, 2019 at 2:24 PM Roy Hashimoto <[email protected]> wrote: > In the attached HttpCore 5.0 server program (gist > <https://gist.github.com/rhashimoto/584d270dc6d00b97c01ffbc6ee5e8e6c>), > I'm using Conscrypt for the TLS provider. It works, but I noticed that > after each request the CPU gets pegged to 100% usage. > > I'm using org.conscrypt:conscrypt-openjdk-uber:2.2.1 and HttpCore 5.0 from > source at the HTTPCORE-599 fix > <https://github.com/apache/httpcomponents-core/tree/44cab548cb4e15d56235aa12eaf0898d028351d0>. > I see the same behavior on macOS Mojave and Debian Jessie. I'm using > Conscrypt for ALPN on Java 8, though the minimal sample program here > doesn't enable it <https://stackoverflow.com/a/53399363/1462337>. > > What I see in the debugger is that SingleCoreIOReactor.doExecute() is > repeatedly called with this line > <https://github.com/apache/httpcomponents-core/blob/a652854fb5e63dd8565ed199b48557043277a30d/httpcore5/src/main/java/org/apache/hc/core5/reactor/SingleCoreIOReactor.java#L113> > returning readyCount=1. It looks like the selector is set to > SelectionKey.OP_WRITE, > > Not sure if this is a HttpCore bug or a Conscrypt bug. I looked through > the Conscrypt issues <https://github.com/google/conscrypt/issues> but > nothing caught my attention as related. > > Roy >
