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

Endless loop in LargeText.BufferSession.skip

    Details

    • Similar Issues:

      Description

      A Pipeline build was observed hanging waiting for a lock, which was held by

      "jenkins.util.Timer [#1]" id=... state=RUNNABLE cpu=99%
          at org.kohsuke.stapler.framework.io.LargeText$BufferSession.skip(LargeText.java:532)
          at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:211)
          at hudson.console.AnnotatedLargeText.writeRawLogTo(AnnotatedLargeText.java:162)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.copyLogs(WorkflowRun.java:370)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$600(WorkflowRun.java:111)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun$3.run(WorkflowRun.java:266)
          at ...
      

      Seems that this infinite loop occurs reproducibly when a call to writeLogTo is made with a start position greater than the size of the log file.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "stapler PR 78 (Web Link)" [ 14765 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-job PR 18 (Web Link)" [ 14767 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            Hide
            jglick Jesse Glick added a comment -

            Do not know exactly why this is happening, but can at least make it not be as much of a problem.

            Show
            jglick Jesse Glick added a comment - Do not know exactly why this is happening, but can at least make it not be as much of a problem.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
            http://jenkins-ci.org/commit/workflow-job-plugin/79a5283c5ec3e9814de4cc42f906c01ffcfb23e3
            Log:
            JENKINS-37664 Do not even try to copy logs past the end.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java http://jenkins-ci.org/commit/workflow-job-plugin/79a5283c5ec3e9814de4cc42f906c01ffcfb23e3 Log: JENKINS-37664 Do not even try to copy logs past the end.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
            http://jenkins-ci.org/commit/workflow-job-plugin/d4a59b5115bcb8eecf727d146618eb11d08cb6e2
            Log:
            Merge pull request #18 from jglick/log-copy-JENKINS-37664

            JENKINS-37664 Do not even try to copy logs past the end

            Compare: https://github.com/jenkinsci/workflow-job-plugin/compare/6e3d7f4c1bea...d4a59b5115bc

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java http://jenkins-ci.org/commit/workflow-job-plugin/d4a59b5115bcb8eecf727d146618eb11d08cb6e2 Log: Merge pull request #18 from jglick/log-copy- JENKINS-37664 JENKINS-37664 Do not even try to copy logs past the end Compare: https://github.com/jenkinsci/workflow-job-plugin/compare/6e3d7f4c1bea...d4a59b5115bc
            Hide
            jglick Jesse Glick added a comment -

            PRs merged but should not be considered fixed until the corresponding Stapler release makes it into Jenkins core.

            Show
            jglick Jesse Glick added a comment - PRs merged but should not be considered fixed until the corresponding Stapler release makes it into Jenkins core.
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: vivek
            Path:
            core/pom.xml
            http://jenkins-ci.org/commit/jenkins/f8caf67bed19193277c8f71b86112f502d6bf877
            Log:
            [JENKINS-37664 and other fixes] - Upgrade to stapler version 1.246 (#2593)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: vivek Path: core/pom.xml http://jenkins-ci.org/commit/jenkins/f8caf67bed19193277c8f71b86112f502d6bf877 Log: [JENKINS-37664 and other fixes] - Upgrade to stapler version 1.246 (#2593)
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The change has been released in stapler-1.246 and merged towards 2.28

            Show
            oleg_nenashev Oleg Nenashev added a comment - The change has been released in stapler-1.246 and merged towards 2.28
            oleg_nenashev Oleg Nenashev made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Not an LTS candidate, would require a backporting of the fix to another Stapler version. 1.246 caused a fallout

            Show
            oleg_nenashev Oleg Nenashev added a comment - Not an LTS candidate, would require a backporting of the fix to another Stapler version. 1.246 caused a fallout
            Hide
            jglick Jesse Glick added a comment -

            I have a workaround in workflow-job so I think this does not need backporting.

            Show
            jglick Jesse Glick added a comment - I have a workaround in workflow-job so I think this does not need backporting.
            oleg_nenashev Oleg Nenashev made changes -
            Labels stapler 2.19.3-rejected stapler
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            2.19.3-rejected then

            Show
            oleg_nenashev Oleg Nenashev added a comment - 2.19.3-rejected then

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: