groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Petrossian (PAF) (JIRA)" <>
Subject [jira] [Commented] (GROOVY-7646) Classes generated by Eval() never collected from Permgen/Metaspace
Date Thu, 28 Apr 2016 09:04:12 GMT


Alexander Petrossian (PAF) commented on GROOVY-7646:

I would suggest to cache internally class, generated by Eval, using eval expression String
as a key.

This will still not garbage-collect, and given random input to Eval also lead to OOM.

Yet real-life scenarios are usually closer to that in Description, meaning -- little different

This will be WAY better than current situation, when we just CAN NOT use Eval in long-running

> Classes generated by Eval() never collected from Permgen/Metaspace
> ------------------------------------------------------------------
>                 Key: GROOVY-7646
>                 URL:
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 2.4.5
>         Environment: Oracle jdk8u51 and jdk8u66
>            Reporter: Isaac Dooley
> It seems classes generated by Eval() are never collected, thus causing PermGen or Metaspace
to fill up and the JVM to hang/crash.
> Reproduce by running the following code, after setting java option {{-XX:MaxMetaspaceSize=50m}}.

> {code}
> 100000.times{ x -> assert 10 == Eval.x(2, 'x * 4 + 2;') }
> {code}
> After about 2700 calls to Eval the program will crash with OutOfMemoryError, 

This message was sent by Atlassian JIRA

View raw message