"trying to open a build log" exceptions in jenkins.log

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major
    • Component/s: workflow-job-plugin
    • Environment:
      workflow-job-plugin 2.39
      workflow-cps-plugin 2.80
      jenkins 2.204.6

      Periodically, a problem appears in different Jenkins instances: identical exceptions of an already completed build are continuously written to the jenkins.log. Because of this, the log file can grow up to tens (sometimes hundred) of gigabytes, taking up all the free space.
      The content is as follows:

      2020-07-16 12:05:03.730+0000 [id=1010234]       WARNING o.j.p.workflow.job.WorkflowRun#getListener
      java.lang.IllegalStateException: trying to open a build log on Project/Job #251 after it has completed
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.getListener(WorkflowRun.java:230)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$300(WorkflowRun.java:137)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun$Owner.getListener(WorkflowRun.java:982)
              at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:43)
              at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
              at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
              at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
              at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      

      We tried to disable the project, delete the build (including from the filesystem), change the number of the next build - nothing helps.
      If enable "preparation for shutdown", then the problem disappears. After turning back on, the problem continues.
      The only thing that helps now is restarting the instance.

      Any other workarounds besides restart would be very helpful.

            Assignee:
            Unassigned
            Reporter:
            Alexander Moroz
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: