groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Theodorou (JIRA)" <>
Subject [jira] [Commented] (GROOVY-8324) Enabling groovy.indy.logging can lead to stack overflows
Date Wed, 20 Sep 2017 20:40:00 GMT


Jochen Theodorou commented on GROOVY-8324:

first time you mention @ToString. This is a strong indicator for the printing of the arguments
in the logging. "this" is the first argument, thus if this.toString is done by invokedynamic,
it will lead to an stack overflow. Which meand org.codehaus.groovy.vmplugin.v7.Selector$MethodSelector.<init>(
needs a fix for the arguments. If you want to really get to the bottom if this I suggest you
remove parts from the logging message in this line and see which is causing it. My bet is
now on the arguments

> Enabling groovy.indy.logging can lead to stack overflows
> --------------------------------------------------------
>                 Key: GROOVY-8324
>                 URL:
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.12
>            Reporter: Matt Whipple
>            Priority: Minor
>              Labels: invokedynamic
> Still digging through this a bit more, but while trying to diagnose performance issues
I enabled indy logging which led to:
> {noformat}
> ! Caused by: java.lang.StackOverflowError: null
> ! at java.lang.Class.getEnclosingMethodInfo(
> ! at java.lang.Class.getEnclosingClass(
> ! at java.lang.Class.getSimpleBinaryName(
> ! at java.lang.Class.getSimpleName(
> ! at java.lang.invoke.MethodType.toString(
> ! at java.lang.String.valueOf(                        <--- Loops
back to here
> ! at java.lang.StringBuilder.append(
> ! at org.codehaus.groovy.vmplugin.v7.Selector$MethodSelector.<init>(
> ! at org.codehaus.groovy.vmplugin.v7.Selector.getSelector(
> ! at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(
> ! at MyDomainClass.toString(MyDomainClass.groovy)
> {noformat}
> The domain class itself stringifies without issue, changing the class to use {{@CompileStatic}}
seems to have resolved this issue. It might be nice if that specific log message could be
toggled independently of the others to try to avoid the possibility of blowing up while attempting
to troubleshooting. 
> {noformat}
> java version "1.8.0_45"
> Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
> Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
> {noformat}

This message was sent by Atlassian JIRA

View raw message