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

Updating JIRA-issues deadlock

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core, jira-plugin
    • Environment:
    • Similar Issues:

      Description

      After we updated our Jenkins-Instance from 1.609.3 to 2.46.3 (both LTS) the Post-Build-Action "Update relevant issues" will stall many of our Jenkins-Builds. (100% CPU usage on Jenkins Master, the Builds would run hours and days if I didn't kill the thread manually).

      The Action "Update relevant issues" is enabled in some of our Jobs and the Default Issue Selector is selected.
      All of those Jobs are of the Type "Freestyle Build Job".
      Our Sourcecode-Repository is a Subversion-Repository. Builds are triggered via a svn post commit hook. Our subversion project repositories uses 'svn externals' - there are around ~50 externals (libraries) included in a project-checkout.

      Sometimes one and the same library is checked out multiple times for one build-job, e.g.
      at Path /: svn:externals=/repos/Tools/tags/V0071/ tools
      at Path /build: svn:externals=/repos/Tools/tags/V0071/yagarto/4.90/ yagarto


      The problem does not occour on every build of those jobs - only if "Changes in dependency" are detected the problem occours.

      There is nothing written on the Build-Console after

      [WARNINGS] Parsing warnings in console log with parser GNU C Compiler 4 (gcc)
      [WARNINGS] Computing warning deltas based on reference build #1204
      Archiving artifacts
      Recording fingerprints

      At Jenkins-Logfile nothing abnormal is logged while the Thread is working and working.

      Only at Java-Melody I can see something suspicious:
      The Executor-Thread for this Build consumes loads fo CPU-time and seems to be in some kind of a recursion:

      Executor #0 for HUDSONSL1 : executing {Jobname} #1205
      java.util.StringTokenizer.scanToken(StringTokenizer.java:278)
      java.util.StringTokenizer.nextToken(StringTokenizer.java:351)
      jenkins.model.Jenkins.getItemByFullName(Jenkins.java:2876)
      hudson.model.Fingerprint$BuildPtr.getJob(Fingerprint.java:152)
      hudson.tasks.Fingerprinter$FingerprintAction.getDependencies(Fingerprinter.java:412)
      hudson.model.AbstractBuild.getDependencyChanges(AbstractBuild.java:1271)
      hudson.plugins.jira.RunScmChangeExtractor.getDependencyChanges(RunScmChangeExtractor.java:76)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:132)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
      hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
      hudson.plugins.jira.selector.DefaultIssueSelector.findIssueIds(DefaultIssueSelector.java:48)
      hudson.plugins.jira.Updater.perform(Updater.java:85)
      hudson.plugins.jira.JiraIssueUpdater.perform(JiraIssueUpdater.java:64)
      hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      hudson.model.Build$BuildExecution.post2(Build.java:186)
      hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
      hudson.model.Run.execute(Run.java:1753)
      hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      hudson.model.ResourceController.execute(ResourceController.java:98)
      hudson.model.Executor.run(Executor.java:405

      Another Problem we now have is (don't know if this problems are in connection), that the post build action "Update issues" does comment loads of issues... often also those, which hasn't been mentioned in a commit comment since years.

        Attachments

          Activity

          Hide
          mzampetti Marc Zampetti added a comment -

          We are seeing this issue as well. It seems to have started with jira-plugin versions > 2.2.1.

          Show
          mzampetti Marc Zampetti added a comment - We are seeing this issue as well. It seems to have started with jira-plugin versions > 2.2.1.
          Hide
          coyote_de Dieter G. added a comment -

          @Marc Zampetti

          Are you using also Subversion as SourceCodeRepository...? Does your Subversion Repository also contains SVN-Externals?

          Show
          coyote_de Dieter G. added a comment - @ Marc Zampetti Are you using also Subversion as SourceCodeRepository...? Does your Subversion Repository also contains SVN-Externals?
          Hide
          mzampetti Marc Zampetti added a comment -

          Dieter G. for some projects, we are using SVN as a code repository in Jenkins, but not all. I'm not sure SVN-Externals is in use, as its a different that is using it. I'll update here if I can find out.

          Show
          mzampetti Marc Zampetti added a comment - Dieter G. for some projects, we are using SVN as a code repository in Jenkins, but not all. I'm not sure SVN-Externals is in use, as its a different that is using it. I'll update here if I can find out.
          Hide
          thomsontat Thomson Tat added a comment -

          We're seeing the same problem as well.  Seems to occur randomly.  Every now and then, it would update 50 to 200 unrelated JIRA tickets.

          Show
          thomsontat Thomson Tat added a comment - We're seeing the same problem as well.  Seems to occur randomly.  Every now and then, it would update 50 to 200 unrelated JIRA tickets.
          Hide
          coyote_de Dieter G. added a comment -

          We've disabled the JIRA-Plugin last year due to this Problem.

          We are now building some GIT-Projects with jenkins - I've tested the JIRA Plugin recently again.
          The problem seem to be independent from SVN...

          java.lang.StackOverflowError
          	at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
          	at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
          	at java.io.File.exists(File.java:819)
          	at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1282)
          	at sun.misc.URLClassPath$FileLoader.findResource(URLClassPath.java:1249)
          	at sun.misc.URLClassPath$1.next(URLClassPath.java:267)
          	at sun.misc.URLClassPath$1.hasMoreElements(URLClassPath.java:277)
          	at java.net.URLClassLoader$3$1.run(URLClassLoader.java:601)
          	at java.net.URLClassLoader$3$1.run(URLClassLoader.java:599)
          	at java.security.AccessController.doPrivileged(Native Method)
          	at java.net.URLClassLoader$3.next(URLClassLoader.java:598)
          	at java.net.URLClassLoader$3.hasMoreElements(URLClassLoader.java:623)
          	at org.eclipse.jetty.webapp.WebAppClassLoader.getResources(WebAppClassLoader.java:380)
          	at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:348)
          	at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393)
          	at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474)
          	at javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:293)
          	at java.security.AccessController.doPrivileged(Native Method)
          	at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:289)
          	at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:267)
          	at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:127)
          	at org.apache.commons.digester.Digester.getFactory(Digester.java:537)
          	at org.apache.commons.digester.Digester.getParser(Digester.java:791)
          	at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1068)
          	at org.apache.commons.digester.Digester.parse(Digester.java:1871)
          	at hudson.scm.SubversionChangeLogParser.parse(SubversionChangeLogParser.java:76)
          	at hudson.scm.SubversionChangeLogParser.parse(SubversionChangeLogParser.java:43)
          	at hudson.scm.ChangeLogParser.parse(ChangeLogParser.java:57)
          	at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:875)
          	at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:843)
          	at hudson.plugins.jira.RunScmChangeExtractor.getChanges(RunScmChangeExtractor.java:29)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.findIssues(DefaultIssueSelector.java:73)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromChangeLog(DefaultIssueSelector.java:97)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromCurrentBuild(DefaultIssueSelector.java:121)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:109)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	...
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110)
          	at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          Show
          coyote_de Dieter G. added a comment - We've disabled the JIRA-Plugin last year due to this Problem. We are now building some GIT-Projects with jenkins - I've tested the JIRA Plugin recently again. The problem seem to be independent from SVN... java.lang.StackOverflowError at java.io.UnixFileSystem.getBooleanAttributes0(Native Method) at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242) at java.io.File.exists(File.java:819) at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1282) at sun.misc.URLClassPath$FileLoader.findResource(URLClassPath.java:1249) at sun.misc.URLClassPath$1.next(URLClassPath.java:267) at sun.misc.URLClassPath$1.hasMoreElements(URLClassPath.java:277) at java.net.URLClassLoader$3$1.run(URLClassLoader.java:601) at java.net.URLClassLoader$3$1.run(URLClassLoader.java:599) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader$3.next(URLClassLoader.java:598) at java.net.URLClassLoader$3.hasMoreElements(URLClassLoader.java:623) at org.eclipse.jetty.webapp.WebAppClassLoader.getResources(WebAppClassLoader.java:380) at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:348) at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393) at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474) at javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:293) at java.security.AccessController.doPrivileged(Native Method) at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:289) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:267) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:127) at org.apache.commons.digester.Digester.getFactory(Digester.java:537) at org.apache.commons.digester.Digester.getParser(Digester.java:791) at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1068) at org.apache.commons.digester.Digester.parse(Digester.java:1871) at hudson.scm.SubversionChangeLogParser.parse(SubversionChangeLogParser.java:76) at hudson.scm.SubversionChangeLogParser.parse(SubversionChangeLogParser.java:43) at hudson.scm.ChangeLogParser.parse(ChangeLogParser.java:57) at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:875) at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:843) at hudson.plugins.jira.RunScmChangeExtractor.getChanges(RunScmChangeExtractor.java:29) at hudson.plugins.jira.selector.DefaultIssueSelector.findIssues(DefaultIssueSelector.java:73) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromChangeLog(DefaultIssueSelector.java:97) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromCurrentBuild(DefaultIssueSelector.java:121) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:109) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) ... at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesRecursive(DefaultIssueSelector.java:110) at hudson.plugins.jira.selector.DefaultIssueSelector.addIssuesFromDependentBuilds(DefaultIssueSelector.java:135)
          Hide
          thomsontat Thomson Tat added a comment -

          It looks like it's a combination of two things that's causing this bug.  There's a bug that's causing Jenkins to see changes to it's dependencies even though there aren't any.  This seems random for us.  And I'm not sure how or why it thinks there's a dependency on itself?

          https://issues.jenkins-ci.org/browse/JENKINS-46995

          i.e. Job A #300 has dependency changes in Job A #290-299.  Job A #290 has dependency changes in Job A #275-289....

           

          The DefaultIssueSelector looks at all of these dependencies, which can take a really long time to finish. This recursive call doesn't have any limit on how far down the dependencies it's looking.  This can end up being hundreds of builds down the chain.

          https://github.com/jenkinsci/jira-plugin/blob/master/src/main/java/hudson/plugins/jira/selector/DefaultIssueSelector.java#L110

          https://github.com/jenkinsci/jira-plugin/blob/master/src/main/java/hudson/plugins/jira/selector/DefaultIssueSelector.java#L135

          It looks like it's a bug in the refactoring of the original issue selector.

          https://github.com/jenkinsci/jira-plugin/commit/2eace064c77979cab041e61d82dea47eb44cc886#diff-e381acd1474876247543cc9edc4ea09e

          As far as I can tell, the original code (roughly) looks like this:

          findIssueIdsRecursive()
          {
            findIssues()
            for each in dependency
              findIssues()
            // findIssueIdsRecursive is not called again
          }
           
          

          The refactoring changed it to roughly this:

          addIssuesRecursive()
          {  
              addIssuesCarriedOverFromPreviousBuild()
              addIssuesFromCurrentBuild()
              addIssuesFromDependentBuilds()
          }
          
          addIssuesFromDependentBuilds()
          {    
              for each in dependency
                 // Looking at dependent builds of this build, along with all of its dependent builds
                 addIssuesRecursive()
          }

           

          When we're running into this problem, it looks like a deadlock, but it's actually just taking hours instead of minutes like it normally does.

           

          Those spikes are probably when no one noticed on our team and it finished.  The smaller spikes are probably when someone noticed and we had to manually abort the thread, thinking the plugin deadlocked again.

           

          Show
          thomsontat Thomson Tat added a comment - It looks like it's a combination of two things that's causing this bug.  There's a bug that's causing Jenkins to see changes to it's dependencies even though there aren't any.  This seems random for us.  And I'm not sure how or why it thinks there's a dependency on itself? https://issues.jenkins-ci.org/browse/JENKINS-46995 i.e. Job A #300 has dependency changes in Job A #290-299.  Job A #290 has dependency changes in Job A #275-289....   The DefaultIssueSelector looks at all of these dependencies, which can take a really long time to finish. This recursive call doesn't have any limit on how far down the dependencies it's looking.  This can end up being hundreds of builds down the chain. https://github.com/jenkinsci/jira-plugin/blob/master/src/main/java/hudson/plugins/jira/selector/DefaultIssueSelector.java#L110 https://github.com/jenkinsci/jira-plugin/blob/master/src/main/java/hudson/plugins/jira/selector/DefaultIssueSelector.java#L135 It looks like it's a bug in the refactoring of the original issue selector. https://github.com/jenkinsci/jira-plugin/commit/2eace064c77979cab041e61d82dea47eb44cc886#diff-e381acd1474876247543cc9edc4ea09e As far as I can tell, the original code (roughly) looks like this: findIssueIdsRecursive() {   findIssues()   for each in dependency     findIssues() // findIssueIdsRecursive is not called again }   The refactoring changed it to roughly this: addIssuesRecursive() {  addIssuesCarriedOverFromPreviousBuild() addIssuesFromCurrentBuild() addIssuesFromDependentBuilds() } addIssuesFromDependentBuilds() {    for each in dependency // Looking at dependent builds of this build, along with all of its dependent builds     addIssuesRecursive() }   When we're running into this problem, it looks like a deadlock, but it's actually just taking hours instead of minutes like it normally does.   Those spikes are probably when no one noticed on our team and it finished.  The smaller spikes are probably when someone noticed and we had to manually abort the thread, thinking the plugin deadlocked again.  
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Thomson Tat
          Path:
          src/main/java/hudson/plugins/jira/selector/DefaultIssueSelector.java
          http://jenkins-ci.org/commit/jira-plugin/c1d681ba6333b7341babefbb37fcff363eb83f8b
          Log:
          JENKINS-44989 - addIssuesFromDependentBuilds method shouldn't call addIssuesRecursive

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Thomson Tat Path: src/main/java/hudson/plugins/jira/selector/DefaultIssueSelector.java http://jenkins-ci.org/commit/jira-plugin/c1d681ba6333b7341babefbb37fcff363eb83f8b Log: JENKINS-44989 - addIssuesFromDependentBuilds method shouldn't call addIssuesRecursive
          Hide
          warden Radek Antoniuk added a comment -

          Fixed long time ago in v. 2.5.2:
          https://github.com/jenkinsci/jira-plugin/pull/142

          Show
          warden Radek Antoniuk added a comment - Fixed long time ago in v. 2.5.2: https://github.com/jenkinsci/jira-plugin/pull/142

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            coyote_de Dieter G.
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: