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

Matrix Jobs Do Not Get Run When Updating a Dynamic Axis

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • matrix-project-plugin
    • None
    • Windows

      I have a top level job X. In X, I am using kicking off job Y using the File Parameter Factory option in parameterized builds. The configuration files contain a property, axis_values, which is a space separated list of different axis's for job Y.

      Let's say that job X has one configuration file and it contains axis_values=A B C. I kick off job X, which in turn kicks one instance of job Y. Job Y iterates correctly through A, B and C.

      Next, I change the configuration file and I set axis_values=A B C D E. I kick off job X and job Y starts. Job Y runs correctly for A, B and C. But, job Y fails to run D and E. It says that "D appears to be cancelled" and "E appears to be cancelled".

      I see the following in the log:

      31-May-2013 3:57:48 PM hudson.model.Executor run
      SEVERE: Executor threw an exception
      java.lang.NullPointerException
      at hudson.model.Executor.run(Executor.java:238)

      The only workaround that I have found is that it will work correctly if I put the new values at the start of the axis. (ie. axis_values=D E A B C)

      List of (possibly) relevant plugins installed;

      • dynamic axis
      • environment injector
      • jenkins parameterized trigger
      • matrix sorter
      • node and label parameter plugin

          [JENKINS-18164] Matrix Jobs Do Not Get Run When Updating a Dynamic Axis

          The only way I could make the problem go away was to add another row to my matrix instead of having just one row. I tried adding extra parameters but it didn't work. Seems it doesn't like single row matrices.

          Greg MacDonald added a comment - The only way I could make the problem go away was to add another row to my matrix instead of having just one row. I tried adding extra parameters but it didn't work. Seems it doesn't like single row matrices.

          tim johnston added a comment -

          The problem still exists in 1.520, although the line of the exception has changed:

          27-Jun-2013 10:43:45 AM hudson.model.Executor run
          SEVERE: Executor threw an exception
          java.lang.NullPointerException
          at hudson.model.Executor.run(Executor.java:244)

          tim johnston added a comment - The problem still exists in 1.520, although the line of the exception has changed: 27-Jun-2013 10:43:45 AM hudson.model.Executor run SEVERE: Executor threw an exception java.lang.NullPointerException at hudson.model.Executor.run(Executor.java:244)

          tim johnston added a comment -

          Some more log output. It seems like the workUnit is fine, because the two pieces of axis data displayed in hudson.model.queue.WorkUnit@e617 is correct. For some reason, it appears that task.createExecutable() is returning null.

          FINE: Executor #0 for QMWFCRP1 completed null in 0ms

          Jul 23, 2013 6:31:04 PM hudson.model.Executor run
          SEVERE: Executor threw an exception
          java.lang.NullPointerException
          at hudson.model.Executor.run(Executor.java:234)

          Jul 23, 2013 6:31:04 PM hudson.model.Executor
          FINE: Executor #0 for QMWFCRP1 is going to execute null

          Jul 23, 2013 6:31:04 PM hudson.model.Executor
          FINE: Executor #0 for QMWFCRP1 grabbed hudson.model.queue.WorkUnit@e617[work=RunJTF » WFS_Hours_Common_SCTAndCT,All.WFS.MSS.07.00.01.parfixes] from queue

          tim johnston added a comment - Some more log output. It seems like the workUnit is fine, because the two pieces of axis data displayed in hudson.model.queue.WorkUnit@e617 is correct. For some reason, it appears that task.createExecutable() is returning null. FINE: Executor #0 for QMWFCRP1 completed null in 0ms Jul 23, 2013 6:31:04 PM hudson.model.Executor run SEVERE: Executor threw an exception java.lang.NullPointerException at hudson.model.Executor.run(Executor.java:234) Jul 23, 2013 6:31:04 PM hudson.model.Executor FINE: Executor #0 for QMWFCRP1 is going to execute null Jul 23, 2013 6:31:04 PM hudson.model.Executor FINE: Executor #0 for QMWFCRP1 grabbed hudson.model.queue.WorkUnit@e617 [work=RunJTF » WFS_Hours_Common_SCTAndCT,All.WFS.MSS.07.00.01.parfixes] from queue

          Brian Murrell added a comment -

          Ah ha! I think this is what I am running into also. I posted about it on the mailing list.

          I am running 1.534 (previously 1.530 which also exhibited the same behaviour). My matrix consists of 2 axis and results in a matrix of 1x2. It might seem silly that we have an axis of 1 item but it's there for both historical reasons (to maintain our current URLs with the same matrix format as they had historically when the first axis had more than 1 item) and future possibilities on that axis.

          I did try adding a second item to the first axis to make it a 2x2 matrix but that didn't seem to resolve the issue. I have yet to find a workaround that does in my situation.

          Brian Murrell added a comment - Ah ha! I think this is what I am running into also. I posted about it on the mailing list. I am running 1.534 (previously 1.530 which also exhibited the same behaviour). My matrix consists of 2 axis and results in a matrix of 1x2. It might seem silly that we have an axis of 1 item but it's there for both historical reasons (to maintain our current URLs with the same matrix format as they had historically when the first axis had more than 1 item) and future possibilities on that axis. I did try adding a second item to the first axis to make it a 2x2 matrix but that didn't seem to resolve the issue. I have yet to find a workaround that does in my situation.

          Brian Murrell added a comment -

          Just tried this on the latest LTS 1.509.3 and it has the same problem, sadly.

          Brian Murrell added a comment - Just tried this on the latest LTS 1.509.3 and it has the same problem, sadly.

          We've encountered similar problem after Jenkins crash.
          We're using multi-dimension matrix jobs, and one of our matrix configurations stopped working.
          I've found that affected job's matrix configuration persisting in <JENKINS HOME>/jobs/<Matrix JOB>/configurations/axis-<A>/<Value A>/axis-<B>/<Value B>/config.xml "disabled" element value left with value true.
          <disabled>true</disabled>
          After changing it's value to false, and reloading Jenkins configuration (Reload Configuration from Disk or restart Jenkins) my matrix job has started working.

          Lev Tartakovsky added a comment - We've encountered similar problem after Jenkins crash. We're using multi-dimension matrix jobs, and one of our matrix configurations stopped working. I've found that affected job's matrix configuration persisting in <JENKINS HOME>/jobs/<Matrix JOB>/configurations/axis-<A>/<Value A>/axis-<B>/<Value B>/config.xml "disabled" element value left with value true. <disabled>true</disabled> After changing it's value to false, and reloading Jenkins configuration (Reload Configuration from Disk or restart Jenkins) my matrix job has started working.

          Oleg Nenashev added a comment -

          Created a separate issue for the core's behavior (JENKINS-24110)

          Oleg Nenashev added a comment - Created a separate issue for the core's behavior ( JENKINS-24110 )

          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>

          Oleg Nenashev added a comment -

          The issue in the core has been released in jenkins-1.577
          A PR for JENKINS-19179 (https://github.com/jenkinsci/matrix-project-plugin/pull/5) should resolve this issue as well.

          Oleg Nenashev added a comment - The issue in the core has been released in jenkins-1.577 A PR for JENKINS-19179 ( https://github.com/jenkinsci/matrix-project-plugin/pull/5 ) should resolve this issue as well.

          Oleg Nenashev added a comment -

          Please re-open the issue if you see the similar behavior in matrix-project-1.4+

          Oleg Nenashev added a comment - Please re-open the issue if you see the similar behavior in matrix-project-1.4+

            oleg_nenashev Oleg Nenashev
            timjohnston tim johnston
            Votes:
            11 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: