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

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

    • 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)

          [JENKINS-38534] ProcessKillingVeto.all() forces Jenkins class to be instantiated on remote agents

          Stephen Connolly created issue -
          Stephen Connolly made changes -
          Labels New: lts-candidate
          Stephen Connolly made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Stephen Connolly made changes -
          Remote Link New: This issue links to "jenkins#2569 (Web Link)" [ 14878 ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Oleg Nenashev made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          Oliver Gondža made changes -
          Labels Original: lts-candidate New: 2.19.2-fixed
          Stephen Connolly made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: