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

ClassCastException: jenkins.security.ImpersonatingScheduledExecutorService cannot be cast to java.util.concurrent.ScheduledThreadPoolExecutor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • disk-usage-plugin
    • None
    • Jenkins v2.60.2
      disk-usage-plugin v0.28

      Seeing this stacktrace in the jenkins log file from time to time. Three identical stacktraces always occur together for the three threads BuildDiskUsageCalculationThread, JobWithoutBuildsDiskUsageCalculation and WorkspaceDiskUsageCalculationThread. Cant see any actual functionality impact, so classifying as "minor".

      Example from our jenkins.log:

      May 05, 2017 6:00:55 AM hudson.triggers.SafeTimerTask run
      SEVERE: Timer task hudson.plugins.disk_usage.BuildDiskUsageCalculationThread@1fb8d65 failed
      java.lang.ClassCastException: jenkins.security.ImpersonatingScheduledExecutorService cannot be cast to java.util.concurrent.ScheduledThreadPoolExecutor
              at hudson.plugins.disk_usage.DiskUsageCalculation.cancel(DiskUsageCalculation.java:82)
              at hudson.plugins.disk_usage.BuildDiskUsageCalculationThread.getNewInstance(BuildDiskUsageCalculationThread.java:98)
              at hudson.model.AperiodicWork.doRun(AperiodicWork.java:89)
              at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
              at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:748)
      
      May 05, 2017 6:00:55 AM hudson.model.AsyncAperiodicWork$1 run
      INFO: Started Calculation of workspace usage
      May 05, 2017 6:00:55 AM hudson.triggers.SafeTimerTask run
      SEVERE: Timer task hudson.plugins.disk_usage.JobWithoutBuildsDiskUsageCalculation@42b77566 failed
      java.lang.ClassCastException: jenkins.security.ImpersonatingScheduledExecutorService cannot be cast to java.util.concurrent.ScheduledThreadPoolExecutor
              at hudson.plugins.disk_usage.DiskUsageCalculation.cancel(DiskUsageCalculation.java:82)
              at hudson.plugins.disk_usage.JobWithoutBuildsDiskUsageCalculation.getNewInstance(JobWithoutBuildsDiskUsageCalculation.java:82)
              at hudson.model.AperiodicWork.doRun(AperiodicWork.java:89)
              at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
              at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:748)
      
      May 05, 2017 6:00:55 AM hudson.model.AsyncAperiodicWork$1 run
      INFO: Started Calculation of builds disk usage
      May 05, 2017 6:00:55 AM hudson.model.AsyncAperiodicWork$1 run
      INFO: Started Calculation of job directories (without builds)
      May 05, 2017 6:00:55 AM hudson.triggers.SafeTimerTask run
      SEVERE: Timer task hudson.plugins.disk_usage.WorkspaceDiskUsageCalculationThread@31fa1a0b failed
      java.lang.ClassCastException: jenkins.security.ImpersonatingScheduledExecutorService cannot be cast to java.util.concurrent.ScheduledThreadPoolExecutor
              at hudson.plugins.disk_usage.DiskUsageCalculation.cancel(DiskUsageCalculation.java:82)
              at hudson.plugins.disk_usage.WorkspaceDiskUsageCalculationThread.getNewInstance(WorkspaceDiskUsageCalculationThread.java:78)
              at hudson.model.AperiodicWork.doRun(AperiodicWork.java:89)
              at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
              at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:748)
      
      May 05, 2017 6:00:55 AM hudson.model.AsyncAperiodicWork$1 run
      INFO: Finished Calculation of workspace usage. 6 ms
      May 05, 2017 6:00:55 AM hudson.model.AsyncAperiodicWork$1 run
      INFO: Finished Calculation of builds disk usage. 5 ms
      May 05, 2017 6:00:55 AM hudson.model.AsyncAperiodicWork$1 run
      INFO: Finished Calculation of job directories (without builds). 5 ms
      

            Unassigned Unassigned
            stefanthurnherr Stefan Thurnherr
            Votes:
            7 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: