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

Parameters: NPE in canTake() procedures may kill all executors

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Blocker
    • Resolution: Fixed
    • core
    • Jenkins ver. 1.466.1
      Linux buildserver 2.6.18-164.11.1.el5PAE #1 SMP Wed Jan 6 13:43:57 EST 2010 i686 i686 i386 GNU/Linux

    Description

      Jenkins executors are not robust against nulls returned by createValue() and createDefaultValue(). Such return value is valid according to Javadoc.

      NPE in canTake() procedure kills the executor thread. Unfortunately, Jenkins tries other executors after that => any NPE in canTake() terminates ALL active Jenkins executors.

      The initial description from Rotem:

      when using jenkins-multijob-plugin and parameter from type “File Parameter” the Jenkins crashes.
      When i start to run a Multijob with a multijob phase with values in "Advanced: "parameters", if the next job has a parameter from type “File Parameter” Jenkins is eating up all the executers with - ALL available Build executors are turning into zombies with the status 'Dead ' with the exception:

      java.lang.NullPointerException
      at hudson.model.ParametersAction.getAssignedLabel(ParametersAction.java:126)
      at hudson.model.Queue$Item.getAssignedLabel(Queue.java:1265)
      at hudson.model.Node.canTake(Node.java:308)
      at hudson.model.Queue$JobOffer.canTake(Queue.java:210)
      at hudson.model.Queue.maintain(Queue.java:952)
      at hudson.model.Queue.pop(Queue.java:783)
      at hudson.model.Executor.grabJob(Executor.java:287)
      at hudson.model.Executor.run(Executor.java:208)

      Even if at this stage I go to the settings and enlarge the number of Executors, they immediately turn into zombies as well.
      When I remove the specific “File Parameter” parameter all works fine.
      Please advice.

      Attachments

        Issue Links

          Activity

            rotem Rotem G created issue -
            rotem Rotem G made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-15036 [ JENKINS-15036 ]
            hagzag hagzag made changes -
            Assignee itai Or [ itaior ]
            itai itai Or made changes -
            Fix Version/s current [ 10162 ]
            Resolution Cannot Reproduce [ 5 ]
            Status Open [ 1 ] Resolved [ 5 ]
            oleg_nenashev Oleg Nenashev made changes -
            Assignee itai Or [ itaior ] Oleg Nenashev [ oleg_nenashev ]
            Resolution Cannot Reproduce [ 5 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            oleg_nenashev Oleg Nenashev made changes -
            Component/s core [ 15593 ]
            Component/s jenkins-multijob-plugin [ 16545 ]
            Priority Major [ 3 ] Blocker [ 1 ]
            Summary  Multijob with use of parameter from type “File Parameter” all Executors are becoming Dead (!)  Massive jobs with “File Parameters” may kill all executors by NPE in canTake() procedures
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is related to JENKINS-22925 [ JENKINS-22925 ]
            oleg_nenashev Oleg Nenashev made changes -
            Component/s parameters [ 15594 ]
            Description when using jenkins-multijob-plugin and parameter from type “File Parameter” the Jenkins crashes.
            When i start to run a Multijob with a multijob phase with values in "Advanced: "parameters", if the next job has a parameter from type “File Parameter” Jenkins is eating up all the executers with - ALL available Build executors are turning into zombies with the status 'Dead ' with the exception:

            java.lang.NullPointerException
            at hudson.model.ParametersAction.getAssignedLabel(ParametersAction.java:126)
            at hudson.model.Queue$Item.getAssignedLabel(Queue.java:1265)
            at hudson.model.Node.canTake(Node.java:308)
            at hudson.model.Queue$JobOffer.canTake(Queue.java:210)
            at hudson.model.Queue.maintain(Queue.java:952)
            at hudson.model.Queue.pop(Queue.java:783)
            at hudson.model.Executor.grabJob(Executor.java:287)
            at hudson.model.Executor.run(Executor.java:208)

            Even if at this stage I go to the settings and enlarge the number of Executors, they immediately turn into zombies as well.
            When I remove the specific “File Parameter” parameter all works fine.
            Please advice.

            Jenkins executors are not robust against nulls returned by createValue() and createDefaultValue(). Such return value is valid according to Javadoc.

            NPE in canTake() procedure kills the executor thread. Unfortunately, Jenkins tries other executors after that => any NPE in canTake() terminates ALL active Jenkins executors.

            The initial description from Rotem:
            {quote}
            when using jenkins-multijob-plugin and parameter from type “File Parameter” the Jenkins crashes.
            When i start to run a Multijob with a multijob phase with values in "Advanced: "parameters", if the next job has a parameter from type “File Parameter” Jenkins is eating up all the executers with - ALL available Build executors are turning into zombies with the status 'Dead ' with the exception:

            java.lang.NullPointerException
            at hudson.model.ParametersAction.getAssignedLabel(ParametersAction.java:126)
            at hudson.model.Queue$Item.getAssignedLabel(Queue.java:1265)
            at hudson.model.Node.canTake(Node.java:308)
            at hudson.model.Queue$JobOffer.canTake(Queue.java:210)
            at hudson.model.Queue.maintain(Queue.java:952)
            at hudson.model.Queue.pop(Queue.java:783)
            at hudson.model.Executor.grabJob(Executor.java:287)
            at hudson.model.Executor.run(Executor.java:208)

            Even if at this stage I go to the settings and enlarge the number of Executors, they immediately turn into zombies as well.
            When I remove the specific “File Parameter” parameter all works fine.
            Please advice.
            {quote}

            Summary  Massive jobs with “File Parameters” may kill all executors by NPE in canTake() procedures Parameters: NPE in canTake() procedures may kill all executors
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels lts-candidate
            olivergondza Oliver Gondža made changes -
            Labels lts-candidate 1.565.1-fixed
            ircbot Jenkins IRC Bot made changes -
            Component/s parameters [ 15594 ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is related to JENKINS-11541 [ JENKINS-11541 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 145814 ] JNJira + In-Review [ 191640 ]

            People

              oleg_nenashev Oleg Nenashev
              rotem Rotem G
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: