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

hudson.triggers.Trigger$Cron doRun throwing a NullPointerException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Environment:
      1.617
      RHEL
    • Similar Issues:

      Description

      Hi, it seems that Jenkins is throwing a NullPointerException on the below in the background logs but i can't seem to tell why.

      Jun 25, 2015 5:38:00 PM hudson.triggers.Trigger$Cron doRun
      WARNING: Cron thread throw an exception
      java.lang.NullPointerException
              at hudson.model.Descriptor.toMap(Descriptor.java:880)
              at hudson.util.DescribableList.toMap(DescribableList.java:151)
              at hudson.model.AbstractProject.getTriggers(AbstractProject.java:1615)
              at hudson.triggers.Trigger.checkTriggers(Trigger.java:259)
              at hudson.triggers.Trigger$Cron.doRun(Trigger.java:215)
              at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      
      

        Attachments

          Issue Links

            Activity

            Hide
            lzr gene lzr added a comment -

            I do have Job Config History installed but I already deleted the project I'm not sure if config history is kept after deletion.

            Let me ask this though. Why does a single project with incorrect config.xml prevent other projects from being scheduled. This seems very wrong to me.

            Show
            lzr gene lzr added a comment - I do have Job Config History installed but I already deleted the project I'm not sure if config history is kept after deletion. Let me ask this though. Why does a single project with incorrect config.xml prevent other projects from being scheduled. This seems very wrong to me.
            Hide
            tonyfinn Tony Finn added a comment -

            Observed this occur on 1.620 with a Build Flow job. We didn't restart but it did prevent SCM polling jobs from running. Don't have any more useful log messages because we didn't have the config history plugin and the messages were the same as in this thread.

            Show
            tonyfinn Tony Finn added a comment - Observed this occur on 1.620 with a Build Flow job. We didn't restart but it did prevent SCM polling jobs from running. Don't have any more useful log messages because we didn't have the config history plugin and the messages were the same as in this thread.
            Hide
            integer Kanstantsin Shautsou added a comment -

            Tony Finn what you describe sounds like other issue that already fixed.

            Chin Boon Oh without knowing what/when/who inserted null in triggers it impossible to reproduce.

            Show
            integer Kanstantsin Shautsou added a comment - Tony Finn what you describe sounds like other issue that already fixed. Chin Boon Oh without knowing what/when/who inserted null in triggers it impossible to reproduce.
            Hide
            lzr gene lzr added a comment -

            The issue happened again, this time the config history plugin is installed and it shows that the job haven't been modified since 2015. But the cron stopped running a couple of days ago (even though it should be running every minute).

            Show
            lzr gene lzr added a comment - The issue happened again, this time the config history plugin is installed and it shows that the job haven't been modified since 2015. But the cron stopped running a couple of days ago (even though it should be running every minute).
            Hide
            lzr gene lzr added a comment - - edited

            Nevermind. Was looking at the wrong job. Ran the script provided by Daniel Beck and it printed out the name of the right job that had a null trigger in config.xml.

            The configuration history plugin shows two changes yesterday, with 1 minute difference (see attachments).

            Untitled spreadsheet - Sheet1 (1).pdf Untitled spreadsheet - Sheet2.pdf

            The user says he was editing other jobs at that time but doesn't recall modifying this particular one. But even if he edited it by mistake, it's still not clear what caused Jenkins to save null triggers, as well as remove a bunch of other configuration options.

            Even if we can't reproduce this issue in full details, can you guys add a check for a null trigger? It's REALLY bad that one job with messed up configuration file causes the whole system to intermittently skip some scheduled jobs. The issue should be isolated to one job.

            Show
            lzr gene lzr added a comment - - edited Nevermind. Was looking at the wrong job. Ran the script provided by Daniel Beck and it printed out the name of the right job that had a null trigger in config.xml. The configuration history plugin shows two changes yesterday, with 1 minute difference (see attachments). Untitled spreadsheet - Sheet1 (1).pdf Untitled spreadsheet - Sheet2.pdf The user says he was editing other jobs at that time but doesn't recall modifying this particular one. But even if he edited it by mistake, it's still not clear what caused Jenkins to save null triggers, as well as remove a bunch of other configuration options. Even if we can't reproduce this issue in full details, can you guys add a check for a null trigger? It's REALLY bad that one job with messed up configuration file causes the whole system to intermittently skip some scheduled jobs. The issue should be isolated to one job.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              chinboon Chin Boon Oh
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: