[JIRA] [core] (JENKINS-34751) StackOverflowError in Groovy scripts

9 views
Skip to first unread message

mail@daniel-spilker.com (JIRA)

unread,
May 12, 2016, 3:43:01 AM5/12/16
to jenkinsc...@googlegroups.com
Daniel Spilker created an issue
 
Jenkins / Bug JENKINS-34751
StackOverflowError in Groovy scripts
Issue Type: Bug Bug
Assignee: vjuranek
Components: core, groovy-plugin, job-dsl-plugin, workflow-plugin
Created: 2016/May/12 7:42 AM
Environment: Jenkins 2.0
Labels: regression
Priority: Major Major
Reporter: Daniel Spilker

Due to a regression in Groovy 2.4 (GROOVY-7826) scripts using some of the core classes with complex generic type arguments (e.g. hudson.model.Run or hudson.model.Job) will cause a StackoverflowError.

Run this script in Script Console to reproduce the problem:

def foo(hudson.model.Run run) {}

This affects Script Console, Pipeline, Job DSL, Groovy plugin (system Groovy script) and probably other plugins using the Groovy runtime provided by Jenkins core.

java.lang.StackOverflowError
	at java.lang.StringBuilder.append(StringBuilder.java:132)
	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1173)
	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1159)
	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1178)
	at org.codehaus.groovy.ast.ClassNode.genericTypeAsString(ClassNode.java:1199)
	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1173)
	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1159)
	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1178)
	at org.codehaus.groovy.ast.ClassNode.genericTypeAsString(ClassNode.java:1199)
	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1173)
	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1159)
	at org.codehaus.groovy.ast.ClassNode.toString(ClassNode.java:1178)
	at org.codehaus.groovy.ast.ClassNode.genericTypeAsString(ClassNode.java:1199)
        ...
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

mail@daniel-spilker.com (JIRA)

unread,
May 12, 2016, 7:56:01 AM5/12/16
to jenkinsc...@googlegroups.com

wynne.jg@gmail.com (JIRA)

unread,
May 19, 2016, 12:46:01 PM5/19/16
to jenkinsc...@googlegroups.com

I can see a fix included in groovy 2.4.7 but there is no planned release for it.
Will we have to wait for groovy to release and then for jenkins to consume it before we see this fixed? If so, I'll need to downgrade from 2.x sharpish
https://issues.apache.org/jira/browse/GROOVY/fixforversion/12334898/?selectedTab=com.atlassian.jira.jira-projects-plugin:version-summary-panel

wynne.jg@gmail.com (JIRA)

unread,
May 19, 2016, 12:47:01 PM5/19/16
to jenkinsc...@googlegroups.com
John Wynne edited a comment on Bug JENKINS-34751
I can see a fix included in groovy 2.4.7 but there is no planned release for it.
Will we have to wait for groovy to release and then for jenkins to consume it before we see this fixed? If so, I'll need to downgrade from 2.x sharpish
https://issues.apache.org/jira/browse/GROOVY/fixforversion/12334898/?selectedTab=com.atlassian.jira.jira-projects-plugin:version-summary-panel


Alternatively, [~daspilker] are there instructions for pulling that fix on github that you've posted into my jenkins installation?

mail@daniel-spilker.com (JIRA)

unread,
May 19, 2016, 12:56:01 PM5/19/16
to jenkinsc...@googlegroups.com

I hope to get a Groovy 2.4.x release for the first 2.x LTS release, which will come in a few weeks.

John Wynne you can pull the GROOVY_2_4_X branch from GitHub (https://github.com/apache/groovy/tree/GROOVY_2_4_X), run the build (instructions are in the README) and then replace the Groovy JAR in your Jenkins installation (e.g. in /var/cache/jenkins/war/WEB-INF/lib) with the JAR from the build (in target/libs).

dbeck@cloudbees.com (JIRA)

unread,
May 19, 2016, 2:03:02 PM5/19/16
to jenkinsc...@googlegroups.com

Daniel Spilker While we release 2.x.1 LTS on July 6, we decide the baseline on June 8 and the version we choose is typically 3-4 weeks old. I.e. now.

If this is supposed to be fixed for 2.x.1 LTS in July, we need to go the patched Groovy route again, and quickly.

mail@daniel-spilker.com (JIRA)

unread,
May 19, 2016, 2:34:01 PM5/19/16
to jenkinsc...@googlegroups.com

Daniel Beck Arg. I will ask on the Groovy dev list. The last 2.4 release is 3 month old, so it should be time to cut a release.

mail@daniel-spilker.com (JIRA)

unread,
May 20, 2016, 4:58:01 AM5/20/16
to jenkinsc...@googlegroups.com
Daniel Spilker assigned an issue to Daniel Spilker
Change By: Daniel Spilker
Assignee: vjuranek Daniel Spilker

dbeck@cloudbees.com (JIRA)

unread,
May 24, 2016, 6:59:01 AM5/24/16
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
Change By: Daniel Beck
Labels: lts-candidate regression

scm_issue_link@java.net (JIRA)

unread,
May 28, 2016, 3:27:03 AM5/28/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Daniel Spilker
Path:
core/pom.xml
http://jenkins-ci.org/commit/jenkins/a3ddc89afe27a52554a79ff9e6d1b2ec714f96cd
Log:
JENKINS-34751 use patched version of Groovy 2.4.6 (#2369)

contains fixes for GROOVY-7761 and GROOVY-7826

[FIXES JENKINS-34751]

o.v.nenashev@gmail.com (JIRA)

unread,
Jun 6, 2016, 4:07:02 AM6/6/16
to jenkinsc...@googlegroups.com
Oleg Nenashev resolved as Fixed
 

The fix has been released in jenkins-2.7
Now we need to upgrade to 2.4.7 once it gets released

Change By: Oleg Nenashev
Status: Open Resolved
Resolution: Fixed

mail@daniel-spilker.com (JIRA)

unread,
Jun 7, 2016, 4:23:02 PM6/7/16
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
Jun 8, 2016, 2:43:02 PM6/8/16
to jenkinsc...@googlegroups.com

Code changed in jenkins


User: Daniel Spilker
Path:
core/pom.xml

http://jenkins-ci.org/commit/jenkins/96a782853eb006d76eb8eb2aad68d3046a5f9756
Log:
updated Groovy to 2.4.7

follow-up for

JENKINS-34751

scm_issue_link@java.net (JIRA)

unread,
Jun 8, 2016, 2:43:03 PM6/8/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Oliver Gondža
Path:
core/pom.xml
http://jenkins-ci.org/commit/jenkins/057791ca34c8f85080ca1f4957843fb7c72b615b
Log:
Merge pull request #2399 from daspilker/

JENKINS-34751

JENKINS-34751 updated Groovy to 2.4.7

Compare: https://github.com/jenkinsci/jenkins/compare/f1dfc7207fc3...057791ca34c8

ogondza@gmail.com (JIRA)

unread,
Jun 20, 2016, 4:57:01 AM6/20/16
to jenkinsc...@googlegroups.com

Backporting bump to 2.4.7 into 2.7.1 not to depend on forked build.

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

ogondza@gmail.com (JIRA)

unread,
Jun 20, 2016, 4:59:03 AM6/20/16
to jenkinsc...@googlegroups.com
Oliver Gondža updated an issue
Change By: Oliver Gondža
Labels: lts 2.7.1 - candidate fixed regression

mail@daniel-spilker.com (JIRA)

unread,
Aug 16, 2016, 3:53:02 AM8/16/16
to jenkinsc...@googlegroups.com
Daniel Spilker closed an issue as Fixed
Change By: Daniel Spilker
Status: Resolved Closed
Reply all
Reply to author
Forward
0 new messages