-
Bug
-
Resolution: Fixed
-
P3
-
7, 8, 9
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8173364 | 8-pool | Kevin Walls | P3 | Closed | Won't Fix |
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
Calling findSpecial is leaking memory.
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
import java.lang.invoke.*;
public class Leak {
public void callMe() {
}
public static void main(String[] args) throws Throwable {
Leak leak = new Leak();
while(true) {
MethodHandles.Lookup lookup = MethodHandles.lookup();
MethodType mt = MethodType.fromMethodDescriptorString("()V", Leak.class.getClassLoader());
// findSpecial leaks some native mem
MethodHandle mh = lookup.findSpecial(Leak.class, "callMe", mt, Leak.class);
mh.invokeExact(leak);
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected: No increase in memory
Result: Increase in memory
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.lang.invoke.*;
public class Leak {
public void callMe() {
}
public static void main(String[] args) throws Throwable {
Leak leak = new Leak();
while(true) {
MethodHandles.Lookup lookup = MethodHandles.lookup();
MethodType mt = MethodType.fromMethodDescriptorString("()V", Leak.class.getClassLoader());
// findSpecial leaks some native mem
MethodHandle mh = lookup.findSpecial(Leak.class, "callMe", mt, Leak.class);
mh.invokeExact(leak);
}
}
}
---------- END SOURCE ----------
A DESCRIPTION OF THE PROBLEM :
Calling findSpecial is leaking memory.
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
import java.lang.invoke.*;
public class Leak {
public void callMe() {
}
public static void main(String[] args) throws Throwable {
Leak leak = new Leak();
while(true) {
MethodHandles.Lookup lookup = MethodHandles.lookup();
MethodType mt = MethodType.fromMethodDescriptorString("()V", Leak.class.getClassLoader());
// findSpecial leaks some native mem
MethodHandle mh = lookup.findSpecial(Leak.class, "callMe", mt, Leak.class);
mh.invokeExact(leak);
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected: No increase in memory
Result: Increase in memory
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.lang.invoke.*;
public class Leak {
public void callMe() {
}
public static void main(String[] args) throws Throwable {
Leak leak = new Leak();
while(true) {
MethodHandles.Lookup lookup = MethodHandles.lookup();
MethodType mt = MethodType.fromMethodDescriptorString("()V", Leak.class.getClassLoader());
// findSpecial leaks some native mem
MethodHandle mh = lookup.findSpecial(Leak.class, "callMe", mt, Leak.class);
mh.invokeExact(leak);
}
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8173364 MemberNameTable doesn't purge stale entries
- Closed
- is cloned by
-
JDK-8162795 [REDO] MemberNameTable doesn't purge stale entries
- Resolved
- relates to
-
JDK-8013267 move MemberNameTable from native code to Java heap, use to intern MemberNames
- Open
-
JDK-8174749 Use hash table/oops for MemberName table
- Resolved