Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8324

Enabling groovy.indy.logging can lead to stack overflows

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.12
    • Fix Version/s: 2.4.13
    • Component/s: None
    • Labels:

      Description

      Still digging through this a bit more, but while trying to diagnose performance issues I enabled indy logging which led to:

      ! Caused by: java.lang.StackOverflowError: null
      ! at java.lang.Class.getEnclosingMethodInfo(Class.java:1072)
      ! at java.lang.Class.getEnclosingClass(Class.java:1272)
      ! at java.lang.Class.getSimpleBinaryName(Class.java:1443)
      ! at java.lang.Class.getSimpleName(Class.java:1309)
      ! at java.lang.invoke.MethodType.toString(MethodType.java:797)
      ! at java.lang.String.valueOf(String.java:2982)                        <--- Loops back to here
      ! at java.lang.StringBuilder.append(StringBuilder.java:131)
      ! at org.codehaus.groovy.vmplugin.v7.Selector$MethodSelector.<init>(Selector.java:488)
      ! at org.codehaus.groovy.vmplugin.v7.Selector.getSelector(Selector.java:98)
      ! at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:227)
      ! at MyDomainClass.toString(MyDomainClass.groovy)
      

      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.

      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)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jwagenleitner John Wagenleitner
                Reporter:
                mwhipple Matt Whipple
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: