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

Blacklist certain classes from loading in slaves

      Classes from servlet container (such as HttpServletRequest) are not guaranteed to be remotable. For example, it could be because the container classloader hides the class file from RemoteClassLoader. Or it could be that the servlet container uses a newer versions of JDK than the slave JVM.

      Therefore, instead of letting these classes transferred to slave JVM, we should come up with a blacklist that causes the master to immediately refuse to send the class file image.

      That way, the tests we run can catch the problem, instead of leaving it up to a small number of unlucky users to discover them.

      This is expected to improve the "I got NoClassDefFoundError: class Xyz failed to load but I don't know why it failed to load" problem, which is hard to diagnose because the exception is missing the root cause.

          [JENKINS-26677] Blacklist certain classes from loading in slaves

          Liam Newman added a comment - - edited

          stephenconnolly
          So, is this in progress now? Should it be assigned to you?

          Liam Newman added a comment - - edited stephenconnolly So, is this in progress now? Should it be assigned to you?

          Not in progress yet. Unassigned because anyone should be able to pick it up

          Stephen Connolly added a comment - Not in progress yet. Unassigned because anyone should be able to pick it up

          Liam Newman added a comment -

          How does this differ from JENKINS-38370, JENKINS-38371, etc?

          Liam Newman added a comment - How does this differ from JENKINS-38370 , JENKINS-38371 , etc?

          JENKINS-38371 is a dupe of this but we probably need to re-title JENKINS-38371 as we changed from using an annotation

          Stephen Connolly added a comment - JENKINS-38371 is a dupe of this but we probably need to re-title JENKINS-38371 as we changed from using an annotation

          Liam Newman added a comment -

          Cool, thanks for the clarification.

          Liam Newman added a comment - Cool, thanks for the clarification.

          Daniel Beck added a comment -

          Could we use the regular remoting blacklist for this?

          Daniel Beck added a comment - Could we use the regular remoting blacklist for this?

          Jesse Glick added a comment -

          No, this is unrelated.

          Jesse Glick added a comment - No, this is unrelated.

          Jesse Glick added a comment -

          The latest problem I see is an inability to archive artifacts from a Dockerized agent from hpi:run:

          java.lang.NoClassDefFoundError: javax/servlet/ServletException
          	at hudson.util.io.TarArchiver.visit(TarArchiver.java:86)
          

          This seems to be due to the call from TarArchiver to Functions.isWindows; Functions is not safe to load remotely.

          Jesse Glick added a comment - The latest problem I see is an inability to archive artifacts from a Dockerized agent from hpi:run : java.lang.NoClassDefFoundError: javax/servlet/ServletException at hudson.util.io.TarArchiver.visit(TarArchiver.java:86) This seems to be due to the call from TarArchiver to Functions.isWindows ; Functions is not safe to load remotely.

            Unassigned Unassigned
            kohsuke Kohsuke Kawaguchi
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: