Details
-
Bug
-
Resolution: Fixed
-
P4
-
8, 11, 13, 14
-
b24
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8258923 | 13.0.6 | Ekaterina Vergizova | P4 | Resolved | Fixed | b04 |
JDK-8251897 | 11.0.9 | Volker Simonis | P4 | Resolved | Fixed | b04 |
JDK-8264841 | openjdk8u302 | Volker Simonis | P4 | Resolved | Fixed | b01 |
Description
ZipFileSystem caches MAX_FLATER (currently 20) Inflater/Deflater objects. However the logic for reusing Deflaters is wrong because it references the Inflater List when checking against the number of already cached objects. This seems like a day-one copy and paste error.
Notice that this issue is not as critical as it appears, because retaining of additional Deflaters only happens when more than MAX_FLATER are used and released concurrently. I.e. the maximum number of cached Deflaters is the maximal number of Deflaters that are released while no new Deflater is requested. In practice this is usually still a small number, less than MAX_FLATERS. Nevertheless we can easily construct an example which demonstrates the memory leak and because the fix is trivial we should really fix this.
Notice that this issue is not as critical as it appears, because retaining of additional Deflaters only happens when more than MAX_FLATER are used and released concurrently. I.e. the maximum number of cached Deflaters is the maximal number of Deflaters that are released while no new Deflater is requested. In practice this is usually still a small number, less than MAX_FLATERS. Nevertheless we can easily construct an example which demonstrates the memory leak and because the fix is trivial we should really fix this.
Attachments
Issue Links
- backported by
-
JDK-8251897 (zipfs) Memory leak in ZipFileSystem.releaseDeflater()
- Resolved
-
JDK-8258923 (zipfs) Memory leak in ZipFileSystem.releaseDeflater()
- Resolved
-
JDK-8264841 (zipfs) Memory leak in ZipFileSystem.releaseDeflater()
- Resolved