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

RedHat JBoss 5.0.0-GA breaks remoting because it uses jboss-vfs-2.1.3.SP1

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Community JBoss 5.1.0-GA
      RHEL 5.3 JBoss 5.0.0-GA
    • Similar Issues:

      Description

      5.1.0-GA uses:
      <groupId>org.jboss</groupId>
      <artifactId>jboss-vfs</artifactId>
      <packaging>jar</packaging>
      <version>2.1.2.GA</version>

      RH 5.0.0-GA uses:
      <groupId>org.jboss</groupId>
      <artifactId>jboss-vfs</artifactId>
      <packaging>jar</packaging>
      <version>2.1.3.SP1</version>

      This causes an error at line 117 below in:

      hudson.remoting.Which

      110 if(resURL.startsWith("vfszip:")) {
      111 // JBoss5
      112 InputStream is = res.openStream();
      113 try

      { 114 Field f = is.getClass().getDeclaredField("delegate"); 115 f.setAccessible(true); 116 Object delegate = f.get(is); 117 f = delegate.getClass().getDeclaredField("this$0"); 118 f.setAccessible(true); 119 ZipFile zipFile = (ZipFile)f.get(delegate); 120 return new File(zipFile.getName()); 121 }

      catch (NoSuchFieldException e)

      { 122 // something must have changed in JBoss5. fall through 123 LOGGER.log(Level.FINE, "Failed to resolve vfszip into a jar location",e); 124 }

      catch (IllegalAccessException e)

      { 125 // something must have changed in JBoss5. fall through 126 LOGGER.log(Level.FINE, "Failed to resolve vfszip into a jar location",e); 127 }

      finally

      { 128 is.close(); 129 }

      The second time into Which hudson is looking for the jar containing:

      vfszip:/usr/local/jboss-apps/node00/webapps/hudson.war/WEB-INF/lib/remoting-1.349.jar/hudson/remoting/Launcher.class

      In vfs-2.1.2-GA the InputStream is a:

      org.jboss.virtual.plugins.context.zip.ZipEntryInputStream

      And everything is grand, but in vfs-2.1.3-SP1 the InputStream returns:

      org.jboss.virtual.plugins.context.zip.CertificateReaderInputStream

      Which wraps the ZipEntryInputStream not returning you access to the parent that you intended.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kohsuke
            Path:
            trunk/hudson/main/remoting/src/main/java/hudson/remoting/Which.java
            trunk/www/changelog.html
            http://jenkins-ci.org/commit/28656
            Log:
            [FIXED JENKINS-5922] Supported JBoss EAP 5.0.0 GA. jvalerio, if you can try the latest build from http://hudson.glassfish.org/view/Hudson/job/hudson-trunk/ to verify the fix, that would be great.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/remoting/src/main/java/hudson/remoting/Which.java trunk/www/changelog.html http://jenkins-ci.org/commit/28656 Log: [FIXED JENKINS-5922] Supported JBoss EAP 5.0.0 GA. jvalerio, if you can try the latest build from http://hudson.glassfish.org/view/Hudson/job/hudson-trunk/ to verify the fix, that would be great.
            Hide
            jvalerio jvalerio added a comment -

            We deployed build 4884. We got past the error mentioned above, but the job hung. There were some other errors on startup, but they could be caused by any other issue being worked on. The immediate exception has been bypassed, but I we are still not working correctly. FWIW this bug only happens when using the Maven pluging. We can use the generic one running maven commands just fine. Let me know what you would like from me going forward.

            • Joe
            Show
            jvalerio jvalerio added a comment - We deployed build 4884. We got past the error mentioned above, but the job hung. There were some other errors on startup, but they could be caused by any other issue being worked on. The immediate exception has been bypassed, but I we are still not working correctly. FWIW this bug only happens when using the Maven pluging. We can use the generic one running maven commands just fine. Let me know what you would like from me going forward. Joe
            Hide
            shawnmjones Shawn M. Jones added a comment - - edited

            We're using JBoss 5.0.0.GA (build: SVNTag=JBPAPP_5_0_0_GA date=200910202128) and are still seeing this behavior with released Hudson version 1.368.

            Compiling with the Maven2 plugin appears to send the Executor into an infinite loop with the message "Parsing POMs".

            Using jdb, I found that the problem is in Which.java. Sicking the debugger from IntelliJ on the problem with the latest source (for 1.368) identified that the loop on lines 115-119 is where the application gets stuck dealing with the variable 'is' of type org.jboss.virtual.plugins.context.zip.CertificateReaderInputStream.

            A search with Google using the term "org.jboss.virtual.plugins.context.zip.CertificateReaderInputStream" brought me to this bug report.

            Hudson build #8005 from http://hudson.glassfish.org/view/Hudson/job/hudson-trunk still shows this issue.

            Like jvaliero mentioned, we can run maven jobs fine using the "Build a free-style software project" job type.

            Show
            shawnmjones Shawn M. Jones added a comment - - edited We're using JBoss 5.0.0.GA (build: SVNTag=JBPAPP_5_0_0_GA date=200910202128) and are still seeing this behavior with released Hudson version 1.368. Compiling with the Maven2 plugin appears to send the Executor into an infinite loop with the message "Parsing POMs". Using jdb, I found that the problem is in Which.java. Sicking the debugger from IntelliJ on the problem with the latest source (for 1.368) identified that the loop on lines 115-119 is where the application gets stuck dealing with the variable 'is' of type org.jboss.virtual.plugins.context.zip.CertificateReaderInputStream. A search with Google using the term "org.jboss.virtual.plugins.context.zip.CertificateReaderInputStream" brought me to this bug report. Hudson build #8005 from http://hudson.glassfish.org/view/Hudson/job/hudson-trunk still shows this issue. Like jvaliero mentioned, we can run maven jobs fine using the "Build a free-style software project" job type.
            Hide
            jlivings jlivings added a comment -

            shawnmjones is correct in that there is an infinite loop, and the cause of the problem is the following code. If you look closely, you see that rather than going outwards from one input stream to the delegate, it always gets the delegate from the original 'is'.

            Object delegate = is;
            while (delegate.getClass().getEnclosingClass()!=ZipFile.class)

            { Field f = is.getClass().getDeclaredField("delegate"); f.setAccessible(true); delegate = f.get(is); }

            It should probably be something like this instead:
            Object delegate = is;
            while (delegate.getClass().getEnclosingClass()!=ZipFile.class)

            { Field f = delegate.getClass().getDeclaredField("delegate"); f.setAccessible(true); delegate = f.get(delegate); }
            Show
            jlivings jlivings added a comment - shawnmjones is correct in that there is an infinite loop, and the cause of the problem is the following code. If you look closely, you see that rather than going outwards from one input stream to the delegate, it always gets the delegate from the original 'is'. Object delegate = is; while (delegate.getClass().getEnclosingClass()!=ZipFile.class) { Field f = is.getClass().getDeclaredField("delegate"); f.setAccessible(true); delegate = f.get(is); } It should probably be something like this instead: Object delegate = is; while (delegate.getClass().getEnclosingClass()!=ZipFile.class) { Field f = delegate.getClass().getDeclaredField("delegate"); f.setAccessible(true); delegate = f.get(delegate); }
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vojtech Juranek
            Path:
            remoting/src/main/java/hudson/remoting/Which.java
            http://jenkins-ci.org/commit/jenkins/136ab1cb4b31d572c6ad47067299e1bc4331a484
            Log:
            Fix for JENKINS-5922 - workaround for CertificateReaderInputStream

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: remoting/src/main/java/hudson/remoting/Which.java http://jenkins-ci.org/commit/jenkins/136ab1cb4b31d572c6ad47067299e1bc4331a484 Log: Fix for JENKINS-5922 - workaround for CertificateReaderInputStream
            Show
            vjuranek vjuranek added a comment - Should be fixed in https://github.com/jenkinsci/jenkins/commit/136ab1cb4b31d572c6ad47067299e1bc4331a484
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vojtech Juranek
            Path:
            remoting/src/main/java/hudson/remoting/Which.java
            http://jenkins-ci.org/commit/jenkins/7c5da9b3c1564354958a570ea1a83d935d75a033
            Log:
            Remove potential infinite loop (related to JENKINS-5922) + formating of previous patch

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: remoting/src/main/java/hudson/remoting/Which.java http://jenkins-ci.org/commit/jenkins/7c5da9b3c1564354958a570ea1a83d935d75a033 Log: Remove potential infinite loop (related to JENKINS-5922 ) + formating of previous patch
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vojtech Juranek
            Path:
            remoting/src/main/java/hudson/remoting/Which.java
            http://jenkins-ci.org/commit/jenkins/41dc24fa1c07c09da63582e026d2e23d71020a41
            Log:
            Fix for JENKINS-5922 - workaround for CertificateReaderInputStream
            (cherry picked from commit 136ab1cb4b31d572c6ad47067299e1bc4331a484)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: remoting/src/main/java/hudson/remoting/Which.java http://jenkins-ci.org/commit/jenkins/41dc24fa1c07c09da63582e026d2e23d71020a41 Log: Fix for JENKINS-5922 - workaround for CertificateReaderInputStream (cherry picked from commit 136ab1cb4b31d572c6ad47067299e1bc4331a484)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vojtech Juranek
            Path:
            remoting/src/main/java/hudson/remoting/Which.java
            http://jenkins-ci.org/commit/jenkins/851129457457e5436ca849a74bf3dc6076cea425
            Log:
            Remove potential infinite loop (related to JENKINS-5922) + formating of previous patch
            (cherry picked from commit 7c5da9b3c1564354958a570ea1a83d935d75a033)

            Compare: https://github.com/jenkinsci/jenkins/compare/20fe631...8511294

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: remoting/src/main/java/hudson/remoting/Which.java http://jenkins-ci.org/commit/jenkins/851129457457e5436ca849a74bf3dc6076cea425 Log: Remove potential infinite loop (related to JENKINS-5922 ) + formating of previous patch (cherry picked from commit 7c5da9b3c1564354958a570ea1a83d935d75a033) Compare: https://github.com/jenkinsci/jenkins/compare/20fe631...8511294
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vojtech Juranek
            Path:
            remoting/src/main/java/hudson/remoting/Which.java
            http://jenkins-ci.org/commit/jenkins/136ab1cb4b31d572c6ad47067299e1bc4331a484
            Log:
            Fix for JENKINS-5922 - workaround for CertificateReaderInputStream

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: remoting/src/main/java/hudson/remoting/Which.java http://jenkins-ci.org/commit/jenkins/136ab1cb4b31d572c6ad47067299e1bc4331a484 Log: Fix for JENKINS-5922 - workaround for CertificateReaderInputStream
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vojtech Juranek
            Path:
            remoting/src/main/java/hudson/remoting/Which.java
            http://jenkins-ci.org/commit/jenkins/7c5da9b3c1564354958a570ea1a83d935d75a033
            Log:
            Remove potential infinite loop (related to JENKINS-5922) + formating of previous patch

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: remoting/src/main/java/hudson/remoting/Which.java http://jenkins-ci.org/commit/jenkins/7c5da9b3c1564354958a570ea1a83d935d75a033 Log: Remove potential infinite loop (related to JENKINS-5922 ) + formating of previous patch
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vojtech Juranek
            Path:
            remoting/src/main/java/hudson/remoting/Which.java
            http://jenkins-ci.org/commit/jenkins/136ab1cb4b31d572c6ad47067299e1bc4331a484
            Log:
            Fix for JENKINS-5922 - workaround for CertificateReaderInputStream

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: remoting/src/main/java/hudson/remoting/Which.java http://jenkins-ci.org/commit/jenkins/136ab1cb4b31d572c6ad47067299e1bc4331a484 Log: Fix for JENKINS-5922 - workaround for CertificateReaderInputStream
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vojtech Juranek
            Path:
            remoting/src/main/java/hudson/remoting/Which.java
            http://jenkins-ci.org/commit/jenkins/7c5da9b3c1564354958a570ea1a83d935d75a033
            Log:
            Remove potential infinite loop (related to JENKINS-5922) + formating of previous patch

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: remoting/src/main/java/hudson/remoting/Which.java http://jenkins-ci.org/commit/jenkins/7c5da9b3c1564354958a570ea1a83d935d75a033 Log: Remove potential infinite loop (related to JENKINS-5922 ) + formating of previous patch

              People

              • Assignee:
                Unassigned
                Reporter:
                jvalerio jvalerio
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: