• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • workflow-job-plugin
    • None
    • Jenkins 2.222.3
      workflow-job-plugin 2.39

      In the latest Jenkins version and workflow-job-plugin, it seems that the jenkins console log is frozen. I've tested both Firefox 76 and Chromium 81.0.4044.129.

      From trying to debug this issue, it seems that it is related to the workflow-job-plugin. It seems to be stuck processing nodes from the console:

      I've downgraded the plugin to version 2.36 - it seems that is the last version that works. 
      When upgrading to 2.37, the console log freezes the tab again.

      This is the test job I ran to generate the console output:

      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)} 
      

       

       

       

          [JENKINS-62241] Console freezes tab for chrome & firefox

          I am also hitting this issue when any of our pipelines has more than a few hundred KB of log. This is occurring for us on a brand new Jenkins server running the current LTS version 2.319.2 and the current Pipeline: Job plugin. Loading /console hangs for multiple minutes in the browser giving a warning about javascript: "This page is slowing down Firefox, stop this page?" When disabling javascript on the page, /console loads instantly for the build. Further debugging in the Jenkins Gitter channel with some Javascript profiling in Chrome I was also able to see org.jenkinsci.plugins.workflow.job.console.NewNodeConsoleNote/script.js:1 as being the likely culprit:

          After finding this ticket, I also downgraded workflow-job from the current version (1145.v7f2433caa07f) to 2.36 and the issue no longer occurs, /console loads quickly. Upgrading just 1 minor release to 2.37 and the issue occurs again, so it seems like there was a change between 2.36 and 2.37 causing this. I'm not sure where the source for these releases are since the current source in Github starts at release 2.41.

          I'm bumping this to Major since in our experience we can't load the console for any of our builds without the browser hanging, disabling javascript, or going to /consoleText and this occurs with the latest version of the plugin and the latest LTS jenkins release.

          Here's some additional profiling of the page if it's helpful:

          Jesse Jarzynka added a comment - I am also hitting this issue when any of our pipelines has more than a few hundred KB of log. This is occurring for us on a brand new Jenkins server running the current LTS version  2.319.2 and the current  Pipeline: Job plugin. Loading /console hangs for multiple minutes in the browser giving a warning about javascript: " This page is slowing down Firefox, stop this page? " When disabling javascript on the page, /console loads instantly for the build. Further debugging in the Jenkins Gitter channel with some Javascript profiling in Chrome I was also able to see org.jenkinsci.plugins.workflow.job.console.NewNodeConsoleNote/script.js:1 as being the likely culprit: After finding this ticket, I also downgraded workflow-job from the current version ( 1145.v7f2433caa07f ) to 2.36 and the issue no longer occurs, /console loads quickly. Upgrading just 1 minor release to 2.37 and the issue occurs again, so it seems like there was a change between 2.36 and 2.37 causing this. I'm not sure where the source for these releases are since the current source in Github starts at release 2.41 . I'm bumping this to Major since in our experience we can't load the console for any of our builds without the browser hanging, disabling javascript, or going to /consoleText and this occurs with the latest version of the plugin and the latest LTS jenkins release. Here's some additional profiling of the page if it's helpful:

          Jesse Jarzynka added a comment - - edited

          I've narrowed this issue down to commit 6e3de2429ff2d8b32d4210463cee4422e277b3b4 from PR 150 which introduced this issue.

          If I build branch workflow-job-2.37 the issue is there. If i only revert commit 6e3de2429ff2d8b32d4210463cee4422e277b3b4 the issue doesn't occur.

          This is easy to reproduce:

          1. Create a new Jenkins instance, docker example:
           docker run --name jenkins-test --rm -d -p "8080:8080" jenkins/jenkins:lts-jdk11
          1. Install only the Pipeline plugin(s)
          2. Create a new Pipeline job similar to the one in this bug's description:
          def genText(lines){
              (1..lines).each{
                  println "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur interdum fringilla interdum"
              }
              return true
          }
          parallel firstBranch: {
              genText(20000)
          }, secondBranch: {
              genText(20000)
          }
          1. Run a build and let build complete so a large log file is created
          2. Try to browse to the build's /console or /consoleFull

          It's unclear what is causing the slowness. In some of my JS profiling it seems to indicate some of the code in job/console/NewNodeConsoleNote/script.js:

          However if I comment those lines out, the profiler still thinks it's spending time in this script:

          But the cumulative time in the lines doesn't add up:

          In fact, if I checkout the workflow-job-2.37 branch and revert only the changes to NewNodeConsoleNote/script.js from commit 6e3de2429ff2d8b32d4210463cee4422e277b3b4, the issue still occurs, which makes me suspicious of the other changes in that commit instead.

          It's unclear why more users are not hitting this issue. I, and at least one other person (the OP of this ticket) seem to be. For my company we hit this on pretty much every single build making /console and /consoleFull unusable and lock up the user's browser, but we do not hit this on our older version of Jenkins or in my testing with workflow-job-plugin version 2.36 or earlier, or even on 2.37 with this change reverted. I'm not sure what the variable is, parallel branch pipelines maybe?

          This also seems to affect more than just the client's browser:

          From what I am actually seeing, the entire Jenkins instance is hurting

          o.j.p.w.s.concurrent.Timeout#lambda$ping$0: Running CpsFlowExecution[Owner[test/6:test #6]] unresponsive for 6 min 45 sec 

           

          Jesse Jarzynka added a comment - - edited I've narrowed this issue down to commit  6e3de2429ff2d8b32d4210463cee4422e277b3b4 from PR 150 which introduced this issue. If I build branch workflow-job-2.37 the issue is there. If i only revert commit 6e3de2429ff2d8b32d4210463cee4422e277b3b4 the issue doesn't occur. This is easy to reproduce: Create a new Jenkins instance, docker example: docker run --name jenkins-test --rm -d -p "8080:8080" jenkins/jenkins:lts-jdk11 Install only the Pipeline plugin(s) Create a new Pipeline job similar to the one in this bug's description: def genText(lines){ (1..lines).each{ println "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur interdum fringilla interdum" } return true } parallel firstBranch: { genText(20000) }, secondBranch: { genText(20000) } Run a build and let build complete so a large log file is created Try to browse to the build's /console or /consoleFull It's unclear what is causing the slowness. In some of my JS profiling it seems to indicate some of the code in job/console/NewNodeConsoleNote/script.js : However if I comment those lines out, the profiler still thinks it's spending time in this script: But the cumulative time in the lines doesn't add up: In fact, if I checkout the workflow-job-2.37 branch and revert only the changes to NewNodeConsoleNote/script.js from commit 6e3de2429ff2d8b32d4210463cee4422e277b3b4 , the issue still occurs, which makes me suspicious of the other changes in that commit instead. It's unclear why more users are not hitting this issue. I, and at least one other person (the OP of this ticket) seem to be. For my company we hit this on pretty much every single build making /console and /consoleFull unusable and lock up the user's browser, but we do not hit this on our older version of Jenkins or in my testing with workflow-job-plugin version 2.36 or earlier, or even on 2.37 with this change reverted. I'm not sure what the variable is, parallel branch pipelines maybe? This also seems to affect more than just the client's browser: From what I am actually seeing, the entire Jenkins instance is hurting o.j.p.w.s.concurrent.Timeout#lambda$ping$0: Running CpsFlowExecution[Owner[test/6:test #6]] unresponsive for 6 min 45 sec  

          Jesse Glick added a comment -

          Might duplicate JENKINS-56377.

          Jesse Glick added a comment - Might duplicate JENKINS-56377 .

          Definitely duplicate, thanks jglick. I've left a bunch of benchmarks in https://github.com/jenkinsci/workflow-job-plugin/pull/164#issuecomment-1029380147

          Jesse Jarzynka added a comment - Definitely duplicate, thanks jglick . I've left a bunch of benchmarks in https://github.com/jenkinsci/workflow-job-plugin/pull/164#issuecomment-1029380147

          Jesse Glick added a comment -

          OK, thanks for confirmation.

          Jesse Glick added a comment - OK, thanks for confirmation.

            Unassigned Unassigned
            hellspam Roy Arnon
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: