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

plugin failures after upgrade of bytecode-compatability-transformer

      After the fix of JENKINS-28781 the acceptance test harness for the batch-task-plugin fails with

      java.lang.RuntimeException: java.lang.ClassNotFoundException: org.jenkinsci.lib.envinject.service.EnvVarsResolver
       at org.kohsuke.asm5.ClassWriter.getCommonSuperClass(ClassWriter.java:1684)
       at org.kohsuke.asm5.ClassWriter.getMergedType(ClassWriter.java:1654)
       at org.kohsuke.asm5.Frame.merge(Frame.java:1426)
       at org.kohsuke.asm5.Frame.merge(Frame.java:1325)
       at org.kohsuke.asm5.MethodWriter.visitMaxs(MethodWriter.java:1475)
       at org.kohsuke.asm5.tree.MethodNode.accept(MethodNode.java:833)
       at org.kohsuke.asm5.commons.JSRInlinerAdapter.visitEnd(JSRInlinerAdapter.java:187)
       at org.kohsuke.asm5.MethodVisitor.visitEnd(MethodVisitor.java:877)
       at org.kohsuke.asm5.ClassReader.readMethod(ClassReader.java:1021)
      

          [JENKINS-30820] plugin failures after upgrade of bytecode-compatability-transformer

          Code changed in jenkins
          User: James Nord
          Path:
          src/main/java/org/jenkinsci/bytecode/AdaptField.java
          src/main/java/org/jenkinsci/bytecode/TransformationSpec.java
          src/main/java/org/jenkinsci/bytecode/Transformer.java
          src/test/java/CompatibilityTest.java
          src/test/java/org/jenkinsci/bytecode/CompatibilityTest.java
          http://jenkins-ci.org/commit/bytecode-compatibility-transformer/be04bef432764163d2e173ddf02fa9a2a538f636
          Log:
          Merge pull request #5 from jtnord/JENKINS-30820_1

          JENKINS-30820 Only regenerate StackMap for JDK6+ classes

          Compare: https://github.com/jenkinsci/bytecode-compatibility-transformer/compare/75a3040a5ee2...be04bef43276

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: src/main/java/org/jenkinsci/bytecode/AdaptField.java src/main/java/org/jenkinsci/bytecode/TransformationSpec.java src/main/java/org/jenkinsci/bytecode/Transformer.java src/test/java/CompatibilityTest.java src/test/java/org/jenkinsci/bytecode/CompatibilityTest.java http://jenkins-ci.org/commit/bytecode-compatibility-transformer/be04bef432764163d2e173ddf02fa9a2a538f636 Log: Merge pull request #5 from jtnord/ JENKINS-30820 _1 JENKINS-30820 Only regenerate StackMap for JDK6+ classes Compare: https://github.com/jenkinsci/bytecode-compatibility-transformer/compare/75a3040a5ee2...be04bef43276

          Code changed in jenkins
          User: James Nord
          Path:
          src/main/java/org/jenkinsci/bytecode/ClassWriter.java
          src/main/java/org/jenkinsci/bytecode/Transformer.java
          src/test/java/CompatibilityTest.java
          http://jenkins-ci.org/commit/bytecode-compatibility-transformer/2c0e478a73a3ec23d4b6d84901d92ce99bcced2e
          Log:
          JENKINS-30820 use classloader for stackMap references.

          To generate stackFrames and for some parts of this the common ancestor of
          2 classes is required. ASM loads these classes using Class.forName()
          using the classloader of the ASM classes. In order to resolve this we
          provide our own ClassWriter implementation which would be able to load
          the classes using the plugins classloader.
          Java classes can contain circular references so if multiple classes in
          this circular chain require re-writing then this code will either
          depadlock or enter an infinite loop (not sure which) but this would happen
          less than the current situation which is to blow up with a
          ClassNotFoundException.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: src/main/java/org/jenkinsci/bytecode/ClassWriter.java src/main/java/org/jenkinsci/bytecode/Transformer.java src/test/java/CompatibilityTest.java http://jenkins-ci.org/commit/bytecode-compatibility-transformer/2c0e478a73a3ec23d4b6d84901d92ce99bcced2e Log: JENKINS-30820 use classloader for stackMap references. To generate stackFrames and for some parts of this the common ancestor of 2 classes is required. ASM loads these classes using Class.forName() using the classloader of the ASM classes. In order to resolve this we provide our own ClassWriter implementation which would be able to load the classes using the plugins classloader. Java classes can contain circular references so if multiple classes in this circular chain require re-writing then this code will either depadlock or enter an infinite loop (not sure which) but this would happen less than the current situation which is to blow up with a ClassNotFoundException.

          Code changed in jenkins
          User: James Nord
          Path:
          src/main/java/org/jenkinsci/bytecode/ClassWriter.java
          src/main/java/org/jenkinsci/bytecode/Transformer.java
          src/test/java/org/jenkinsci/bytecode/CompatibilityTest.java
          http://jenkins-ci.org/commit/bytecode-compatibility-transformer/d25b3a53454744b9df0e5d1c79045d3cde307298
          Log:
          Merge pull request #6 from jtnord/JENKINS-30820_2

          JENKINS-30820 use classloader for stackMap references.

          Compare: https://github.com/jenkinsci/bytecode-compatibility-transformer/compare/be04bef43276...d25b3a534547

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: src/main/java/org/jenkinsci/bytecode/ClassWriter.java src/main/java/org/jenkinsci/bytecode/Transformer.java src/test/java/org/jenkinsci/bytecode/CompatibilityTest.java http://jenkins-ci.org/commit/bytecode-compatibility-transformer/d25b3a53454744b9df0e5d1c79045d3cde307298 Log: Merge pull request #6 from jtnord/ JENKINS-30820 _2 JENKINS-30820 use classloader for stackMap references. Compare: https://github.com/jenkinsci/bytecode-compatibility-transformer/compare/be04bef43276...d25b3a534547

          Code changed in jenkins
          User: James Nord
          Path:
          core/pom.xml
          core/src/main/java/hudson/ClassicPluginStrategy.java
          http://jenkins-ci.org/commit/jenkins/4c6dd0135ad9e4f108b2bf7527d34dabddd16fb7
          Log:
          JENKINS-30820 pick up the new bytecode-compat-t.

          The new version of the BCT does not generate stackMap if the original code
          did not contain stack maps. Further more the new version takes a
          classloader to use so that it can load classes when searching for the
          common parent class.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: core/pom.xml core/src/main/java/hudson/ClassicPluginStrategy.java http://jenkins-ci.org/commit/jenkins/4c6dd0135ad9e4f108b2bf7527d34dabddd16fb7 Log: JENKINS-30820 pick up the new bytecode-compat-t. The new version of the BCT does not generate stackMap if the original code did not contain stack maps. Further more the new version takes a classloader to use so that it can load classes when searching for the common parent class.

          Code changed in jenkins
          User: James Nord
          Path:
          core/pom.xml
          core/src/main/java/hudson/ClassicPluginStrategy.java
          http://jenkins-ci.org/commit/jenkins/3228ff1431ad3a3f7c52a46ac4808fb31a902244
          Log:
          Merge pull request #1867 from jtnord/JENKINS-30820

          JENKINS-30820 pick up the new bytecode-compatability-transformer

          Compare: https://github.com/jenkinsci/jenkins/compare/21f36fb22196...3228ff1431ad

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: core/pom.xml core/src/main/java/hudson/ClassicPluginStrategy.java http://jenkins-ci.org/commit/jenkins/3228ff1431ad3a3f7c52a46ac4808fb31a902244 Log: Merge pull request #1867 from jtnord/ JENKINS-30820 JENKINS-30820 pick up the new bytecode-compatability-transformer Compare: https://github.com/jenkinsci/jenkins/compare/21f36fb22196...3228ff1431ad

          Code changed in jenkins
          User: James Nord
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/0a36f743f1fd2264f8562e6fbea54712567be556
          Log:
          Noting JENKINS-30820

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: changelog.html http://jenkins-ci.org/commit/jenkins/0a36f743f1fd2264f8562e6fbea54712567be556 Log: Noting JENKINS-30820

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4325
          JENKINS-30820 pick up the new bytecode-compat-t. (Revision 4c6dd0135ad9e4f108b2bf7527d34dabddd16fb7)

          Result = SUCCESS
          james nord : 4c6dd0135ad9e4f108b2bf7527d34dabddd16fb7
          Files :

          • core/pom.xml
          • core/src/main/java/hudson/ClassicPluginStrategy.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4325 JENKINS-30820 pick up the new bytecode-compat-t. (Revision 4c6dd0135ad9e4f108b2bf7527d34dabddd16fb7) Result = SUCCESS james nord : 4c6dd0135ad9e4f108b2bf7527d34dabddd16fb7 Files : core/pom.xml core/src/main/java/hudson/ClassicPluginStrategy.java

          I can confirm the bug is gone in 1.634

          Torsten Zühlsdorff added a comment - I can confirm the bug is gone in 1.634

          James Nord added a comment -

          fixed in 1.634

          James Nord added a comment - fixed in 1.634

          Set resolved ticket to Closed.

          Łukasz Jąder added a comment - Set resolved ticket to Closed.

            Unassigned Unassigned
            teilo James Nord
            Votes:
            40 Vote for this issue
            Watchers:
            52 Start watching this issue

              Created:
              Updated:
              Resolved: