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

NPE in hudson.model.Executor when a task creates null Executable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • jenkins-1.509.4...1.574

      The code in Executor does not check created tasks for null => NPE appears in logging procedures when calling executable.toString() in Executor::run(). This behavior causes hardly analyzable issues like JENKINS-18164

      The issue sometimes appears for MatrixConfiguration runs, but according to the code it can be also reproduced in 1.574

      Console output for runs:

         Jul 31, 2014 3:04:19 PM hudson.model.Executor run
         SEVERE: Executor threw an exception
         java.lang.NullPointerException
                 at hudson.model.Executor.run(Executor.java:234)
      

          [JENKINS-24110] NPE in hudson.model.Executor when a task creates null Executable

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - https://github.com/jenkinsci/jenkins/pull/1352

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/model/AbstractProject.java
          core/src/main/java/hudson/model/Executor.java
          core/src/main/java/hudson/model/Queue.java
          core/src/main/java/hudson/model/ResourceController.java
          core/src/main/java/hudson/model/queue/QueueTaskFilter.java
          core/src/main/java/hudson/model/queue/SubTask.java
          core/src/main/java/hudson/model/queue/WorkUnit.java
          http://jenkins-ci.org/commit/jenkins/128344dda3a3396e252e9e00272093f233c0b9c9
          Log:
          [FIXED JENKINS-24110] - Explicitly handle null Executables in hudson.model.Executor

          This change improves the handling of errors in hudson.model.Executor, which cause issues like JENKINS-18164.
          The change also introduces several annotations in order to prevent further issues.

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Executor.java core/src/main/java/hudson/model/Queue.java core/src/main/java/hudson/model/ResourceController.java core/src/main/java/hudson/model/queue/QueueTaskFilter.java core/src/main/java/hudson/model/queue/SubTask.java core/src/main/java/hudson/model/queue/WorkUnit.java http://jenkins-ci.org/commit/jenkins/128344dda3a3396e252e9e00272093f233c0b9c9 Log: [FIXED JENKINS-24110] - Explicitly handle null Executables in hudson.model.Executor This change improves the handling of errors in hudson.model.Executor, which cause issues like JENKINS-18164 . The change also introduces several annotations in order to prevent further issues. Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/AbstractProject.java
          core/src/main/java/hudson/model/Executor.java
          core/src/main/java/hudson/model/Queue.java
          core/src/main/java/hudson/model/ResourceController.java
          core/src/main/java/hudson/model/queue/QueueTaskFilter.java
          core/src/main/java/hudson/model/queue/SubTask.java
          core/src/main/java/hudson/model/queue/WorkUnit.java
          http://jenkins-ci.org/commit/jenkins/7156e4470f05a9c41015be78d827dd1be0c02fca
          Log:
          Merge branch 'JENKINS-24110' of github.com:synopsys-arc-oss/jenkins

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Executor.java core/src/main/java/hudson/model/Queue.java core/src/main/java/hudson/model/ResourceController.java core/src/main/java/hudson/model/queue/QueueTaskFilter.java core/src/main/java/hudson/model/queue/SubTask.java core/src/main/java/hudson/model/queue/WorkUnit.java http://jenkins-ci.org/commit/jenkins/7156e4470f05a9c41015be78d827dd1be0c02fca Log: Merge branch ' JENKINS-24110 ' of github.com:synopsys-arc-oss/jenkins

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html http://jenkins-ci.org/commit/jenkins/cbae95d60785722a8b35dd3158a911acb9b5d5ad Log: JENKINS-24110 Noting merge of #1352. Compare: https://github.com/jenkinsci/jenkins/compare/cd33cdd8b732...cbae95d60785

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3626
          [FIXED JENKINS-24110] - Explicitly handle null Executables in hudson.model.Executor (Revision 128344dda3a3396e252e9e00272093f233c0b9c9)
          JENKINS-24110 Noting merge of #1352. (Revision cbae95d60785722a8b35dd3158a911acb9b5d5ad)

          Result = UNSTABLE
          o.v.nenashev : 128344dda3a3396e252e9e00272093f233c0b9c9
          Files :

          • core/src/main/java/hudson/model/Queue.java
          • core/src/main/java/hudson/model/queue/QueueTaskFilter.java
          • core/src/main/java/hudson/model/ResourceController.java
          • core/src/main/java/hudson/model/queue/SubTask.java
          • core/src/main/java/hudson/model/queue/WorkUnit.java
          • core/src/main/java/hudson/model/AbstractProject.java
          • core/src/main/java/hudson/model/Executor.java

          Jesse Glick : cbae95d60785722a8b35dd3158a911acb9b5d5ad
          Files :

          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #3626 [FIXED JENKINS-24110] - Explicitly handle null Executables in hudson.model.Executor (Revision 128344dda3a3396e252e9e00272093f233c0b9c9) JENKINS-24110 Noting merge of #1352. (Revision cbae95d60785722a8b35dd3158a911acb9b5d5ad) Result = UNSTABLE o.v.nenashev : 128344dda3a3396e252e9e00272093f233c0b9c9 Files : core/src/main/java/hudson/model/Queue.java core/src/main/java/hudson/model/queue/QueueTaskFilter.java core/src/main/java/hudson/model/ResourceController.java core/src/main/java/hudson/model/queue/SubTask.java core/src/main/java/hudson/model/queue/WorkUnit.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Executor.java Jesse Glick : cbae95d60785722a8b35dd3158a911acb9b5d5ad Files : changelog.html

          Oleg Nenashev added a comment -

          Fixed in jenkins-1.577. I've marked the issue as lts-candidate

          Oleg Nenashev added a comment - Fixed in jenkins-1.577. I've marked the issue as lts-candidate

          Daniel Beck added a comment -

          next LTS will be based on 1.580, and the 1.565.x line is done.

          Daniel Beck added a comment - next LTS will be based on 1.580, and the 1.565.x line is done.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/Executor.java
          http://jenkins-ci.org/commit/jenkins/8c7d06c72a64533482c45108abb600f8e462c710
          Log:
          Amend JENKINS-24110 fix to more politely specify what was not being run.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/Executor.java http://jenkins-ci.org/commit/jenkins/8c7d06c72a64533482c45108abb600f8e462c710 Log: Amend JENKINS-24110 fix to more politely specify what was not being run.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/model/Executor.java
          http://jenkins-ci.org/commit/jenkins/d5d6eb037b51a69f86cbf105fd3b78178ad83611
          Log:
          Merge pull request #2963 from jglick/Executor-warning

          Amend JENKINS-24110 fix to more politely specify what was not being run

          Compare: https://github.com/jenkinsci/jenkins/compare/1c8ed8e672fe...d5d6eb037b51

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/model/Executor.java http://jenkins-ci.org/commit/jenkins/d5d6eb037b51a69f86cbf105fd3b78178ad83611 Log: Merge pull request #2963 from jglick/Executor-warning Amend JENKINS-24110 fix to more politely specify what was not being run Compare: https://github.com/jenkinsci/jenkins/compare/1c8ed8e672fe...d5d6eb037b51

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: