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

[JDK9] Illegal reflective access from remoting

    Details

    • Similar Issues:

      Description

      While exploring Jenkins 2.60.3 on Oracle Java 9 build 181 (pre-release), it reports illegal access exceptions and warns that a future release of Java 9 will forbid illegal access.

      A stack trace shows:

      WARNING: Illegal reflective access by hudson.remoting.RemoteClassLoader (file:/var/jenkins_home/war/WEB-INF/lib/remoting-3.7.jar) to method java.lang.ClassLoader.getClassLoadingLock(java.lang.String)
              at hudson.remoting.RemoteClassLoader.<clinit>(RemoteClassLoader.java:330)
              at hudson.remoting.MultiClassLoaderSerializer$Output.annotateClass(MultiClassLoaderSerializer.java:69)
              at java.base/java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1291)
              at java.base/java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1232)
              at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1428)
              at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
              at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
              at hudson.remoting.UserRequest._serialize(UserRequest.java:190)
              at hudson.remoting.UserRequest.serialize(UserRequest.java:199)
              at hudson.remoting.UserRequest.<init>(UserRequest.java:64)
              at hudson.remoting.Channel.call(Channel.java:828)
              at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:517)
              at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:390)
              at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:1074)
              at hudson.plugins.sshslaves.SSHLauncher.access$500(SSHLauncher.java:145)
              at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:818)
              at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
              at java.base/java.lang.Thread.run(Thread.java:844)
      

      If it helps you to duplicate the scenario with current Jenkins environment, I have a Dockerfile configured which will run the latest Jenkins Long Term Support release.

      To duplicate the problem:

      1. Clone, build, and run the docker instance
          $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-46724
          $ cd JENKINS-46724
          $ git lfs fetch origin origin/lts-jdk9-with-plugins
          $ git checkout -b lts-jdk9-with-plugins -t origin/lts-jdk9-with-plugins
          $ docker build -t  lts-jdk9-with-plugins:latest .
          $ docker run -i --rm --publish 8080:8080 lts-jdk9-with-plugins:latest
        

        Attachments

          Activity

          markewaite Mark Waite created issue -
          markewaite Mark Waite made changes -
          Field Original Value New Value
          Epic Link JENKINS-40689 [ 177392 ]
          markewaite Mark Waite made changes -
          Description While exploring Jenkins 2.60.3 on Oracle Java 9 build 181 (pre-release), it reports illegal access exceptions and warns that a future release of Java 9 will forbid illegal access.

          A partial stack trace shows:

          {noformat}
          WARNING: Illegal reflective access by org.kohsuke.stapler.lang.FieldRef (file:/var/jenkins_home/war/WEB-INF/lib/stapler-1.250.jar) to field java.lang.Throwable.serialVersionUID
                  at org.kohsuke.stapler.lang.FieldRef.wrap(FieldRef.java:39)
                  at org.kohsuke.stapler.lang.KlassNavigator$1$2.get(KlassNavigator.java:202)
                  at org.kohsuke.stapler.lang.KlassNavigator$1$2.get(KlassNavigator.java:199)
                  at java.base/java.util.AbstractList$Itr.next(AbstractList.java:371)
                  at org.kohsuke.stapler.lang.Klass.getFields(Klass.java:79)
                  at org.kohsuke.stapler.KlassDescriptor.<init>(KlassDescriptor.java:26)
                  at org.kohsuke.stapler.MetaClass.buildDispatchers(MetaClass.java:105)
                  at org.kohsuke.stapler.MetaClass.<init>(MetaClass.java:93)
                  at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:204)
                  at org.kohsuke.stapler.MetaClass.<init>(MetaClass.java:91)
                  at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:204)
                  at org.kohsuke.stapler.MetaClass.<init>(MetaClass.java:91)
                  at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:204)
                  at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:196)
                  at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:109)
                  at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                  at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
                  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                  at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
                  at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
                  at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
                  at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
                  at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                  at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
                  at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
                  at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                  at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
                  at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                  at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
                  at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
                  at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                  at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
          {noformat}

          {noformat}
          WARNING: Illegal reflective access by org.kohsuke.stapler.lang.FieldRef (file:/var/jenkins_home/war/WEB-INF/lib/stapler-1.250.jar) to field java.lang.Throwable.backtrace
                  at org.kohsuke.stapler.lang.FieldRef.wrap(FieldRef.java:39)
                  at org.kohsuke.stapler.lang.KlassNavigator$1$2.get(KlassNavigator.java:202)
                  at org.kohsuke.stapler.lang.KlassNavigator$1$2.get(KlassNavigator.java:199)
                  at java.base/java.util.AbstractList$Itr.next(AbstractList.java:371)
                  at org.kohsuke.stapler.lang.Klass.getFields(Klass.java:79)
                  at org.kohsuke.stapler.KlassDescriptor.<init>(KlassDescriptor.java:26)
                  at org.kohsuke.stapler.MetaClass.buildDispatchers(MetaClass.java:105)
                  at org.kohsuke.stapler.MetaClass.<init>(MetaClass.java:93)
                  at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:204)
                  at org.kohsuke.stapler.MetaClass.<init>(MetaClass.java:91)
                  at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:204)
                  at org.kohsuke.stapler.MetaClass.<init>(MetaClass.java:91)
                  at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:204)
                  at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:196)
                  at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:109)
                  at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
          {noformat}
          While exploring Jenkins 2.60.3 on Oracle Java 9 build 181 (pre-release), it reports illegal access exceptions and warns that a future release of Java 9 will forbid illegal access.

          A stack trace shows:

          {noformat}
          WARNING: Illegal reflective access by hudson.remoting.RemoteClassLoader (file:/var/jenkins_home/war/WEB-INF/lib/remoting-3.7.jar) to method java.lang.ClassLoader.getClassLoadingLock(java.lang.String)
                  at hudson.remoting.RemoteClassLoader.<clinit>(RemoteClassLoader.java:330)
                  at hudson.remoting.MultiClassLoaderSerializer$Output.annotateClass(MultiClassLoaderSerializer.java:69)
                  at java.base/java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1291)
                  at java.base/java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1232)
                  at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1428)
                  at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
                  at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
                  at hudson.remoting.UserRequest._serialize(UserRequest.java:190)
                  at hudson.remoting.UserRequest.serialize(UserRequest.java:199)
                  at hudson.remoting.UserRequest.<init>(UserRequest.java:64)
                  at hudson.remoting.Channel.call(Channel.java:828)
                  at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:517)
                  at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:390)
                  at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:1074)
                  at hudson.plugins.sshslaves.SSHLauncher.access$500(SSHLauncher.java:145)
                  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:818)
                  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
                  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
                  at java.base/java.lang.Thread.run(Thread.java:844)
          {noformat}
          markewaite Mark Waite made changes -
          Summary JDK9] Illegal reflective access from remoting [JDK9] Illegal reflective access from remoting
          oleg_nenashev Oleg Nenashev made changes -
          Component/s remoting [ 15489 ]
          oleg_nenashev Oleg Nenashev made changes -
          Labels newbie-friendly
          tonho Elton Alves made changes -
          Assignee Elton Alves [ tonho ]
          tonho Elton Alves made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          markewaite Mark Waite made changes -
          Description While exploring Jenkins 2.60.3 on Oracle Java 9 build 181 (pre-release), it reports illegal access exceptions and warns that a future release of Java 9 will forbid illegal access.

          A stack trace shows:

          {noformat}
          WARNING: Illegal reflective access by hudson.remoting.RemoteClassLoader (file:/var/jenkins_home/war/WEB-INF/lib/remoting-3.7.jar) to method java.lang.ClassLoader.getClassLoadingLock(java.lang.String)
                  at hudson.remoting.RemoteClassLoader.<clinit>(RemoteClassLoader.java:330)
                  at hudson.remoting.MultiClassLoaderSerializer$Output.annotateClass(MultiClassLoaderSerializer.java:69)
                  at java.base/java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1291)
                  at java.base/java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1232)
                  at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1428)
                  at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
                  at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
                  at hudson.remoting.UserRequest._serialize(UserRequest.java:190)
                  at hudson.remoting.UserRequest.serialize(UserRequest.java:199)
                  at hudson.remoting.UserRequest.<init>(UserRequest.java:64)
                  at hudson.remoting.Channel.call(Channel.java:828)
                  at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:517)
                  at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:390)
                  at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:1074)
                  at hudson.plugins.sshslaves.SSHLauncher.access$500(SSHLauncher.java:145)
                  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:818)
                  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
                  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
                  at java.base/java.lang.Thread.run(Thread.java:844)
          {noformat}
          While exploring Jenkins 2.60.3 on Oracle Java 9 build 181 (pre-release), it reports illegal access exceptions and warns that a future release of Java 9 will forbid illegal access.

          A stack trace shows:

          {noformat}
          WARNING: Illegal reflective access by hudson.remoting.RemoteClassLoader (file:/var/jenkins_home/war/WEB-INF/lib/remoting-3.7.jar) to method java.lang.ClassLoader.getClassLoadingLock(java.lang.String)
                  at hudson.remoting.RemoteClassLoader.<clinit>(RemoteClassLoader.java:330)
                  at hudson.remoting.MultiClassLoaderSerializer$Output.annotateClass(MultiClassLoaderSerializer.java:69)
                  at java.base/java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1291)
                  at java.base/java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1232)
                  at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1428)
                  at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
                  at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
                  at hudson.remoting.UserRequest._serialize(UserRequest.java:190)
                  at hudson.remoting.UserRequest.serialize(UserRequest.java:199)
                  at hudson.remoting.UserRequest.<init>(UserRequest.java:64)
                  at hudson.remoting.Channel.call(Channel.java:828)
                  at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:517)
                  at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:390)
                  at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:1074)
                  at hudson.plugins.sshslaves.SSHLauncher.access$500(SSHLauncher.java:145)
                  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:818)
                  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
                  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
                  at java.base/java.lang.Thread.run(Thread.java:844)
          {noformat}

          If it helps you to duplicate the scenario with current Jenkins environment, I have a Dockerfile configured which will run the latest Jenkins Long Term Support release.

          To duplicate the problem:

          # Clone, build, and run the docker instance
          {code}
            $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-46724
            $ cd JENKINS-46724
            $ git lfs fetch origin origin/lts-jdk9-with-plugins
            $ git checkout -b lts-jdk9-with-plugins -t origin/lts-jdk9-with-plugins
            $ docker build -t lts-jdk9-with-plugins:latest .
            $ docker run -i --rm --publish 8080:8080 lts-jdk9-with-plugins:latest
          {code}
          tonho Elton Alves made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          tonho Elton Alves made changes -
          Assignee Elton Alves [ tonho ]
          oleg_nenashev Oleg Nenashev made changes -
          Assignee Oleg Nenashev [ oleg_nenashev ]
          oleg_nenashev Oleg Nenashev made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          oleg_nenashev Oleg Nenashev made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          oleg_nenashev Oleg Nenashev made changes -
          Remote Link This issue links to "https://github.com/jenkinsci/remoting/pull/223 (Web Link)" [ 18026 ]
          oleg_nenashev Oleg Nenashev made changes -
          Remote Link This issue links to "https://github.com/jenkinsci/remoting/pull/224 (Web Link)" [ 18027 ]
          oleg_nenashev Oleg Nenashev made changes -
          Status In Review [ 10005 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          batmat Baptiste Mathus made changes -
          Labels newbie-friendly illegalReflectiveAccess newbie-friendly

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              markewaite Mark Waite
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: