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

Module descriptor recomputation is not properly synchronized

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • ivy-plugin
    • None
    • Jenkins 1.620 with 2500+ jobs and 8 executors on the master node
    • 1.28

      The recomputation of module descriptors is not properly synchronized and may prevent a properties file from being read properly.

      The Ivy Build Trigger copies files (ivy.xml and ivy.properties) from the workspace to the project directory to keep them accessible if the workspace files are unavailable for some reason. To determine whether a copy is necessary, time stamps on the files are compared. It uses a single timestamp, the one from ivy.xml, to compare with, however. This is an error by itself as it causes any properties file to never or always be copied depending on how its modification date compares to the one from ivy.xml. In our scenario, the properties file always gets copied.

      In a multi-executor build environment, multiple jobs may trigger the recomputation of a single module descriptor simultaneously. Since the operation is not properly synchronized, this causes a race condition in copyFileFromWorkspaceIfNecessary. A properties file that is in active use by some thread may be truncated (and overwritten) by another one. Depending on your Ivy settings, this can result in a configuration error or a silent fallback to default values.

          [JENKINS-46314] Module descriptor recomputation is not properly synchronized

          Code changed in jenkins
          User: Erik De Weerdt
          Path:
          src/main/java/hudson/ivy/IvyBuildTrigger.java
          http://jenkins-ci.org/commit/ivy-plugin/ac247f1352e9f81d2d3526d2354d72da00b7d84b
          Log:
          JENKINS-46314: synchronize recomputation of a module descriptor to avoid race conditions

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Erik De Weerdt Path: src/main/java/hudson/ivy/IvyBuildTrigger.java http://jenkins-ci.org/commit/ivy-plugin/ac247f1352e9f81d2d3526d2354d72da00b7d84b Log: JENKINS-46314 : synchronize recomputation of a module descriptor to avoid race conditions

          Code changed in jenkins
          User: Kevin Formsma
          Path:
          src/main/java/hudson/ivy/IvyBuildTrigger.java
          http://jenkins-ci.org/commit/ivy-plugin/4c6a51bcde079a505c2acb8fe433a76c1363bc4b
          Log:
          Merge pull request #26 from luciad/JENKINS-46314

          JENKINS-46314: synchronize recomputation of a module descriptor

          Compare: https://github.com/jenkinsci/ivy-plugin/compare/7bf8c79488f2...4c6a51bcde07

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kevin Formsma Path: src/main/java/hudson/ivy/IvyBuildTrigger.java http://jenkins-ci.org/commit/ivy-plugin/4c6a51bcde079a505c2acb8fe433a76c1363bc4b Log: Merge pull request #26 from luciad/ JENKINS-46314 JENKINS-46314 : synchronize recomputation of a module descriptor Compare: https://github.com/jenkinsci/ivy-plugin/compare/7bf8c79488f2...4c6a51bcde07

          Kevin Formsma added a comment -

          I merged this and released in ivy-plugin 1.28. Please let me know if that resolves your issue erikdw

          Kevin Formsma added a comment - I merged this and released in ivy-plugin 1.28. Please let me know if that resolves your issue erikdw

          It has been running without issues for a while now, so I'd say it's resolved.

          Erik De Weerdt added a comment - It has been running without issues for a while now, so I'd say it's resolved.

            tbingaman Timothy Bingaman
            erikdw Erik De Weerdt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: