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

Build name file path file gets locked by Jenkins process

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • Jenkins ver. 1.632 running on Windows 3012 R2
      Build-name-setter v 1.5.1

    Description

      Our build intermittently fails when we are trying to clean the workspace because a particular file is locked by the Jenkins java process.

      All other files are removed except "version.txt" in which we store a product version number specific to the build.

      The only thing different with this file compared to other build artifacts is that it is used by the build name setter plugin to rename the build based on the product version number.

      {{<org.jenkinsci.plugins.buildnameupdater.BuildNameUpdater plugin="build-name-setter@1.5.1">
      <buildName>version.txt</buildName>
      <macroTemplate>#${BUILD_NUMBER}${ibm.dv.git_branch}</macroTemplate>
      <fromFile>true</fromFile>
      <fromMacro>true</fromMacro>
      <macroFirst>true</macroFirst>
      </org.jenkinsci.plugins.buildnameupdater.BuildNameUpdater>}}

      I have no concrete evidence or reproduction step I'm afraid, sorry about that.
      However it might be that there is an obvious issue with file closing so I thought I'd raise it with you

      Attachments

        Issue Links

          Activity

            Additional note:
            Cleaning the workspace also fails, and trying to delete the workspace on disk is not possible either as Windows reports the version.txt is locked by the java.exe process

            spangen Toby O'Sullivan added a comment - Additional note: Cleaning the workspace also fails, and trying to delete the workspace on disk is not possible either as Windows reports the version.txt is locked by the java.exe process

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater.java
            http://jenkins-ci.org/commit/build-name-setter-plugin/a2f70213e56f860dfb283178251d0b9fa7f8ecea
            Log:
            JENKINS-39674 - Prevent file descriptor leak in the Build Name Updater step

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml src/main/java/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater.java http://jenkins-ci.org/commit/build-name-setter-plugin/a2f70213e56f860dfb283178251d0b9fa7f8ecea Log: JENKINS-39674 - Prevent file descriptor leak in the Build Name Updater step

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater.java
            http://jenkins-ci.org/commit/build-name-setter-plugin/f0cbc1eb4a93e1b07fcea813e7bda7cac5ae2764
            Log:
            Merge pull request #18 from oleg-nenashev/JENKINS-39674

            JENKINS-39674 - Prevent file descriptor leak in the Build Name Updater step

            Compare: https://github.com/jenkinsci/build-name-setter-plugin/compare/2074bde61078...f0cbc1eb4a93

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml src/main/java/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater.java http://jenkins-ci.org/commit/build-name-setter-plugin/f0cbc1eb4a93e1b07fcea813e7bda7cac5ae2764 Log: Merge pull request #18 from oleg-nenashev/ JENKINS-39674 JENKINS-39674 - Prevent file descriptor leak in the Build Name Updater step Compare: https://github.com/jenkinsci/build-name-setter-plugin/compare/2074bde61078...f0cbc1eb4a93
            oleg_nenashev Oleg Nenashev added a comment -

            The fix has been resolved in 1.6.9

            oleg_nenashev Oleg Nenashev added a comment - The fix has been resolved in 1.6.9

            People

              oleg_nenashev Oleg Nenashev
              spangen Toby O'Sullivan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: