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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      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)

            stephenconnolly Stephen Connolly
            stephenconnolly Stephen Connolly
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: