I apologize for contacting this list - I'm sure this isn't the "right way" to contact the OpenJDK project, but I'm not clear what the "right way" is.

I'm hoping to raise https://bugs.openjdk.java.net/browse/JDK-8136353 "ClassValue preventing class unloading" as I believe it's a significant issue in ClassValue which is a blocker for its use in dynamic languages (which is primiarly why ClassValue was introduced). I think the P5 priority set on the bug now is way too low, perhaps you could consider raising the priority?

The source code in the issue description is incorrect; it doesn't compile. Could you please attach the working test cases to the issue, so future testers and developers can reproduce the problem? Here are links to the 2 source code files:
https://issues.apache.org/jira/secure/attachment/12765900/CVTest.java
https://issues.apache.org/jira/secure/attachment/12765901/MyClassValue.java
(which of course should be directly attached to the openjdk issue tracker issue, and not hyperlinked to the Groovy tracker)

And to reproduce the issue, run:
$ javac MyClassValue.java && javac CVTest.java && mkdir -p t && jar cvf t/t.jar MyClassValue*.class && rm MyClassValue*.class && JAVA_OPTS=-Xmx4m java CVTest
and wait for the an error to occur, which is:
Exception in thread "main" java.lang.OutOfMemoryError: Compressed class space
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:152)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:470)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:76)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:371)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:364)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at CVTest.main(CVTest.java:12)

The bug is reproducible on all JDK 8 and 9 builds (I tested up to JDK 9 build 99).

Based on my understanding of the situation from my research in the Groovy bug that discovered the issue ( https://issues.apache.org/jira/browse/GROOVY-6704 ) and some work another person did with the YourKit profiler ( https://www.yourkit.com/forum/viewtopic.php?f=3&t=12658 ), I suspect that the fix for https://bugs.openjdk.java.net/browse/JDK-8032606 "ClassValue.ClassValueMap.type is unused" is relevant; I think the problem lies in the java.lang.Class.classValueMap implementation.

Thank you,
~Craig Andrews
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to