-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Native memory leak - GZIPInputStream is not closed #949
Copy link
Copy link
Closed
Milestone
Description
Using jwt token with GZIP compression cause native (not heap) memory leak because the GZIPInputStream is not closed.
After large number of decompressing cca. 500 MB of extra memory is used by the java process. This extra usage can see in /proc/1/status only. The java native memory tracking will not show it.
Running application in kubernetes will result kubernetes level OOM because this extra memory usage when memory limit is set.
Hacking GzipCompressionAlgorithm.doDecompress(InputStream is) like this there is no memory leak:
protected InputStream doDecompress(InputStream is) throws IOException {
GZIPInputStream gzipIs = new GZIPInputStream(is);
byte[] tmpIs = gzipIs.readAllBytes();
gzipIs.close();
return Streams.of(tmpIs);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels