[JIRA] (JENKINS-50317) Pipeline job is failed with java.lang.StackOverflowError

325 views
Skip to first unread message

olecsys@gmail.com (JIRA)

unread,
Mar 21, 2018, 9:19:03 AM3/21/18
to jenkinsc...@googlegroups.com
Aleksandr Gamoskin created an issue
 
Jenkins / Bug JENKINS-50317
Pipeline job is failed with java.lang.StackOverflowError
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: Jenkinsfile, log.txt
Components: pipeline
Created: 2018-03-21 13:18
Environment: Jenkins Master WIndows Server 2012, Jenkins
version 2.112, 2 slaves, Jenkins Slave Windows 10 and Jenkins Slave Debian 9.3(Stretch)
Labels: pipeline windows
Priority: Critical Critical
Reporter: Aleksandr Gamoskin

We use Multi branch job. Sometimes pipeline job is failed with java.lang.StackOverflowError.I send you our Jenkinsfile and pipeline.log. Maybe is job name too long?

Also sometimes parallel stages hang when one stage is failed(failFast true) via this exception but I think it's other bug. Please write if you need some additional logs or system information.

Jenkinsfile

log.txt

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

olecsys@gmail.com (JIRA)

unread,
Mar 23, 2018, 8:12:02 AM3/23/18
to jenkinsc...@googlegroups.com
Aleksandr Gamoskin commented on Bug JENKINS-50317
 
Re: Pipeline job is failed with java.lang.StackOverflowError

I'am using Jenkins Pipeline Shared Library but there is still this exception. It breaks our build flow. Please tell me what to do?

andrew.bayer@gmail.com (JIRA)

unread,
Mar 27, 2018, 2:04:02 PM3/27/18
to jenkinsc...@googlegroups.com

Can you attach your utils.groovy, please? It looks like something is going wrong specifically in serialization of the program state, and given that all your work seems to actually be in that utils.groovy script, I can't tell what's going on. Also, it'd be great if you could put together a minimal reproduction case or zip up the build directory for a build that's failing like this (specifically the workflow subdirectory) so that we can see where exactly the failure is happening.

olecsys@gmail.com (JIRA)

unread,
Mar 28, 2018, 12:15:02 AM3/28/18
to jenkinsc...@googlegroups.com

olecsys@gmail.com (JIRA)

unread,
Mar 28, 2018, 12:22:02 AM3/28/18
to jenkinsc...@googlegroups.com

olecsys@gmail.com (JIRA)

unread,
Mar 28, 2018, 12:23:01 AM3/28/18
to jenkinsc...@googlegroups.com
Aleksandr Gamoskin commented on Bug JENKINS-50317
 
Re: Pipeline job is failed with java.lang.StackOverflowError

Hello Andrew, yes, I'am sending you utils.groovy. Also I could send you workspace subdirectory but we use conan io server, cmake etc. I look forward for your response.

 

autoloader.zip

utils.groovy

 ^^ 

andrew.bayer@gmail.com (JIRA)

unread,
Mar 28, 2018, 2:51:05 PM3/28/18
to jenkinsc...@googlegroups.com

Aleksandr Gamoskin - I'm specifically looking for the build directory on the master - it'd be something like JENKINS_HOME/jobs/JOB_NAME/builds/BUILD_NUMBER, though if this is a multibranch job, it would be in JENKINS_HOME/jobs/MULTIBRANCH_NAME/jobs/BRANCH/builds/BUILD_NUMBER. In that directory, what we really care about is the workflow subdirectory, if the whole build directory is too large. Thanks!

olecsys@gmail.com (JIRA)

unread,
Mar 29, 2018, 5:01:02 AM3/29/18
to jenkinsc...@googlegroups.com

olecsys@gmail.com (JIRA)

unread,
Mar 29, 2018, 5:01:02 AM3/29/18
to jenkinsc...@googlegroups.com

olecsys@gmail.com (JIRA)

unread,
Mar 30, 2018, 12:07:03 AM3/30/18
to jenkinsc...@googlegroups.com

Andrew Bayer hello. Maybe do you have a temporary workaround for this problem?All our slaves hang in this situation and then I abort these jobs manualy.

andrew.bayer@gmail.com (JIRA)

unread,
Apr 3, 2018, 1:31:03 PM4/3/18
to jenkinsc...@googlegroups.com

It appears that the error is happening when your debian-6 x64 debug stage's success post action is running. That said, I can't tell what was actually being serialized - anything that was in the state of your Pipeline at that point would be getting serialized. All I can be sure of is that the script step started and then everything blew up. I'm actually wondering if the withEnv without any actual body content in conan.groovy's success method might be the culprit somehow? Not sure. I'd suggest trying moving to non-parallel build stages to see if the same error shows up then.

olecsys@gmail.com (JIRA)

unread,
Apr 3, 2018, 1:46:02 PM4/3/18
to jenkinsc...@googlegroups.com

So I've changed utils.groovy to Jenkins Pipeline Shared Library(git repository). But problem occurs any way. Maybe do you need more detailed information? Switch trace log level? Is parallel mechanism is not so stable for now? it's just very useful thing. I'll try to moving build stages to non-parallel build stages.

olecsys@gmail.com (JIRA)

unread,
Apr 3, 2018, 1:48:02 PM4/3/18
to jenkinsc...@googlegroups.com

We use Gitea plugin. Could it be it's problem? It uses some notification mechanism.

olecsys@gmail.com (JIRA)

unread,
Apr 5, 2018, 2:18:03 AM4/5/18
to jenkinsc...@googlegroups.com

Andrew Bayer I've remove parallel stages and problem does not occur for now. If you need I could send you new groovy files and pipeline.

andrew.bayer@gmail.com (JIRA)

unread,
Apr 12, 2018, 11:36:03 AM4/12/18
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Apr 12, 2018, 11:36:03 AM4/12/18
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Bug JENKINS-50317
 
Re: Pipeline job is failed with java.lang.StackOverflowError

Ok, if it's not happening when you're not in parallel, then it's got to be something that's temporarily/briefly exposed in one of the parallel branches that Pipeline attempts to serialize when it reaches a safepoint on one of the other branches. Could be Gitea, could be something else - I really can't tell. The best I can advise is that you try to reproduce this as minimally as possible - starting with empty parallel branches and gradually adding bits and pieces until you can reproduce the error.

andrew.bayer@gmail.com (JIRA)

unread,
Aug 8, 2018, 2:13:02 PM8/8/18
to jenkinsc...@googlegroups.com

Any update from your side, Aleksandr Gamoskin?

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

vivek.pandey@gmail.com (JIRA)

unread,
Nov 16, 2018, 12:29:02 PM11/16/18
to jenkinsc...@googlegroups.com
Vivek Pandey updated an issue
 
Change By: Vivek Pandey
Labels: pipeline triaged-2018-11 windows
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

erikpaulmiller@gmail.com (JIRA)

unread,
Jan 30, 2019, 11:57:02 AM1/30/19
to jenkinsc...@googlegroups.com

based@free.fr (JIRA)

unread,
Oct 20, 2019, 6:20:03 AM10/20/19
to jenkinsc...@googlegroups.com

I also got this, while playing with environment variables (bindings) and pipeline/workflow environment section.

java.lang.StackOverflowError
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:498)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)

Jenkins 2.190.1, lastest plugin updates,  multibranch.

 

 

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

based@free.fr (JIRA)

unread,
Oct 20, 2019, 6:22:02 AM10/20/19
to jenkinsc...@googlegroups.com
Basile Chandesris edited a comment on Bug JENKINS-50317
I also got this, while playing with environment variables (bindings) and pipeline/workflow environment section.

java.lang.StackOverflowError
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:498)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)
at org.jenkinsci.plugins.workflow.cps.DSL.flattenGString(DSL.java:503)

Jenkins 2.190.1, lastest plugin updates,  multibranch , GNU/LInux .

 

 
Reply all
Reply to author
Forward
0 new messages