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

Performance issue in code cleaning up duplicate Tool Installer

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • Jenkins core 2.32.2

      There's a serious performance issue in the code cleaning up duplicate Tool Installer, in hudson.tools.DownloadFromUrlInstaller$DescriptorImpl.reduce(). On our hosted environment (DEV@cloud), it takes multiple minutes to complete and consumes a full CPU.

      Here is a stack trace of where the code is stuck at:

      2017-02-16_14:43:24.25621 "Download metadata thread" #136500 daemon prio=5 os_prio=0 tid=0x00000000059e9800 nid=0x676a runnable [0x00007f7687dfc000]
      2017-02-16_14:43:24.25621    java.lang.Thread.State: RUNNABLE
      2017-02-16_14:43:24.25622 	at hudson.tools.DownloadFromUrlInstaller$DescriptorImpl.reduce(DownloadFromUrlInstaller.java:184)
      2017-02-16_14:43:24.25624 	at hudson.tools.DownloadFromUrlInstaller$DescriptorImpl.access$100(DownloadFromUrlInstaller.java:123)
      2017-02-16_14:43:24.25624 	at hudson.tools.DownloadFromUrlInstaller$DescriptorImpl$1.reduce(DownloadFromUrlInstaller.java:140)
      2017-02-16_14:43:24.25625 	at hudson.model.DownloadService$Downloadable.updateNow(DownloadService.java:428)
      

      The problem was introduced in https://github.com/jenkinsci/jenkins/commit/80a6a9e7cbc1f2c7ecbf7c1161c55dae8c0233e0

      Coming up with a patch.

          [JENKINS-42141] Performance issue in code cleaning up duplicate Tool Installer

          Code changed in jenkins
          User: Yoann Dubreuil
          Path:
          core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java
          http://jenkins-ci.org/commit/jenkins/249dfb13be296b01b750497c0a93120200672508
          Log:
          JENKINS-42141 Fix performance issue in code merging Tool installer list

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Yoann Dubreuil Path: core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java http://jenkins-ci.org/commit/jenkins/249dfb13be296b01b750497c0a93120200672508 Log: JENKINS-42141 Fix performance issue in code merging Tool installer list

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java
          http://jenkins-ci.org/commit/jenkins/274b058c6279f3cb9a6c4474ba2128452e78b95c
          Log:
          Merge pull request #2752 from ydubreuil/fix-JENKINS-42141-perf-issue

          JENKINS-42141 Fix performance issue in code merging Tool installer list

          Compare: https://github.com/jenkinsci/jenkins/compare/0e67ad4e7337...274b058c6279

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java http://jenkins-ci.org/commit/jenkins/274b058c6279f3cb9a6c4474ba2128452e78b95c Log: Merge pull request #2752 from ydubreuil/fix- JENKINS-42141 -perf-issue JENKINS-42141 Fix performance issue in code merging Tool installer list Compare: https://github.com/jenkinsci/jenkins/compare/0e67ad4e7337...274b058c6279

          Daniel Beck added a comment -

          Fixed towards 2.48

          Daniel Beck added a comment - Fixed towards 2.48

            ydubreuil Yoann Dubreuil
            ydubreuil Yoann Dubreuil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: