Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 01D75200D0C for ; Wed, 20 Sep 2017 22:40:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F41EA1609E2; Wed, 20 Sep 2017 20:40:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3FB911609D8 for ; Wed, 20 Sep 2017 22:40:05 +0200 (CEST) Received: (qmail 6663 invoked by uid 500); 20 Sep 2017 20:40:04 -0000 Mailing-List: contact notifications-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list notifications@groovy.apache.org Received: (qmail 6654 invoked by uid 99); 20 Sep 2017 20:40:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Sep 2017 20:40:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C87AF182DC0 for ; Wed, 20 Sep 2017 20:40:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id xqWlj1gmoWmI for ; Wed, 20 Sep 2017 20:40:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 4A7595FCCB for ; Wed, 20 Sep 2017 20:40:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2AF8BE0EFB for ; Wed, 20 Sep 2017 20:40:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7FD13218FA for ; Wed, 20 Sep 2017 20:40:00 +0000 (UTC) Date: Wed, 20 Sep 2017 20:40:00 +0000 (UTC) From: "Jochen Theodorou (JIRA)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GROOVY-8324) Enabling groovy.indy.logging can lead to stack overflows MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 20 Sep 2017 20:40:06 -0000 [ https://issues.apache.org/jira/browse/GROOVY-8324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16173788#comment-16173788 ] 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.(Selector.java:499) 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: https://issues.apache.org/jira/browse/GROOVY-8324 > 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(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.(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) > {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 (v6.4.14#64029)