Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8158980

Memory leak in HTTP2Connection.streams

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b125
    • Verification:
      Not verified

      Description

      Stream will be never deleted from HTTP2Connection.streams in the following conditions:
      1. "content-len" of sending data is zero. e.g. "GET" request.
       in that case "Stream.requestSent" will never be set to true.

      2. "Stream.responseReceived" is never set to "true" when used following BodyPropcessors (asByteArray, asByteArrayConsumer, asFile, asFileDownload, asString).

      Removing Stream from HTTP2Connection requires both fields set to true, so failing normal settting only one of this fields causes memory leak.

      The issue is easily reproduces - simple loop with GET request via HTTP/2 leads to OutOfMemoryError.

        Attachments

          Activity

            People

            Assignee:
            skuksenko Sergey Kuksenko
            Reporter:
            skuksenko Sergey Kuksenko
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: