JDK-7033523 : Memory leak in java.util.zip.ZipFile
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_redhat_5.0
  • CPU: x86
  • Submitted: 2011-04-04
  • Updated: 2012-03-20
  • Resolved: 2011-04-11
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b136)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b06, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
Running JBoss4.0.5 with mentioned Java7 leads to the Set java.util.zip.ZipFile.streams growing infinitely.
  From what can be seen in the heap-dump is that there are lots of entries for the same loaded JAR-file, despite no finalizers existing anymore in the same amount of files.
Therefore assuming, that the files have been closed, but were not removed from the "streams" Set as they are supposed to be.

Running the same configuration with Java6u24 does not show this problem at all.

REGRESSION.  Last worked in version 6u24

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run an application, that makes frequent use of access to java.util.jar.JarFile and its concrete implementation sun.net.www.protocol.jar.URLJarFile.


REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION This is very little information in this bug report but we believe it's a duplicate of 7031076. The change for 7031076 are planned for jdk7 b140 or b142 so it would be great if the submitter could re-test and submit a new bug with more information if they still observe the issue.
11-04-2011