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

console log hangs in web browser after upgrade

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: workflow-job-plugin
    • Labels:
    • Environment:
      Jenkins v2.89.4 w/ workflow-job-plugin v2.25
      Jenkins v2.150.3 w/ workflow-job-plugin v2.31
    • Similar Issues:

      Description

      We recently upgraded Jenkins from 2.89.4 to 2.150.3 and then upgraded the workflow-job plugin from 2.25 to 2.31 and are now seeing an issue where the full console log in the Jenkins UI is having issues loading. We run a parallel pipeline heavy workload which results in a 13mb console log in 2.150.3 and a 46mb console log in 2.89.4. In Jenkins 2.89.4, it took 45 seconds to load the full console log file in Chrome and even less time in Firefox. In Jenkins 2.150.3 the log file took 2m 30sec in Chrome and after 5 minutes never loaded in Firefox. I kept seeing "A web page is slowing down your browser. What would you like to do? [Stop It, Wait]" and eventually Firefox became unresponsive. I used Chrome 72 and Firefox 65 in my testing.

        Attachments

          Activity

          Hide
          fengxx Ted Xiao added a comment -

          I think it is because the javascript function which loops each line and appended parallel label

          https://github.com/jenkinsci/workflow-job-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/workflow/job/console/NewNodeConsoleNote/script.js#L21-L42

          It can be reproduced by a generating lots of lines in parallel step, such as

           

          
          def genText(lines){
              (1..lines).each{
          	   println "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur interdum fringilla interdum"
              }
              return true
          }
          
          parallel "branch-1" : { genText(20000) }, 
                    "branch-2": { genText(20000)} 

          The consoleFull is very slow and firefox complaining about the js

          Jesse Glick does it make sense to generate the label in backend(Jenkins side) ?

          Show
          fengxx Ted Xiao added a comment - I think it is because the javascript function which loops each line and appended parallel label https://github.com/jenkinsci/workflow-job-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/workflow/job/console/NewNodeConsoleNote/script.js#L21-L42 It can be reproduced by a generating lots of lines in parallel step, such as   def genText(lines){ (1..lines).each{ println "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur interdum fringilla interdum" } return true } parallel "branch-1" : { genText(20000) }, "branch-2" : { genText(20000)} The consoleFull is very slow and firefox complaining about the js Jesse Glick does it make sense to generate the label in backend(Jenkins side) ?
          Hide
          jglick Jesse Glick added a comment -

          I would start by seeing if the loop can be cut off at some threshold, then see if the loop can be optimized for the lines it does process.

          Show
          jglick Jesse Glick added a comment - I would start by seeing if the loop can be cut off at some threshold, then see if the loop can be optimized for the lines it does process.

            People

            • Assignee:
              Unassigned
              Reporter:
              mkozell Mike Kozell
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: