[JIRA] [core] (JENKINS-30231) Build creates second workspace@2 for non-concurrent build configuration

18 views
Skip to first unread message

totoroliu1215@hotmail.com (JIRA)

unread,
Aug 31, 2015, 7:55:01 PM8/31/15
to jenkinsc...@googlegroups.com
Rick Liu created an issue
 
Jenkins / Bug JENKINS-30231
Build creates second workspace@2 for non-concurrent build configuration
Issue Type: Bug Bug
Assignee: Kohsuke Kawaguchi
Components: core, matrix-project-plugin
Created: 31/Aug/15 11:54 PM
Environment: OS: Ubuntu 12.04 64-bit
Jenkins: 1.609.1 (upgraded from 1.580.3)
disk-usage plugin: 0.25 (upgraded from 0.24)
Matrix Project Plugin: 1.6 (upgraded from 1.4.1)
Priority: Minor Minor
Reporter: Rick Liu

I didn't have this issue when I was using ver 1.580.3.
After upgrading Jenkins ver 1.609.1 (together with other Jenkins plugins update),
I started to see this issue.

My jenkins job is using multi-config project type (aka Matrix project),
and has 3 variants.
I didn't set to be run concurrently,
so the 3 variants will start the build one by one.

In the previous version 1.580.3,
it will reuse the same workspace folder for all of 3 variant builds.

In the new version 1.609.1,
when multiple jobs are triggerd,
I can see sometimes the first variant build of the second job
will start to create and use workspace@2
instead of re-using original worksapce.

Note:
I'm also using disk-usage plugin.
At the end of build,
it will trigger that plugin to calculate workspace disk space.
My work space tends to be large and sometimes it take several minutes to finish.

I suspect it's that disk-usage plugin still occupying the original worksapce,
but the second job in queue starts earlier,
so it creates workspace@2 for the first variable build.

From workspace@2,
I always see only one variant only under AXIS folder.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

totoroliu1215@hotmail.com (JIRA)

unread,
Aug 31, 2015, 7:56:01 PM8/31/15
to jenkinsc...@googlegroups.com
Rick Liu commented on Bug JENKINS-30231
 
Re: Build creates second workspace@2 for non-concurrent build configuration

Per comment from Jesse Glick,
I create this separate issue
which has similar symptom.

will.berriss@gmail.com (JIRA)

unread,
Oct 11, 2016, 7:14:06 AM10/11/16
to jenkinsc...@googlegroups.com

I am seeing this issue today on one of my pipelines. Is there a quick fix workaround I can use to get rid of it and reset the pipeline? I don't mind starting the pipeline from scratch again - just wondering how to get rid of the @2 workspace. Anyone know?

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

matthew.k.smith@viasat.com (JIRA)

unread,
Nov 16, 2016, 1:42:04 PM11/16/16
to jenkinsc...@googlegroups.com

Will Berriss It looks like this might be a solution: https://issues.jenkins-ci.org/browse/JENKINS-14354

It looks like you can replace the "@" separator with a separator of your choice.

totoroliu1215@hotmail.com (JIRA)

unread,
Nov 16, 2016, 2:09:01 PM11/16/16
to jenkinsc...@googlegroups.com
Rick Liu commented on Bug JENKINS-30231

I use customize worksapce configuration to hardcoded the workspace name to work-around this problem

dnusbaum@cloudbees.com (JIRA)

unread,
Aug 6, 2018, 9:26:01 AM8/6/18
to jenkinsc...@googlegroups.com

JENKINS-41127, which may have been the root cause of this issue, was just fixed in Jenkins 2.136. Does anyone have a test environment in which they can consistently reproduce this issue? If so, it would be great if you could test whether this problem still occurs in Jenkins 2.136 or newer.

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

dnusbaum@cloudbees.com (JIRA)

unread,
Sep 13, 2018, 2:53:04 PM9/13/18
to jenkinsc...@googlegroups.com
Devin Nusbaum edited a comment on Bug JENKINS-30231
Since I have not heard back either way, I am going to go ahead and close this issue because at least one way it could happen was fixed in Jenkins 2.136. Please feel free to reopen the issue if you are still seeing it in Jenkins 2.136 or newer , .
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dnusbaum@cloudbees.com (JIRA)

unread,
Sep 13, 2018, 2:53:04 PM9/13/18
to jenkinsc...@googlegroups.com
Devin Nusbaum resolved as Fixed
 

Since I have not heard back either way, I am going to go ahead and close this issue because at least one way it could happen was fixed in Jenkins 2.136. Please feel free to reopen the issue if you are still seeing it in Jenkins 2.136 or newer,

Change By: Devin Nusbaum
Status: Open Resolved
Assignee: Kohsuke Kawaguchi Devin Nusbaum
Resolution: Fixed
Released As: Jenkins Core 2.136

worldstream@protonmail.com (JIRA)

unread,
Sep 24, 2018, 7:27:06 AM9/24/18
to jenkinsc...@googlegroups.com
J S commented on Bug JENKINS-30231
 
Re: Build creates second workspace@2 for non-concurrent build configuration

I have the same problem at Jenkins Version : 2.121.3

worldstream@protonmail.com (JIRA)

unread,
Sep 24, 2018, 7:30:02 AM9/24/18
to jenkinsc...@googlegroups.com
J S reopened an issue
 

I still have the same problem on Jenkins Version 2.121.3 LTS .

On my Slave i get the Folder @2 that are very big.

Change By: J S
Resolution: Fixed
Status: Resolved Reopened

dnusbaum@cloudbees.com (JIRA)

unread,
Sep 24, 2018, 9:04:04 AM9/24/18
to jenkinsc...@googlegroups.com
Devin Nusbaum commented on Bug JENKINS-30231
 
Re: Build creates second workspace@2 for non-concurrent build configuration

J S The change I made to fix JENKINS-41127 is in 2.136, and it was not backported to the 2.121.x LTS line (It is in the 2.138.x LTS line). Please only reopen the issue if you are seeing it in 2.126 or newer (unless you have additional information that leads you to believe it is distinct from JENKINS-41127, such as seeing the issue for something other than a pipeline or matrix job, and please include any relevant info if that is the case).

dnusbaum@cloudbees.com (JIRA)

unread,
Sep 24, 2018, 9:04:04 AM9/24/18
to jenkinsc...@googlegroups.com
Devin Nusbaum resolved as Duplicate
 
Change By: Devin Nusbaum
Status: Reopened Resolved
Resolution: Duplicate

dnusbaum@cloudbees.com (JIRA)

unread,
Sep 24, 2018, 9:05:04 AM9/24/18
to jenkinsc...@googlegroups.com
Devin Nusbaum edited a comment on Bug JENKINS-30231
 
Re: Build creates second workspace@2 for non-concurrent build configuration
[~openjenkins] The change I made to fix JENKINS-41127 is in 2.136, and it was not backported to the 2.121.x LTS line (It _is_ in the 2.138.x LTS line).  Please only reopen the issue if you are seeing it in 2. 126 136 or _newer_ (unless you have additional information that leads you to believe it is distinct from JENKINS-41127, such as seeing the issue for something other than a pipeline or matrix job, and please include any relevant info if that is the case).

kamil.szuster@dev86.de (JIRA)

unread,
Apr 24, 2019, 3:11:03 AM4/24/19
to jenkinsc...@googlegroups.com

Hi! 

Yesterday one of my jobs started to show the same behavior, but we are not using the matrix-project-plugin. At some point (maybe after we deleted the original workspace-folder of a certain job) jenkins started to build the project in a folder suffixed by "@2" - but only on one specific node. Recreating the Pipelinejob with the same name didn't help. Today i did a restart of the server and that seems to have soled the issue for now.

We are using Jenkins 2.138.2.

jatinmehta.jm@gmail.com (JIRA)

unread,
Jul 9, 2019, 6:52:03 AM7/9/19
to jenkinsc...@googlegroups.com

This issue is also seen in Jenkins ver 2.176.1. Jenkins is appending "@2" at the end of the workspace name for one of my nodes. This is causing the tests being run by the pipeline to fail since they look for files in a configured workspace name without the suffix @2. Jenkins seems to do that to prevent mishaps during concurrent builds but this happens for me even when I check Do not allow concurrent builds in the pipeline configuration. Is this new behavior due to a Jenkins version upgrade? Do we have any workarounds? I changed the project name that prevented it from happening but it came up again today. Can't keep changing project name to new ones. Please help!

dnusbaum@cloudbees.com (JIRA)

unread,
Jul 9, 2019, 9:18:03 AM7/9/19
to jenkinsc...@googlegroups.com

Jatin Mehta if you have a consistent way to reproduce the problem from scratch, please file a new issue with full reproduction steps (i.e. download Jenkins 2.176.1, start it up, install plugins X version Y and Z version W, create a Pipeline with the following (ideally minimal) script, etc.).

jatinmehta.jm@gmail.com (JIRA)

unread,
Jul 9, 2019, 9:22:03 AM7/9/19
to jenkinsc...@googlegroups.com

Devin Nusbaum, thank you for the reply. Makes sense, will do that. However, it will take some time since this problem occurs in a Jenkins environment of which I am not an admin and would need to replicate it locally. Meanwhile, if I could get any pointers, that would be great.

jatinmehta.jm@gmail.com (JIRA)

unread,
Jul 9, 2019, 9:59:02 AM7/9/19
to jenkinsc...@googlegroups.com
Jatin Mehta edited a comment on Bug JENKINS-30231
[~dnusbaum], thank you for the reply. Makes sense, will do that. However, it will take some time since this problem occurs in a Jenkins environment of which I am not an admin and would need to replicate it locally. Meanwhile, if I could get any pointers, that would be great.  

EDIT: It doesn't get reproduced right away. It starts occurring only after several builds and hence is kinda hard to reproduce.

kamil.szuster@dev86.de (JIRA)

unread,
Jul 9, 2019, 12:03:02 PM7/9/19
to jenkinsc...@googlegroups.com

Jatin Mehta Devin Nusbaum I think we triggered this issue by removing the working directory of the job within the workspace of a node by hand. 

Something like 

  1. Run job_a on node b
  2. let it finish
  3. login via ssh onto node b
  4. rm -R {JENKINS_WORKSPACE}/job_a
  5. rerun job a
  6. new folder with @2 suffix should be created

Unfortunately i cant evaluate this right now.

jatinmehta.jm@gmail.com (JIRA)

unread,
Jul 9, 2019, 12:10:13 PM7/9/19
to jenkinsc...@googlegroups.com

Hi Kamil Szuster. I tried that too. With every new build, my Jenkinsfile removes the previous build's workspace.  Now, even if I remove the original workspace by hand, in the next build, it still goes on to create the workspace with an @2 suffix. Not sure if Jenkins caches the data (that a workspace xyz was present once upon a time on this node) using which it creates the new workspace (xyz@2)

kamil.szuster@dev86.de (JIRA)

unread,
Jul 10, 2019, 3:56:03 AM7/10/19
to jenkinsc...@googlegroups.com

Jatin Mehta did you also try to restart the jenkins master after the deletion of both (original and @2) workspaces? If i remember correctly, i also had the feeling, that jenkins uses some kind of cache to remember where the workspace is supposed to be. As mentioned before, restarting the jenkins master instance after deleting the original and @2 workspace solved our problem.

jatinmehta.jm@gmail.com (JIRA)

unread,
Jul 10, 2019, 10:40:03 AM7/10/19
to jenkinsc...@googlegroups.com

I don't have admin access to restart Jenkins master. Besides, thats only a temporary workaround. If this was a permanent solution, it shouldn't have cropped up for a new project (or same project with its name changed for that matter). It is still a bug. Will try to come up with a more consistent way to produce it. 

jatinmehta.jm@gmail.com (JIRA)

unread,
Jul 10, 2019, 10:41:02 AM7/10/19
to jenkinsc...@googlegroups.com
Jatin Mehta edited a comment on Bug JENKINS-30231
[~kamil02], I don't have admin access to restart Jenkins master. Besides, thats only a temporary workaround. If this was a permanent solution, it shouldn't have cropped up for a new project (or same project with its name changed for that matter). It is still a bug. Will try to come up with a more consistent way to produce it. 

kolarik.a@gmail.com (JIRA)

unread,
Oct 9, 2019, 4:03:04 AM10/9/19
to jenkinsc...@googlegroups.com

I'm seeing this issue on version 2.176.1. We also don't have concurrent or Matrix builds setup, just one executor per node. On one specific node, we got the workspace@2 duplicated workspace. I tried deleting both workspaces on the node manually and restart Jenkins server to see if that helps and it did.

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

kamil.szuster@dev86.de (JIRA)

unread,
Feb 12, 2020, 6:30:05 AM2/12/20
to jenkinsc...@googlegroups.com

Today the same error occurred again: Jenkins created a ..@2 and ...@3 folder in the .../workspace directory. I had to delete these via SSH and restart the master => back to normal job workspace again.  

Jenkins ver. 2.176.3

xianpeng.shen@qq.com (JIRA)

unread,
Mar 26, 2020, 7:08:03 AM3/26/20
to jenkinsc...@googlegroups.com

I have the same issue in Jenkins ver. 2.176.3.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

xianpeng.shen@qq.com (JIRA)

unread,
Mar 26, 2020, 7:15:03 AM3/26/20
to jenkinsc...@googlegroups.com
Xianpeng Shen edited a comment on Bug JENKINS-30231
I have the same issue in  on Jenkins ver. 2.176.3.
Reply all
Reply to author
Forward
0 new messages