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

Blacklist certain classes from loading in slaves

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            bitwiseman Liam Newman added a comment - - edited

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

            bitwiseman 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

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

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

            bitwiseman 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

            stephenconnolly 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
            bitwiseman Liam Newman added a comment -

            Cool, thanks for the clarification.

            bitwiseman Liam Newman added a comment - Cool, thanks for the clarification.
            danielbeck Daniel Beck added a comment -

            Could we use the regular remoting blacklist for this?

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

            No, this is unrelated.

            jglick Jesse Glick added a comment - No, this is unrelated.
            jglick 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.

            jglick 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.

            People

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

              Dates

                Created:
                Updated: