Uploaded image for project: 'NetarchiveSuite'
  1. NetarchiveSuite
  2. NAS-1310

Scheduled tasks may silently fail (ScheduledThreadPoolExecutor trouble)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • None
    • 3.15.0
    • Common
    • None

    Description

      Some time ago I replaced Timer/TimerTask code for scheduled tasks with the newer and more powerful implementation from package java.util.concurrent.
      These scheduled tasks include job generation crawl control running job monitoring (frontier report extracts graph generation and history sampling) hence may be critical tasks in the application.
      It happens that the specification found in the API docs is wrong and that the code I put in place to trap runtime exceptions occuring during a task execution (overriding ScheduledThreadPoolExecutor#afterExecute) won't work so these tasks may fail (and all future executions will be cancelled by the scheduler) completely silently.
      I have experienced this bug both with job generation and job monitoring.
      After some intensive digging in forums and blogs I was able to find a solution that needs to be implemented in NetArchive Suite.

      Attachments

        Activity

          People

            ngiraud Nicolas Giraud (Inactive)
            ngiraud Nicolas Giraud (Inactive)
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: