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

Remoting should reject RPCRequests over the closing channel

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It is a follow-up to JENKINS-45023, where I have added checks for UserRequests in Remoting. It should help with the most of cases, but some requests like remote CommandLaunchers in Jenkins core may still hang because they use RPCRequests which are not filtered.

      OTOH some system objects are actually expected to be executed for closing channels (e.g. ClassLoaders), hence it needs additional investigation.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            some system objects are actually expected to be executed for closing channels (e.g. ClassLoaders)

            There are generally problems in Java with ClassLoader instances being asked to load some classes during clean-up of something, when it is actually too late to do any more loading. I suppose in this case you could exempt RemoteClassLoader calls from having the new behavior applied. For everything else I think it is appropriate.

            Show
            jglick Jesse Glick added a comment - some system objects are actually expected to be executed for closing channels (e.g. ClassLoaders) There are generally problems in Java with ClassLoader instances being asked to load some classes during clean-up of something, when it is actually too late to do any more loading. I suppose in this case you could exempt RemoteClassLoader calls from having the new behavior applied. For everything else I think it is appropriate.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Yes, maybe I will create a Remoting-internal SystemRPCRequest class for that. I also do not see other cases where RPC requests are really required, so maybe it makes sense to give a try while we are far from the next LTS baseline selection

            Show
            oleg_nenashev Oleg Nenashev added a comment - Yes, maybe I will create a Remoting-internal SystemRPCRequest class for that. I also do not see other cases where RPC requests are really required, so maybe it makes sense to give a try while we are far from the next LTS baseline selection
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/remoting/Channel.java
            src/main/java/hudson/remoting/ImportedClassLoaderTable.java
            src/main/java/hudson/remoting/RemoteClassLoader.java
            src/main/java/hudson/remoting/RemoteInvocationHandler.java
            src/test/java/hudson/remoting/ChannelTest.java
            src/test/java/hudson/remoting/PipeWriterTest.java
            http://jenkins-ci.org/commit/remoting/b46db643959c9b4c9837d5406cfaf08cad418e6c
            Log:
            JENKINS-45294 - RemoteInvocationHandler#RPCRequest is now a subject for channel status checks (#209)

            • JENKINS-45294 - RemoteInvocationHandler#RPCRequest is now a subject for channel status checks

            It is same as https://github.com/jenkinsci/remoting/pull/175, but for RPC Requests.
            The idea is to prevent hanging of RPC Requests in edge cases when the channel goes down.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java src/main/java/hudson/remoting/ImportedClassLoaderTable.java src/main/java/hudson/remoting/RemoteClassLoader.java src/main/java/hudson/remoting/RemoteInvocationHandler.java src/test/java/hudson/remoting/ChannelTest.java src/test/java/hudson/remoting/PipeWriterTest.java http://jenkins-ci.org/commit/remoting/b46db643959c9b4c9837d5406cfaf08cad418e6c Log: JENKINS-45294 - RemoteInvocationHandler#RPCRequest is now a subject for channel status checks (#209) JENKINS-45294 - RemoteInvocationHandler#RPCRequest is now a subject for channel status checks It is same as https://github.com/jenkinsci/remoting/pull/175 , but for RPC Requests. The idea is to prevent hanging of RPC Requests in edge cases when the channel goes down. JENKINS-45294 - Fix the stupid bug JENKINS-45294 - Add direct unit test of hanging RPC Call JENKINS-45294 - Address comments from @jglick
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/jenkins/bcd0b2c72bf8c55b7d4997e142954c149b7d4faa
            Log:
            Update Remoting from 3.13. to 3.14

            Fixes JENKINS-45294, JENKINS-47425, JENKINS-47901, JENKINS-47942 + about 50 reported FindBugs issues (JENKINS-37566). There are 13 FindBugs issues left, work in progress.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/bcd0b2c72bf8c55b7d4997e142954c149b7d4faa Log: Update Remoting from 3.13. to 3.14 Fixes JENKINS-45294 , JENKINS-47425 , JENKINS-47901 , JENKINS-47942 + about 50 reported FindBugs issues ( JENKINS-37566 ). There are 13 FindBugs issues left, work in progress.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The patch has been released in Remoting 3.14 and integrated towards Jenkins 2.90

            Show
            oleg_nenashev Oleg Nenashev added a comment - The patch has been released in Remoting 3.14 and integrated towards Jenkins 2.90
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/jenkins/94250ec1caae0ed6d3096e7002e0c2fd42c557e1
            Log:
            Update Remoting from 3.13. to 3.14

            Fixes JENKINS-45294, JENKINS-47425, JENKINS-47901, JENKINS-47942 + about 50 reported FindBugs issues (JENKINS-37566). There are 13 FindBugs issues left, work in progress.

            (cherry picked from commit bcd0b2c72bf8c55b7d4997e142954c149b7d4faa)

            Compare: https://github.com/jenkinsci/jenkins/compare/c624f66dc408...94250ec1caae

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/94250ec1caae0ed6d3096e7002e0c2fd42c557e1 Log: Update Remoting from 3.13. to 3.14 Fixes JENKINS-45294 , JENKINS-47425 , JENKINS-47901 , JENKINS-47942 + about 50 reported FindBugs issues ( JENKINS-37566 ). There are 13 FindBugs issues left, work in progress. (cherry picked from commit bcd0b2c72bf8c55b7d4997e142954c149b7d4faa) Compare: https://github.com/jenkinsci/jenkins/compare/c624f66dc408...94250ec1caae

              People

              • Assignee:
                oleg_nenashev Oleg Nenashev
                Reporter:
                oleg_nenashev Oleg Nenashev
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: