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

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • workflow-job-plugin
    • 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.

          [JENKINS-63125] "trying to open a build log" exceptions in jenkins.log

          Veerendra Nallapaneni added a comment - - edited

          Hi, I am facing the same issue. I did Kill/Abort one of the Job But, after sometime Jenkins is not responsive. The logs got filled with tons of messages like below. The log file has grown to 10 GB. Not sure why Jenkins keep writing the below log even when the job is not running. 

          2022-06-14 22:00:57.763+0000 [id=164044]        WARNING               o.j.p.workflow.job.WorkflowRun#getListenerjava.lang.IllegalStateException: trying to open a build log on NodesJobsList #117 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:993)               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:136)               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:750) 

          We had to restart Jenkins to fix this issue.

          Jenkins Version:  2.263.4

          Can someone please look into this? Thanks

          Veerendra Nallapaneni added a comment - - edited Hi, I am facing the same issue. I did Kill/Abort one of the Job But, after sometime Jenkins is not responsive. The logs got filled with tons of messages like below. The log file has grown to 10 GB. Not sure why Jenkins keep writing the below log even when the job is not running.  2022-06-14 22:00:57.763+0000 [id=164044]        WARNING               o.j.p.workflow.job.WorkflowRun#getListenerjava.lang.IllegalStateException: trying to open a build log on NodesJobsList #117 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:993)               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:136)               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:750) We had to restart Jenkins to fix this issue. Jenkins Version:  2.263.4 Can someone please look into this? Thanks

          Alexander Ukhanov added a comment - - edited

          We have same issue in conditions:

          • pipeline contains "parallel" steps
          • one of the branches in parallel is hanging
          • user has killed entire build by /kill url

          Hope this helps

          2022-12-03 23:18:28.969+0000 [id=6708] WARNING o.j.p.workflow.job.WorkflowRun#getListener

          java.lang.IllegalStateException: trying to open a build log on folder1/Autotests/org-Autotests-Agent #122 after it has completed

          at org.jenkinsci.plugins.workflow.job.WorkflowRun.getListener(WorkflowRun.java:231)

          at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$300(WorkflowRun.java:138)

          at org.jenkinsci.plugins.workflow.job.WorkflowRun$Owner.getListener(WorkflowRun.java:1005)

          at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:43)

          at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)

          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)

          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95)

          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)

          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)

          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:139)

          at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)

          at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)

          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)

          Alexander Ukhanov added a comment - - edited We have same issue in conditions: pipeline contains "parallel" steps one of the branches in parallel is hanging user has killed entire build by /kill url Hope this helps 2022-12-03 23:18:28.969+0000 [id=6708] WARNING o.j.p.workflow.job.WorkflowRun#getListener java.lang.IllegalStateException: trying to open a build log on folder1/Autotests/org-Autotests-Agent #122 after it has completed at org.jenkinsci.plugins.workflow.job.WorkflowRun.getListener(WorkflowRun.java:231) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$300(WorkflowRun.java:138) at org.jenkinsci.plugins.workflow.job.WorkflowRun$Owner.getListener(WorkflowRun.java:1005) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:43) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294) 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:139) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68) 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)

            Unassigned Unassigned
            alexfrost Alexander Moroz
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: