Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21622

Build creates new workspace@2 (and so on) when option concurrent builds NOT checked

    XMLWordPrintable

Details

    Description

      Since the last update, workspaces are not reused anymoe in the projects. After googling, this feature seems related to concurrent builds. But we don't use concurrent builds. Still we get workspaces @2..@11.

      Attachments

        Issue Links

          Activity

            stefanhirche Stefan Hirche created issue -
            markewaite Mark Waite added a comment -

            I have never seen this before. Workspace creation is handled by Jenkins core, so I think this should be unassigned from git and assigned to core.

            markewaite Mark Waite added a comment - I have never seen this before. Workspace creation is handled by Jenkins core, so I think this should be unassigned from git and assigned to core.
            markewaite Mark Waite added a comment -

            I have never seen this before. Workspace creation is handled by Jenkins core, so I think this should be unassigned from git and assigned to core.

            markewaite Mark Waite added a comment - I have never seen this before. Workspace creation is handled by Jenkins core, so I think this should be unassigned from git and assigned to core.
            markewaite Mark Waite made changes -
            Field Original Value New Value
            Component/s core [ 15593 ]
            Component/s git [ 15543 ]
            dark_lx_tomtom Alex Lorenz added a comment -

            We have the same behavior, and our Jenkins disk volume is regularly out of space now, because several jobs behave like this.

            dark_lx_tomtom Alex Lorenz added a comment - We have the same behavior, and our Jenkins disk volume is regularly out of space now, because several jobs behave like this.
            dark_lx_tomtom Alex Lorenz made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            dark_lx_tomtom Alex Lorenz made changes -
            Environment Windows Tomcat Windows Tomcat
            Linux Standalone
            dark_lx_tomtom Alex Lorenz made changes -
            Affects Version/s current [ 10162 ]
            dark_lx_tomtom Alex Lorenz made changes -
            Environment Windows Tomcat
            Linux Standalone
            Windows Tomcat
            Priority Major [ 3 ] Minor [ 4 ]
            dark_lx_tomtom Alex Lorenz added a comment -

            Resolved for us.

            dark_lx_tomtom Alex Lorenz added a comment - Resolved for us.
            markewaite Mark Waite added a comment -

            What was the solution that resolved it for you?

            markewaite Mark Waite added a comment - What was the solution that resolved it for you?
            dark_lx_tomtom Alex Lorenz added a comment -

            Unrelated to this issue: The @ workspaces were from an older Jenkins version after all.

            dark_lx_tomtom Alex Lorenz added a comment - Unrelated to this issue: The @ workspaces were from an older Jenkins version after all.
            stefanhirche Stefan Hirche added a comment -

            We just moved to 1.558 and the issue still exists

            stefanhirche Stefan Hirche added a comment - We just moved to 1.558 and the issue still exists
            jglick Jesse Glick added a comment -

            Something similar reported by a user of 1.532.2. Was using Perforce plugin (and others), but not Ivy. Trigger condition as yet unknown.

            jglick Jesse Glick added a comment - Something similar reported by a user of 1.532.2. Was using Perforce plugin (and others), but not Ivy. Trigger condition as yet unknown.
            jglick Jesse Glick made changes -
            Component/s ivy [ 15519 ]
            Assignee Nicolas De Loof [ ndeloof ]
            Priority Minor [ 4 ] Major [ 3 ]
            jglick Jesse Glick made changes -
            Labels concurrent-build workspace

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/slaves/WorkspaceList.java
            http://jenkins-ci.org/commit/jenkins/3dc0a444068601a61930af4c422ffefdd0928063
            Log:
            JENKINS-21622 Trying to diagnose who is acquiring workspace leases when and why.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/slaves/WorkspaceList.java http://jenkins-ci.org/commit/jenkins/3dc0a444068601a61930af4c422ffefdd0928063 Log: JENKINS-21622 Trying to diagnose who is acquiring workspace leases when and why.
            jglick Jesse Glick added a comment - Diagnostic build: http://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/1.532.2.JENKINS-21622-diag/jenkins-war-1.532.2.JENKINS-21622-diag.war
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3306
            JENKINS-21622 Trying to diagnose who is acquiring workspace leases when and why. (Revision 3dc0a444068601a61930af4c422ffefdd0928063)

            Result = SUCCESS
            Jesse Glick : 3dc0a444068601a61930af4c422ffefdd0928063
            Files :

            • core/src/main/java/hudson/slaves/WorkspaceList.java
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3306 JENKINS-21622 Trying to diagnose who is acquiring workspace leases when and why. (Revision 3dc0a444068601a61930af4c422ffefdd0928063) Result = SUCCESS Jesse Glick : 3dc0a444068601a61930af4c422ffefdd0928063 Files : core/src/main/java/hudson/slaves/WorkspaceList.java
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-19089 [ JENKINS-19089 ]

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/model/AbstractBuild.java
            http://jenkins-ci.org/commit/jenkins/decf902ab797b1ef5f5fb8f5c1651520c0fe33f2
            Log:
            [FIXED JENKINS-21622] Release workspace leases (and avoid @2) even if post-build actions throw LinkageError.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/AbstractBuild.java http://jenkins-ci.org/commit/jenkins/decf902ab797b1ef5f5fb8f5c1651520c0fe33f2 Log: [FIXED JENKINS-21622] Release workspace leases (and avoid @2) even if post-build actions throw LinkageError.
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3309
            [FIXED JENKINS-21622] Release workspace leases (and avoid @2) even if post-build actions throw LinkageError. (Revision decf902ab797b1ef5f5fb8f5c1651520c0fe33f2)

            Result = SUCCESS
            Jesse Glick : decf902ab797b1ef5f5fb8f5c1651520c0fe33f2
            Files :

            • core/src/main/java/hudson/model/AbstractBuild.java
            • changelog.html
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3309 [FIXED JENKINS-21622] Release workspace leases (and avoid @2) even if post-build actions throw LinkageError. (Revision decf902ab797b1ef5f5fb8f5c1651520c0fe33f2) Result = SUCCESS Jesse Glick : decf902ab797b1ef5f5fb8f5c1651520c0fe33f2 Files : core/src/main/java/hudson/model/AbstractBuild.java changelog.html

            We also see this problem here, with one single job. However, it's unclear when we will be able to upgrade to the fixed version, so I'd like to know whether there's a workaround we can apply until then.

            dhs Dirk Heinrichs added a comment - We also see this problem here, with one single job. However, it's unclear when we will be able to upgrade to the fixed version, so I'd like to know whether there's a workaround we can apply until then.

            Investigating our issue further, it seems that it is a different problem. The project configuration is such that it executes some sub projects. What we see in the console output (with the timestamper plugin enabled) is that the next queued job starts to run a few seconds after the first one has started its (blocking) sub job. File a new issue?

            dhs Dirk Heinrichs added a comment - Investigating our issue further, it seems that it is a different problem. The project configuration is such that it executes some sub projects. What we see in the console output (with the timestamper plugin enabled) is that the next queued job starts to run a few seconds after the first one has started its (blocking) sub job. File a new issue?
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-14699 [ JENKINS-14699 ]
            o_ozardic Onur Ozardic added a comment -

            Issue seems to be unresolved in 1.606
            Environment is CentOS 6.6 slave and git version 1.8.3.1

            o_ozardic Onur Ozardic added a comment - Issue seems to be unresolved in 1.606 Environment is CentOS 6.6 slave and git version 1.8.3.1
            markewaite Mark Waite added a comment -

            o_ozardic you will need to provide much more information about the conditions which show the problem. I doubt a developer will be persuaded to spend significant time trying to guess the conditions under which you have seen the problem. Even if they do spend that time guessing more about the problem, they may guess incorrectly and fix something that is not the issue you've seen.

            Please provide step by step instructions which show the problem, preferably on a clean installation of a recent Jenkins version (either the current long term support version or the most recent weekly version). You may also help by installing the "support" plugin and including the information from that plugin. Or, at least include the versions of plugins you're using in addition to the command line git version you have installed.

            markewaite Mark Waite added a comment - o_ozardic you will need to provide much more information about the conditions which show the problem. I doubt a developer will be persuaded to spend significant time trying to guess the conditions under which you have seen the problem. Even if they do spend that time guessing more about the problem, they may guess incorrectly and fix something that is not the issue you've seen. Please provide step by step instructions which show the problem, preferably on a clean installation of a recent Jenkins version (either the current long term support version or the most recent weekly version). You may also help by installing the "support" plugin and including the information from that plugin. Or, at least include the versions of plugins you're using in addition to the command line git version you have installed.
            totoroliu Rick Liu added a comment - - edited

            OS: Ubuntu 12.04 64-bit
            Jenkins ver: 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)

            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.

            totoroliu Rick Liu added a comment - - edited OS: Ubuntu 12.04 64-bit Jenkins ver: 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) 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.
            jglick Jesse Glick added a comment -

            totoroliu probably you are hitting a distinct bug with a similar symptom. If you can reproduce it from scratch, please file it separately.

            jglick Jesse Glick added a comment - totoroliu probably you are hitting a distinct bug with a similar symptom. If you can reproduce it from scratch, please file it separately.
            totoroliu Rick Liu made changes -
            Link This issue is related to JENKINS-30231 [ JENKINS-30231 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 153620 ] JNJira + In-Review [ 194614 ]

            People

              Unassigned Unassigned
              stefanhirche Stefan Hirche
              Votes:
              8 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: