-
Enhancement
-
Resolution: Fixed
-
P4
-
9, 11, 13, 14, 15
-
b17
The test hotspot/test/runtime/RedefineTests/RedefineLeak.java report as "passed" by jtreg, but when we execute one of the sub-programs exec'ed by this test, it reports out of metaspace memory
(you can cut-and-paste this from the RedefineLeak.jtr file)
${JDK9_ROOT}/promoted/ea/148/binaries/linux-x64/bin/java -cp /jdk/tmp/jtreg/work/classes/runtime/RedefineTests:/jdk/hs/hotspot/test/runtime/RedefineTests:/jdk/tmp/jtreg/work/classes/test/lib:/jdk/hs/test/lib:${JTREG_ROOT}/promoted/jtreg/4.2/fcs/b04/binaries/jtreg/lib/javatest.jar:${JTREG_ROOT}/promoted/jtreg/4.2/fcs/b04/binaries/jtreg/lib/jtreg.jar -XX:MetaspaceSize=12m -XX:MaxMetaspaceSize=12m -javaagent:redefineagent.jar -verbose RedefineLeak
[....]
[21.075s][info][class,load] RedefineLeak$Tester source: __VM_RedefineClasses__
[21.077s][info][class,load] RedefineLeak$Tester source: __VM_RedefineClasses__
transformCount:10000
[21.079s][info][class,load] RedefineLeak$Tester source: __VM_RedefineClasses__
[21.081s][info][class,load] RedefineLeak$Tester source: __VM_RedefineClasses__
[21.108s][info][class,load] jdk.internal.vm.PostVMInitHook source: jrt:/java.base
[21.108s][info][class,load] sun.usagetracker.UsageTrackerClient source: jrt:/java.base
[21.109s][info][class,load] java.util.concurrent.atomic.AtomicBoolean source: jrt:/java.base
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/66233253 0x00000007c00f8028
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/788117692 0x00000007c00f7c28
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/1644443712 0x00000007c00f7828
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/745160567 0x00000007c00f7428
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/321142942 0x00000007c00f7028
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/1935637221 0x00000007c00f6c28
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/2017354584 0x00000007c00f6828
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/1308927845 0x00000007c00f6428
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/1684106402 0x00000007c00f5c28
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/998351292 0x00000007c00f5828
[21.150s][info][class,load ] java.lang.invoke.VarHandles source: jrt:/java.base
[21.208s][info][class,load ] java.lang.invoke.VarHandleInts$FieldInstanceReadOnly source: jrt:/java.base
[21.208s][info][class,load ] java.lang.invoke.VarHandleInts$FieldInstanceReadWrite source: jrt:/java.base
[21.246s][info][class,load ] java.lang.invoke.VarHandle$1 source: jrt:/java.base
[21.246s][info][class,load ] jdk.internal.util.Preconditions$1 source: jrt:/java.base
[21.266s][info][class,load ] java.lang.invoke.VarForm source: jrt:/java.base
[21.280s][info][class,load ] java.lang.invoke.VarHandle$TypesAndInvokers source: jrt:/java.base
Error: A JNI error has occurred, please check your installation and try again
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" [21.324s][info][class,load ] java.lang.Throwable$PrintStreamOrWriter source: jrt:/java.base
[21.324s][info][class,load ] java.lang.Throwable$WrappedPrintStream source: jrt:/java.base
[21.366s][info][class,load ] java.util.IdentityHashMap source: jrt:/java.base
[21.390s][info][class,load ] java.util.IdentityHashMap$KeySet source: jrt:/java.base
java.lang.OutOfMemoryError: Metaspace
[21.404s][info][class,load ] java.lang.Shutdown source: jrt:/java.base
[21.404s][info][class,load ] java.lang.Shutdown$Lock source: jrt:/java.base
(you can cut-and-paste this from the RedefineLeak.jtr file)
${JDK9_ROOT}/promoted/ea/148/binaries/linux-x64/bin/java -cp /jdk/tmp/jtreg/work/classes/runtime/RedefineTests:/jdk/hs/hotspot/test/runtime/RedefineTests:/jdk/tmp/jtreg/work/classes/test/lib:/jdk/hs/test/lib:${JTREG_ROOT}/promoted/jtreg/4.2/fcs/b04/binaries/jtreg/lib/javatest.jar:${JTREG_ROOT}/promoted/jtreg/4.2/fcs/b04/binaries/jtreg/lib/jtreg.jar -XX:MetaspaceSize=12m -XX:MaxMetaspaceSize=12m -javaagent:redefineagent.jar -verbose RedefineLeak
[....]
[21.075s][info][class,load] RedefineLeak$Tester source: __VM_RedefineClasses__
[21.077s][info][class,load] RedefineLeak$Tester source: __VM_RedefineClasses__
transformCount:10000
[21.079s][info][class,load] RedefineLeak$Tester source: __VM_RedefineClasses__
[21.081s][info][class,load] RedefineLeak$Tester source: __VM_RedefineClasses__
[21.108s][info][class,load] jdk.internal.vm.PostVMInitHook source: jrt:/java.base
[21.108s][info][class,load] sun.usagetracker.UsageTrackerClient source: jrt:/java.base
[21.109s][info][class,load] java.util.concurrent.atomic.AtomicBoolean source: jrt:/java.base
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/66233253 0x00000007c00f8028
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/788117692 0x00000007c00f7c28
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/1644443712 0x00000007c00f7828
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/745160567 0x00000007c00f7428
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/321142942 0x00000007c00f7028
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/1935637221 0x00000007c00f6c28
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/2017354584 0x00000007c00f6828
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/1308927845 0x00000007c00f6428
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/1684106402 0x00000007c00f5c28
[21.144s][info][class,unload] unloading class java.lang.invoke.LambdaForm$BMH/998351292 0x00000007c00f5828
[21.150s][info][class,load ] java.lang.invoke.VarHandles source: jrt:/java.base
[21.208s][info][class,load ] java.lang.invoke.VarHandleInts$FieldInstanceReadOnly source: jrt:/java.base
[21.208s][info][class,load ] java.lang.invoke.VarHandleInts$FieldInstanceReadWrite source: jrt:/java.base
[21.246s][info][class,load ] java.lang.invoke.VarHandle$1 source: jrt:/java.base
[21.246s][info][class,load ] jdk.internal.util.Preconditions$1 source: jrt:/java.base
[21.266s][info][class,load ] java.lang.invoke.VarForm source: jrt:/java.base
[21.280s][info][class,load ] java.lang.invoke.VarHandle$TypesAndInvokers source: jrt:/java.base
Error: A JNI error has occurred, please check your installation and try again
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" [21.324s][info][class,load ] java.lang.Throwable$PrintStreamOrWriter source: jrt:/java.base
[21.324s][info][class,load ] java.lang.Throwable$WrappedPrintStream source: jrt:/java.base
[21.366s][info][class,load ] java.util.IdentityHashMap source: jrt:/java.base
[21.390s][info][class,load ] java.util.IdentityHashMap$KeySet source: jrt:/java.base
java.lang.OutOfMemoryError: Metaspace
[21.404s][info][class,load ] java.lang.Shutdown source: jrt:/java.base
[21.404s][info][class,load ] java.lang.Shutdown$Lock source: jrt:/java.base