-
Enhancement
-
Resolution: Unresolved
-
P3
-
20, 22, 23, 24
A DESCRIPTION OF THE PROBLEM :
jshell seems to create a instance of JavacFileManager here
at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.<init>(JavacFileManager.java:162)
at jdk.compiler/com.sun.tools.javac.api.JavacTool.getStandardFileManager(JavacTool.java:108)
at jdk.compiler/com.sun.tools.javac.api.JavacTool.getStandardFileManager(JavacTool.java:68)
at jdk.jshell/jdk.jshell.TaskFactory.<init>(TaskFactory.java:120)
at jdk.jshell/jdk.jshell.JShell.<init>(JShell.java:148)
at jdk.jshell/jdk.jshell.JShell$Builder.build(JShell.java:425)
but this JavacFileManager (Closeable instance) is never closed and starts to leak "jdk.nio.zipfs.ZipFileSystem$IndexNode" objects, that i can see trace back to its root
GC Root
Name
key in ⭕ java.util.linkedHashMap$Entry#162768
[617] in [] java.util.HashMap$Node[]#95350 : 2,048 items
table in ⭕ java.util.LinkedHashMap#81607 : 972 elements
inodes in ⭕ jdk.nio.zipfs.ZipFileSystem#151
fileSystem in ⭕ com.sun.tools.javac.file.JavacFileManager$ArchiveContainer#41
value in ⭕ java.util.HashMap$Node#247973
[784] in [] java.util.HashMap$Node[]#131283 : 1,024 items
table in ⭕ java.util.HashMap#23705 : 691 elements
containers in ⭕ com.sun.tools.javac.file.JavacFileManager#3 [GC root - Java frame]
the JavacFileManager needs to be closed when JShell object (that IS cloasble) is closed
FREQUENCY : always
jshell seems to create a instance of JavacFileManager here
at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.<init>(JavacFileManager.java:162)
at jdk.compiler/com.sun.tools.javac.api.JavacTool.getStandardFileManager(JavacTool.java:108)
at jdk.compiler/com.sun.tools.javac.api.JavacTool.getStandardFileManager(JavacTool.java:68)
at jdk.jshell/jdk.jshell.TaskFactory.<init>(TaskFactory.java:120)
at jdk.jshell/jdk.jshell.JShell.<init>(JShell.java:148)
at jdk.jshell/jdk.jshell.JShell$Builder.build(JShell.java:425)
but this JavacFileManager (Closeable instance) is never closed and starts to leak "jdk.nio.zipfs.ZipFileSystem$IndexNode" objects, that i can see trace back to its root
GC Root
Name
key in ⭕ java.util.linkedHashMap$Entry#162768
[617] in [] java.util.HashMap$Node[]#95350 : 2,048 items
table in ⭕ java.util.LinkedHashMap#81607 : 972 elements
inodes in ⭕ jdk.nio.zipfs.ZipFileSystem#151
fileSystem in ⭕ com.sun.tools.javac.file.JavacFileManager$ArchiveContainer#41
value in ⭕ java.util.HashMap$Node#247973
[784] in [] java.util.HashMap$Node[]#131283 : 1,024 items
table in ⭕ java.util.HashMap#23705 : 691 elements
containers in ⭕ com.sun.tools.javac.file.JavacFileManager#3 [GC root - Java frame]
the JavacFileManager needs to be closed when JShell object (that IS cloasble) is closed
FREQUENCY : always