[ https://issues.apache.org/jira/browse/HTTPCORE-644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17171509#comment-17171509 ]
Oleg Kalnichevski commented on HTTPCORE-644: -------------------------------------------- [~arunans23] I was unable to reproduce the issue with Oracle 1.8.0_251, Oracle 11.0.7 and AdoptOpenJDK 11.0.8. Please let me know what exact JRE I should be using to reproduce the issue. ``` java version "1.8.0_251" Java(TM) SE Runtime Environment (build 1.8.0_251-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode) ``` ``` java version "11.0.7" 2020-04-14 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode) ``` ``` openjdk version "11.0.8" 2020-07-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode) ``` Oleg > High CPU usage noticed for SSLIOSession.close() after JDK upgrade > ----------------------------------------------------------------- > > Key: HTTPCORE-644 > URL: https://issues.apache.org/jira/browse/HTTPCORE-644 > Project: HttpComponents HttpCore > Issue Type: Bug > Components: HttpCore, HttpCore NIO > Environment: Oracle JDK 1.8.0_261 (released in July 2020) > AdoptOpenJDK (build 11.0.8+10) > All versions after Oracle JDK 11.0.1 > Reporter: Arunan Sugunakumar > Priority: Major > Attachments: Screenshot 2020-08-04 at 08.48.18.png, Screenshot > 2020-08-04 at 08.53.58.png, Screenshot 2020-08-04 at 08.57.47.png, > image-2020-08-03-13-02-35-195.png > > > We are using a *forked version (4.3.3)* of HttpCore NIO. We recently had an > issue because of JDK upgrade. When a HTTPS connection is closed from the > server side, the server CPU usage seems to be increasing and stays on > forever. We debugged and found out that after the HTTPS response is written > back to the client, the server tries to close the connection and the > SSLIOSession. Prior to JDK 8 261 versions (& Prior to Oracle JDK 11.0.2), > after SSLIOSession closes the outBound connection, the Handshake status is > returned as NEED_UNWRAP. When such status is returned, we set the new event > Mask as Read EventMask. In the new JDK versions it is returned as > NOT_HANDSHAKING. In such cases, the SSLSession is not getting closed > properly, and the server is constantly trying to close the connection with > Write events which causes the CPU spike. We debugged the JDK code, and we > were able to find a commit[1], which might have caused this behaviour. With > this JDK commit, TransportContext Handshake status is returned as > NOT_HANDSHAKING even after closeOutbound() is called. (The issue is > reproducible for both TLSv1.2 and TLSv1.3) > > (Code snippet from JDK 11 commit) > !image-2020-08-03-13-02-35-195.png! > > *I am not sure, whether this issue is reproducible in the latest HttpCore > version*. But since this a JDK level change, it might affect all versions. We > observed the issue with the following JDK versions. > * Oracle JDK 1.8.0_261 (released in July 2020) > * AdoptOpenJDK (build 11.0.8+10) > * All versions after Oracle JDK 11.0.1 > > Any help here is appreciated. > > [1]- > [https://github.com/AdoptOpenJDK/openjdk-jdk11u/commit/8d1b63a4db2c6348a97b3cf45bd4d2caa7cad6b5] -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org