ProcessKillingVeto.all() forces Jenkins class to be instantiated on remote agents

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      We have a plugin that is instantiating LocalProc from the agent JVM and is hitting a

      Caused by: java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins
          at hudson.util.ProcessKillingVeto.all(ProcessKillingVeto.java:77)
          at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:237)
          at hudson.util.ProcessTree$UnixProcess.kill(ProcessTree.java:566)
          at hudson.util.ProcessTree$UnixProcess.killRecursively(ProcessTree.java:592)
          at hudson.util.ProcessTree.killAll(ProcessTree.java:141)
          at hudson.Proc$LocalProc.destroy(Proc.java:379)
          at hudson.Proc$LocalProc.kill(Proc.java:371)
          ...
      

      error. The root cause of this issue is that the ProcessKillingVeto.all method forces the Jenkins class to be loaded... this is a bad thing as agents are not supposed to try and instantiate the Jenkins class (that some plugins can sometimes managed to succeed in instantiating the Jenkins class on a remote agent is neither here nor there... we should not be trying to instantiate it at all)

            Assignee:
            Stephen Connolly
            Reporter:
            Stephen Connolly
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: