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

Illegal Reflective Access in JBoss Marshalling

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      Pipeline: Support 3.0

      Description

      Even with the recent update we still get reflective access warnings in the lib.

      WARNING: Illegal reflective access by org.jboss.marshalling.reflect.JDKSpecific$SerMethods (file:/var/jenkins_home/plugins/workflow-support/WEB-INF/lib/jboss-marshalling-2.0.5.Final.jar) to method java.util.TreeMap.writeObject(java.io.ObjectOutputStream)
      	at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.<init>(JDKSpecific.java:82)
      	at org.jboss.marshalling.reflect.SerializableClass.<init>(SerializableClass.java:82)
      	at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:67)
      	at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:57)
      	at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:226)
      	at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:208)
      	at java.base/java.lang.ClassValue.get(ClassValue.java:114)
      	at org.jboss.marshalling.reflect.SerializableClassRegistry.lookup(SerializableClassRegistry.java:82)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:176)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920)
      	at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
      	at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
      	at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.lambda$writeObject$0(RiverWriter.java:144)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      	at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:143)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:482)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:458)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgramIfPossible(CpsThreadGroup.java:445)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:372)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
      

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          I have not seen this issue since the Pipeline: Support 3.0 release

          Show
          oleg_nenashev Oleg Nenashev added a comment - I have not seen this issue since the Pipeline: Support 3.0 release
          Hide
          timja Tim Jacomb added a comment - - edited

          I can re-produce this,

          2.270, latest pipeline plugins, connect a permanent agent

          then a simple pipeline:

          node {
              sh "echo 'hello-world'"
          }
          
          WARNING: Illegal reflective access by org.jboss.marshalling.reflect.JDKSpecific$SerMethods (file:/Users/timja/.jenkins/plugins/workflow-support/WEB-INF/lib/jboss-marshalling-2.0.6.Final.jar) to method java.lang.Throwable.writeObject(java.io.ObjectOutputStream)
          	at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.<init>(JDKSpecific.java:82)
          	at org.jboss.marshalling.reflect.SerializableClass.<init>(SerializableClass.java:82)
          	at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:67)
          	at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:57)
          	at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:226)
          	at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:208)
          	at java.base/java.lang.ClassValue.get(ClassValue.java:114)
          	at org.jboss.marshalling.reflect.SerializableClassRegistry.lookup(SerializableClassRegistry.java:82)
          	at org.jboss.marshalling.river.RiverMarshaller.writeNewSerializableClass(RiverMarshaller.java:1401)
          	at org.jboss.marshalling.river.RiverMarshaller.writeNewClass(RiverMarshaller.java:1337)
          	at org.jboss.marshalling.river.RiverMarshaller.writeClass(RiverMarshaller.java:1207)
          	at org.jboss.marshalling.river.RiverMarshaller.writeClassClass(RiverMarshaller.java:1195)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:162)
          	at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
          	at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
          	at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
          	at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
          	at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:345)
          	at java.base/java.util.LinkedHashMap.internalWriteEntries(LinkedHashMap.java:332)
          	at java.base/java.util.HashMap.writeObject(HashMap.java:1411)
          	at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:156)
          	at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:191)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1028)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
          	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920)
          
          Show
          timja Tim Jacomb added a comment - - edited I can re-produce this, 2.270, latest pipeline plugins, connect a permanent agent then a simple pipeline: node { sh "echo 'hello-world' " } WARNING: Illegal reflective access by org.jboss.marshalling.reflect.JDKSpecific$SerMethods (file:/Users/timja/.jenkins/plugins/workflow-support/WEB-INF/lib/jboss-marshalling-2.0.6.Final.jar) to method java.lang.Throwable.writeObject(java.io.ObjectOutputStream) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.<init>(JDKSpecific.java:82) at org.jboss.marshalling.reflect.SerializableClass.<init>(SerializableClass.java:82) at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:67) at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:57) at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:226) at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:208) at java.base/java.lang.ClassValue.get(ClassValue.java:114) at org.jboss.marshalling.reflect.SerializableClassRegistry.lookup(SerializableClassRegistry.java:82) at org.jboss.marshalling.river.RiverMarshaller.writeNewSerializableClass(RiverMarshaller.java:1401) at org.jboss.marshalling.river.RiverMarshaller.writeNewClass(RiverMarshaller.java:1337) at org.jboss.marshalling.river.RiverMarshaller.writeClass(RiverMarshaller.java:1207) at org.jboss.marshalling.river.RiverMarshaller.writeClassClass(RiverMarshaller.java:1195) at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:162) at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65) at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56) at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50) at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179) at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:345) at java.base/java.util.LinkedHashMap.internalWriteEntries(LinkedHashMap.java:332) at java.base/java.util.HashMap.writeObject(HashMap.java:1411) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:156) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:191) at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1028) at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920)
          Hide
          timja Tim Jacomb added a comment -

          After some further analysis I see there's JDK specific code in jboss marshalling, if you target java 11 when compiling then there warnings do not appear

          I patched Jenkins core to compile with 11 (bit hacky due to some dev tooling)
          and verified I don't see these warnings any more.

          Show
          timja Tim Jacomb added a comment - After some further analysis I see there's JDK specific code in jboss marshalling, if you target java 11 when compiling then there warnings do not appear I patched Jenkins core to compile with 11 (bit hacky due to some dev tooling) and verified I don't see these warnings any more.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: