groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7884) GroovyScriptEngineImpl usage of CompilerConfiguration can lead to memory leaks
Date Fri, 05 Aug 2016 01:13:20 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-7884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15408732#comment-15408732
] 

ASF GitHub Bot commented on GROOVY-7884:
----------------------------------------

GitHub user jwagenleitner opened a pull request:

    https://github.com/apache/groovy/pull/377

    GROOVY-7884: GroovyScriptEngineImpl usage of CompilerConfiguration can lead to memory
leaks

    Also includes some minor refactoring/cleanup as separate commits.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jwagenleitner/groovy GROOVY-7884

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/377.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #377
    
----
commit f6ea716311bbc3d5952d475665b6bf0a6e3089b8
Author: John Wagenleitner <jwagenleitner@apache.org>
Date:   2016-08-04T23:27:47Z

    GROOVY-7884: GroovyScriptEngineImpl usage of CompilerConfiguration can lead to memory
leaks

commit ac9197f50b7f7a4601d497858fcd9ce91522b528
Author: John Wagenleitner <jwagenleitner@apache.org>
Date:   2016-08-04T23:46:26Z

    minor refactor: use enhanced for loop

commit f6019be6190e6f799dc14944e98d6d76830201c4
Author: John Wagenleitner <jwagenleitner@apache.org>
Date:   2016-08-04T23:58:40Z

    minor cleanup: no need to import classes from java.lang

commit 76c7941b5d449603ef2a03f988ad6975173af4cb
Author: John Wagenleitner <jwagenleitner@apache.org>
Date:   2016-08-05T00:49:24Z

    minor refactor: remove use of raw types

----


> GroovyScriptEngineImpl usage of CompilerConfiguration can lead to memory leaks
> ------------------------------------------------------------------------------
>
>                 Key: GROOVY-7884
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7884
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.5
>            Reporter: Stefano Rocca
>
> In the constructor of GroovyScriptEngineImpl the CompilerConfiguration is created each
time, while it should use CompilerConfiguration.DEFAULT.
> This can lead to memory leaks in environments where there is an high usage of GroovyScriptEngineImpl
because CompilerConfiguration creates a PrintWriter on System.err (i.e. under the hood it
creates a BufferedWriter with a default buffer of 8192 elements) when setting the field "output".
> I have observed this behaviour using Apache Camel.
> I don't know if all the GroovyScriptEngineImpl instances are legit or are themselves
a leak: I will investigate on this later and report to the Apache Camel team.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message