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

Illegal reflective access by RemoteClassLoader to ClassLoader#getClassLoadingLock

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • core
    • JDK 9, Jenkins 2.60.3 as described in my lts-with-plugins docker instance
    • 3.15

    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.

      This was from a Windows agent using JDK 9 that was started from a batch file. The batch file included the line java -jar slave.jar -jnlpUrl http://jenkins.markwaite.net:8080/computer/cb-pc/slave-agent.jnlp -secret my-elided-secret. The same message does not appear when the Windows agent is running JDK 8, whether the master is running JDK 8 or JDK 9.

      Stack trace shows:

      INFO: Remote identity confirmed: 23:d0:c4:ac:00:ef:27:66:df:6c:b7:dd:ba:05:6f:6e
      Sep 04, 2017 6:59:21 AM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connected
      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by hudson.remoting.RemoteClassLoader (file:/C:/J/slave.jar) to method java.lang.ClassLoader.getClassLoadingLock(java.lang.String)
      WARNING: Please consider reporting this to the maintainers of hudson.remoting.RemoteClassLoader
      WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      WARNING: All illegal access operations will be denied in a future release
      

      Attachments

        Issue Links

          Activity

            remik P4 added a comment -

            Hi. This issue still occurs in our environment.

            Any plans for fixation?

             

            Jenkins master: Windows Server 2012 R2; JDK 1.8.0_172-b11; Jenkins v2.176.2.

            Jenkins slave: Ubuntu 19.04 LTS; openjdk-11-jdk 11.0.4+11-post-Ubuntu-1ubuntu219.04

            Node log:

            ...
            [08/26/19 16:06:45] [SSH] Checking java version of java
            [08/26/19 16:06:45] [SSH] java -version returned 11.0.4.
            [08/26/19 16:06:45] [SSH] Starting sftp client.
            [08/26/19 16:06:45] [SSH] Copying latest remoting.jar...
            [08/26/19 16:06:45] [SSH] Copied 789,283 bytes.
            Expanded the channel window size to 4MB
            [08/26/19 16:06:45] [SSH] Starting agent process: cd "/home/jenkins/jenkins" && java -jar remoting.jar -workDir /home/jenkins/jenkins
            Aug 26, 2019 4:06:46 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
            INFO: Using /home/jenkins/jenkins/remoting as a remoting work directory
            Both error and output logs will be printed to /home/jenkins/jenkins/remoting
            <===[JENKINS REMOTING CAPACITY]===>channel started
            Remoting version: 3.29
            This is a Unix agent
            WARNING: An illegal reflective access operation has occurred
            WARNING: Illegal reflective access by jenkins.slaves.StandardOutputSwapper$ChannelSwapper to constructor java.io.FileDescriptor(int)
            WARNING: Please consider reporting this to the maintainers of jenkins.slaves.StandardOutputSwapper$ChannelSwapper
            WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
            WARNING: All illegal access operations will be denied in a future release
            Evacuated stdout
            Aug 26, 2019 4:06:52 PM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
            WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
            [StartupTrigger] - Scanning jobs for node node-linux
            Agent successfully connected and online
            
            remik P4 added a comment - Hi. This issue still occurs in our environment. Any plans for fixation?   Jenkins master: Windows Server 2012 R2; JDK 1.8.0_172-b11; Jenkins v2.176.2. Jenkins slave: Ubuntu 19.04 LTS; openjdk-11-jdk 11.0.4+11-post-Ubuntu-1ubuntu219.04 Node log: ... [08/26/19 16:06:45] [SSH] Checking java version of java [08/26/19 16:06:45] [SSH] java -version returned 11.0.4. [08/26/19 16:06:45] [SSH] Starting sftp client. [08/26/19 16:06:45] [SSH] Copying latest remoting.jar... [08/26/19 16:06:45] [SSH] Copied 789,283 bytes. Expanded the channel window size to 4MB [08/26/19 16:06:45] [SSH] Starting agent process: cd "/home/jenkins/jenkins" && java -jar remoting.jar -workDir /home/jenkins/jenkins Aug 26, 2019 4:06:46 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir INFO: Using /home/jenkins/jenkins/remoting as a remoting work directory Both error and output logs will be printed to /home/jenkins/jenkins/remoting <===[JENKINS REMOTING CAPACITY]===>channel started Remoting version: 3.29 This is a Unix agent WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by jenkins.slaves.StandardOutputSwapper$ChannelSwapper to constructor java.io.FileDescriptor( int ) WARNING: Please consider reporting this to the maintainers of jenkins.slaves.StandardOutputSwapper$ChannelSwapper WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Evacuated stdout Aug 26, 2019 4:06:52 PM org.jenkinsci.remoting.util.AnonymousClassWarnings warn WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$1; see: https: //jenkins.io/redirect/serialization-of-anonymous-classes/ [StartupTrigger] - Scanning jobs for node node-linux Agent successfully connected and online
            markewaite Mark Waite added a comment - - edited

            The message is a warning. There is no active project to remove those warnings. It may be a part of Hacktoberfest 2019 just as it was part of Hacktoberfest 2018. You're welcome to begin submitting pull requests to resolve those messages. This type of problem was mentioned in the "Running Jenkins with Java 9 & 10" blog post and in the Hacktoberfest 2018 announcement. Some of the places that may need to be addressed are listed in GitHub.

            markewaite Mark Waite added a comment - - edited The message is a warning. There is no active project to remove those warnings. It may be a part of Hacktoberfest 2019 just as it was part of Hacktoberfest 2018. You're welcome to begin submitting pull requests to resolve those messages. This type of problem was mentioned in the " Running Jenkins with Java 9 & 10 " blog post and in the Hacktoberfest 2018 announcement . Some of the places that may need to be addressed are listed in GitHub .
            basil Basil Crow added a comment -

            Duplicates JENKINS-46724. Fixed in jenkinsci/remoting#223 toward Remoting 3.15.

            basil Basil Crow added a comment - Duplicates JENKINS-46724 . Fixed in jenkinsci/remoting#223 toward Remoting 3.15.

            People

              Unassigned Unassigned
              markewaite Mark Waite
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: