jdk8 metaspace problem with indy

40 views
Skip to first unread message

Jochen Theodorou

unread,
Sep 26, 2013, 10:20:23 AM9/26/13
to Da Vinci Machine Project, jvm-la...@googlegroups.com
Hi all,

probably not such a good time to ask, since many of those, that could
answer this might be on JavaOne... but still

On the user list we got an interesting program that makes quite some
problems to the jvm as it seems. The groovy program looks like this:

> println "Started"
> for(int i = 0; i < 100; i++) {
> print "."
> for (int j=0;j<100000;j++) {
> Container c = new Container()
> c.run()
> }
> }
> println "\ndone"
>
> public class Container implements Runnable {
> public Container() {}
> public void run() {
> GroovyShell gs = new GroovyShell()
> Script script = gs.parse("")
> script.run()
> }
> }

What happens is that gs.parse will create a new script and a new class
every time. Now using our custom call site code this works fine. Using
the indy port, it fails with a permgen error on any jdk7 before u40. On
u40 this works fine again. In jdk8 this fails sometimes with a metaspace
error, while in u40 it seems to work quite reliable.

The problem must be more than just creating many classes, because our
custom callsite caching creates just as many classes for the scripts as
the indy version does. What does not happen so much there though is code
generated by reflection and of course non from indy. So I especially
suspect the code cache here to be responsible for the problem, but I
have no real basis for this. I lack the means to diagnose the problem
further

Is there a way to make this work on older jdk7 vms? And is there a way
for me to make this work on jdk8? Do others here have similar experiences?

bye Jochen
--
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org

Jochen Theodorou

unread,
Sep 27, 2013, 4:07:48 AM9/27/13
to Da Vinci Machine Project, Christian Thalinger, jvm-la...@googlegroups.com
Am 27.09.2013 04:16, schrieb Christian Thalinger:
>
> On Sep 26, 2013, at 7:20 AM, Jochen Theodorou <blac...@gmx.org> wrote:
[...]
>> Is there a way to make this work on older jdk7 vms? And is there a way
>> for me to make this work on jdk8? Do others here have similar experiences?
>
> Is this 64-bit with compressed oops? Is tiered compilation on?

It has been run with a 64bit Linux JVM on default settings.

I just tried on jdk7u25 -XX:-UseCompressedOops and
-XX:-TieredCompilation and I tried with only one of them active, there
is no change in how it behaves
Reply all
Reply to author
Forward
0 new messages