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

Remoting should reject RPCRequests over the closing channel

      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.

          [JENKINS-45294] Remoting should reject RPCRequests over the closing channel

          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.

          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.

          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

          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

          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.

          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

          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.

          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.

          Oleg Nenashev added a comment -

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

          Oleg Nenashev added a comment - The patch has been released in Remoting 3.14 and integrated towards Jenkins 2.90

          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

          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

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

              Created:
              Updated:
              Resolved: