RFR JDK-8158980: Memory leak in HTTP2Connection.streams
Sergey Kuksenko
sergey.kuksenko at oracle.com
Mon Jun 20 20:24:30 UTC 2016
Hi,
Could you please review the following fix for JDK-8158980?
http://cr.openjdk.java.net/~skuksenko/jep110/8158980/webrev.00/
Fix solves the following issue:
https://bugs.openjdk.java.net/browse/JDK-8158980
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
BodyProcessors (asByteArray, asByteArrayConsumer, asFile,
asFileDownload, asString).
Removing Stream from HTTP2Connection requires both fields set to true,
so failing normal setting only one of this fields causes memory leak.
The issue is easily reproduces - simple loop with GET request via HTTP/2
leads to OutOfMemoryError.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20160620/9d1bd05d/attachment-0001.html>
More information about the net-dev
mailing list