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

Label expression kills slave executors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • matrixtieparent-plugin
    • None
    • Jenkins 1.454
      matrixtieparent 1.1

      We noticed problems with using label expression as "Node". In our case we used value "build&&machine (group of machine_1,...)". Once the build started, Jenkins started to loose the slave executors. They failed with:

      SEVERE: Timer task hudson.model.Queue$MaintainTask@15db104e failed
      java.lang.ClassCastException: hudson.model.labels.LabelExpression$And cannot be cast to hudson.model.labels.LabelAtom
      	at jenkins.model.Jenkins.getLabelAtom(Jenkins.java:1571)
      	at hudson.model.labels.LabelAtom.get(LabelAtom.java:224)
      	at hudson.model.labels.LabelExpressionParser.term6(LabelExpressionParser.java:208)
      	at hudson.model.labels.LabelExpressionParser.term5(LabelExpressionParser.java:164)
      	at hudson.model.labels.LabelExpressionParser.term4(LabelExpressionParser.java:136)
      	at hudson.model.labels.LabelExpressionParser.term3(LabelExpressionParser.java:113)
      	at hudson.model.labels.LabelExpressionParser.term2(LabelExpressionParser.java:83)
      	at hudson.model.labels.LabelExpressionParser.term1(LabelExpressionParser.java:60)
      	at hudson.model.labels.LabelExpressionParser.expr(LabelExpressionParser.java:50)
      	at hudson.model.Label.parseExpression(Label.java:509)
      	at jenkins.model.Jenkins.getLabel(Jenkins.java:1553)
      	at hudson.model.AbstractProject.getAssignedLabel(AbstractProject.java:356)
      	at hudson.model.queue.MappingWorksheet$WorkChunk.getAssignedLabel(MappingWorksheet.java:202)
      	at hudson.model.queue.MappingWorksheet$WorkChunk.<init>(MappingWorksheet.java:185)
      	at hudson.model.queue.MappingWorksheet$WorkChunk.<init>(MappingWorksheet.java:157)
      	at hudson.model.queue.MappingWorksheet.<init>(MappingWorksheet.java:375)
      	at hudson.model.queue.MappingWorksheet.<init>(MappingWorksheet.java:303)
      	at hudson.model.Queue.maintain(Queue.java:1033)
      	at hudson.model.Queue$MaintainTask.doRun(Queue.java:1759)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
      Mar 26, 2013 1:12:52 PM hudson.triggers.SafeTimerTask run
      

      I checked that running the following groovy script from console fails to our matrix project with the "matrix tie parent" plugin config above:

      import jenkins.model.*;
      
      for(item in Jenkins.instance.items) {
        println("JOB: '" + item.name + "'");
        if (item.getAssignedLabel() != null) {
          println("LABEL: '" + item.getAssignedLabel() + "'");
        }
      }
      

      The outcome is that all executors die (https://wiki.jenkins-ci.org/display/JENKINS/Dead+Executor) and we cannot restart those threads through the UI. Only after I changed the "Node" to "master" I was able to restart the executors. So this really kills the whole Jenkins instance.

            kbertelson kbertelson
            miktap Mikko Tapaninen
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: