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

BlueOcean triggering an oddly large amount of work due to simple getAction call on Run

    XMLWordPrintable

    Details

    • Epic Link:
    • Sprint:
      Blue Ocean 1.4 - beta 2
    • Similar Issues:

      Description

      Note: we are pretty sure this is for an older version of blue ocean, not sure if in the newer ones, this happens on large masters when there is lots of stuff going on and being queued. 

       

      I spotted this while troubleshooting an issue – it was being triggered by a simple call to the display name of a run. Seems to be triggered when getting the Action list for the run, due to the BlueOcean TransientActionFactory creating an Action.

      Probably the whole thing could be sidestepped if we lazy-initialized some of these parts rather than eagerly initializing.

      at io.jenkins.blueocean.rest.hal.Link.rel(Link.java:30)
      at io.jenkins.blueocean.service.embedded.rest.OrganizationImpl.getLink(OrganizationImpl.java:93)
      at io.jenkins.blueocean.service.embedded.rest.PipelineContainerImpl.<init>(PipelineContainerImpl.java:50)
      at io.jenkins.blueocean.service.embedded.rest.PipelineContainerImpl.<init>(PipelineContainerImpl.java:41)
      at io.jenkins.blueocean.service.embedded.rest.OrganizationImpl.getPipelines(OrganizationImpl.java:65)
      at io.jenkins.blueocean.rest.factory.BluePipelineFactory.resolve(BluePipelineFactory.java:64)
      at io.jenkins.blueocean.service.embedded.BlueOceanUrlMapperImpl.getUrl(BlueOceanUrlMapperImpl.java:58)
      at io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectImpl.<init>(BlueOceanUrlObjectImpl.java:19)
      at io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectFactoryImpl.get(BlueOceanUrlObjectFactoryImpl.java:18)
      at io.jenkins.blueocean.service.embedded.TryBlueOceanMenu.createFor(TryBlueOceanMenu.java:45)
      at io.jenkins.blueocean.service.embedded.TryBlueOceanMenu.createFor(TryBlueOceanMenu.java:26)
      at hudson.model.Actionable.createFor(Actionable.java:111)
      at hudson.model.Actionable.getAction(Actionable.java:334)
      at jenkins.branch.OrganizationFolder.getDisplayName(OrganizationFolder.java:564)
      at hudson.model.AbstractItem.getFullDisplayName(AbstractItem.java:368)
      at hudson.model.AbstractItem.getFullDisplayName(AbstractItem.java:367)
      at hudson.model.AbstractItem.getFullDisplayName(AbstractItem.java:367)
      at hudson.model.Run.getFullDisplayName(Run.java:782)
      at

        Attachments

          Issue Links

            Activity

            Hide
            svanoort Sam Van Oort added a comment -

            Vivek Pandey Thank you for the fast turnaround!  Reviewing your PR now – agree that lazy-load here may ease pain on its own. 

            Show
            svanoort Sam Van Oort added a comment - Vivek Pandey Thank you for the fast turnaround!  Reviewing your PR now – agree that lazy-load here may ease pain on its own. 
            Hide
            vivek Vivek Pandey added a comment -

            Sam Van Oort Although I couldn't reproduce it with latest master but it makes sense to compute url lazily.

            Show
            vivek Vivek Pandey added a comment - Sam Van Oort Although I couldn't reproduce it with latest master but it makes sense to compute url lazily.
            Hide
            svanoort Sam Van Oort added a comment -

            Will see if I can reproduce it by tickling a master via scalability lab

            Show
            svanoort Sam Van Oort added a comment - Will see if I can reproduce it by tickling a master via scalability lab
            Hide
            svanoort Sam Van Oort added a comment -

            May be resolved or related to https://issues.jenkins-ci.org/browse/JENKINS-39681

            This one needed a thread dump under fairly heavy load (i.e. Fortune 500 company large-scale master) to reproduce. 

            Show
            svanoort Sam Van Oort added a comment - May be resolved or related to https://issues.jenkins-ci.org/browse/JENKINS-39681 This one needed a thread dump under fairly heavy load (i.e. Fortune 500 company large-scale master) to reproduce. 
            Hide
            jamesdumay James Dumay added a comment - - edited

            Vivek Pandey would you mind taking a look at this one when you wake up? Sam Van Oort said this has some big performance implications for a customer he is working with.

            Show
            jamesdumay James Dumay added a comment - - edited Vivek Pandey would you mind taking a look at this one when you wake up? Sam Van Oort said this has some big performance implications for a customer he is working with.
            Hide
            svanoort Sam Van Oort added a comment -

            Vivek Panday  James Dumay We may want to take a good solid look at what BlueOcean is doing here, because is blocking the Queue.maintain task and that can carry big implications for the ability to juggle concurrent jobs – I saw another thread dump for a user today where multiple threads trying to interact with the queue because of this.

            Show
            svanoort Sam Van Oort added a comment - Vivek Panday   James Dumay We may want to take a good solid look at what BlueOcean is doing here, because is blocking the Queue.maintain task and that can carry big implications for the ability to juggle concurrent jobs – I saw another thread dump for a user today where multiple threads trying to interact with the queue because of this.
            Hide
            svanoort Sam Van Oort added a comment -

            Seems like this may be doing some extra stuff:

             

            AtmostOneTaskExecutor[Periodic Jenkins queue maintenance] 76274 
            Stack Trace is: 
            java.lang.Thread.State: RUNNABLE
            at java.lang.String.substring(String.java:1969)
            at java.lang.String.subSequence(String.java:2003)
            at java.util.regex.Matcher.getSubSequence(Matcher.java:1294)
            at java.util.regex.Matcher.group(Matcher.java:541)
            at java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2720)
            at java.util.Formatter.parse(Formatter.java:2560)
            at java.util.Formatter.format(Formatter.java:2501)
            at java.util.Formatter.format(Formatter.java:2455)
            at java.lang.String.format(String.java:2940)
            at io.jenkins.blueocean.service.embedded.BlueOceanUrlMapperImpl.getLandingPagePath(BlueOceanUrlMapperImpl.java:106)
            at io.jenkins.blueocean.service.embedded.BlueOceanUrlMapperImpl.getUrl(BlueOceanUrlMapperImpl.java:35)
            at io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectImpl.<init>(BlueOceanUrlObjectImpl.java:19)
            at io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectFactoryImpl.get(BlueOceanUrlObjectFactoryImpl.java:18)
            at io.jenkins.blueocean.service.embedded.TryBlueOceanMenu.createFor(TryBlueOceanMenu.java:45)
            at io.jenkins.blueocean.service.embedded.TryBlueOceanMenu.createFor(TryBlueOceanMenu.java:26)

            Show
            svanoort Sam Van Oort added a comment - Seems like this may be doing some extra stuff:   AtmostOneTaskExecutor [Periodic Jenkins queue maintenance] 76274   Stack Trace is:  java.lang.Thread.State: RUNNABLE at java.lang.String.substring(String.java:1969) at java.lang.String.subSequence(String.java:2003) at java.util.regex.Matcher.getSubSequence(Matcher.java:1294) at java.util.regex.Matcher.group(Matcher.java:541) at java.util.Formatter$FormatSpecifier. <init> (Formatter.java:2720) at java.util.Formatter.parse(Formatter.java:2560) at java.util.Formatter.format(Formatter.java:2501) at java.util.Formatter.format(Formatter.java:2455) at java.lang.String.format(String.java:2940) at io.jenkins.blueocean.service.embedded.BlueOceanUrlMapperImpl.getLandingPagePath(BlueOceanUrlMapperImpl.java:106) at io.jenkins.blueocean.service.embedded.BlueOceanUrlMapperImpl.getUrl(BlueOceanUrlMapperImpl.java:35) at io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectImpl. <init> (BlueOceanUrlObjectImpl.java:19) at io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectFactoryImpl.get(BlueOceanUrlObjectFactoryImpl.java:18) at io.jenkins.blueocean.service.embedded.TryBlueOceanMenu.createFor(TryBlueOceanMenu.java:45) at io.jenkins.blueocean.service.embedded.TryBlueOceanMenu.createFor(TryBlueOceanMenu.java:26)

              People

              • Assignee:
                vivek Vivek Pandey
                Reporter:
                svanoort Sam Van Oort
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: