Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14511

WritableRpcEngine.Invocation#toString NPE on null parameters

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.9.0, 2.8.2
    • Component/s: ipc
    • Labels:
      None

      Description

      WritableRpcEngine.Invocation#toString will throw NPE if parameters is null:

      WritableRpcEngine.Invocation#toString
            buffer.append(methodName);
            buffer.append("(");
            for (int i = 0; i < parameters.length; i++) {
              if (i != 0)
                buffer.append(", ");
              buffer.append(parameters[i]);
            }
            buffer.append(")");
      
      1. HADOOP-14511.002.patch
        1 kB
        John Zhuge
      2. HADOOP-14511.001.patch
        1 kB
        John Zhuge

        Issue Links

          Activity

          Hide
          jzhuge John Zhuge added a comment -

          Committed to branch-2 and branch-2.8.

          Thanks Xiao Chen for the review and Eric Badger for reporting the issue in HDFS-11861.

          Show
          jzhuge John Zhuge added a comment - Committed to branch-2 and branch-2.8. Thanks Xiao Chen for the review and Eric Badger for reporting the issue in HDFS-11861 .
          Hide
          xiaochen Xiao Chen added a comment -

          +1. Thanks John Zhuge for the prompt fix!
          (Here if parameters == null, we would print a (). But I think it's understandable too).

          Show
          xiaochen Xiao Chen added a comment - +1. Thanks John Zhuge for the prompt fix! (Here if parameters == null, we would print a () . But I think it's understandable too).
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 18s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
          +1 mvninstall 13m 38s trunk passed
          +1 compile 14m 3s trunk passed
          +1 checkstyle 0m 35s trunk passed
          +1 mvnsite 1m 10s trunk passed
          -1 findbugs 1m 24s hadoop-common-project/hadoop-common in trunk has 19 extant Findbugs warnings.
          +1 javadoc 0m 55s trunk passed
          +1 mvninstall 0m 43s the patch passed
          +1 compile 10m 46s the patch passed
          +1 javac 10m 46s the patch passed
          +1 checkstyle 0m 38s hadoop-common-project/hadoop-common: The patch generated 0 new + 27 unchanged - 1 fixed = 27 total (was 28)
          +1 mvnsite 1m 12s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 48s the patch passed
          +1 javadoc 0m 54s the patch passed
          +1 unit 8m 23s hadoop-common in the patch passed.
          +1 asflicense 0m 33s The patch does not generate ASF License warnings.
          58m 56s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue HADOOP-14511
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12872170/HADOOP-14511.002.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux ec585901f374 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 7c9694c
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/12492/artifact/patchprocess/branch-findbugs-hadoop-common-project_hadoop-common-warnings.html
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12492/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12492/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 18s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 13m 38s trunk passed +1 compile 14m 3s trunk passed +1 checkstyle 0m 35s trunk passed +1 mvnsite 1m 10s trunk passed -1 findbugs 1m 24s hadoop-common-project/hadoop-common in trunk has 19 extant Findbugs warnings. +1 javadoc 0m 55s trunk passed +1 mvninstall 0m 43s the patch passed +1 compile 10m 46s the patch passed +1 javac 10m 46s the patch passed +1 checkstyle 0m 38s hadoop-common-project/hadoop-common: The patch generated 0 new + 27 unchanged - 1 fixed = 27 total (was 28) +1 mvnsite 1m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 48s the patch passed +1 javadoc 0m 54s the patch passed +1 unit 8m 23s hadoop-common in the patch passed. +1 asflicense 0m 33s The patch does not generate ASF License warnings. 58m 56s Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HADOOP-14511 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12872170/HADOOP-14511.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux ec585901f374 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 7c9694c Default Java 1.8.0_131 findbugs v3.1.0-RC1 findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/12492/artifact/patchprocess/branch-findbugs-hadoop-common-project_hadoop-common-warnings.html Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12492/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12492/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Patch 002

          • Fix checkstyle

          Unit test TestRaceWhenRelogin passes locally for me on Mac.

          Show
          jzhuge John Zhuge added a comment - Patch 002 Fix checkstyle Unit test TestRaceWhenRelogin passes locally for me on Mac.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 17s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
          +1 mvninstall 13m 30s trunk passed
          +1 compile 13m 59s trunk passed
          +1 checkstyle 0m 36s trunk passed
          +1 mvnsite 1m 6s trunk passed
          -1 findbugs 1m 26s hadoop-common-project/hadoop-common in trunk has 19 extant Findbugs warnings.
          +1 javadoc 0m 51s trunk passed
          +1 mvninstall 0m 46s the patch passed
          +1 compile 11m 8s the patch passed
          +1 javac 11m 8s the patch passed
          -0 checkstyle 0m 37s hadoop-common-project/hadoop-common: The patch generated 1 new + 27 unchanged - 1 fixed = 28 total (was 28)
          +1 mvnsite 1m 10s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 45s the patch passed
          +1 javadoc 0m 52s the patch passed
          -1 unit 7m 45s hadoop-common in the patch failed.
          +1 asflicense 0m 34s The patch does not generate ASF License warnings.
          58m 18s



          Reason Tests
          Failed junit tests hadoop.security.TestRaceWhenRelogin



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue HADOOP-14511
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12872146/HADOOP-14511.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux efc28b86dbe4 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / a062374
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/artifact/patchprocess/branch-findbugs-hadoop-common-project_hadoop-common-warnings.html
          checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 17s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 13m 30s trunk passed +1 compile 13m 59s trunk passed +1 checkstyle 0m 36s trunk passed +1 mvnsite 1m 6s trunk passed -1 findbugs 1m 26s hadoop-common-project/hadoop-common in trunk has 19 extant Findbugs warnings. +1 javadoc 0m 51s trunk passed +1 mvninstall 0m 46s the patch passed +1 compile 11m 8s the patch passed +1 javac 11m 8s the patch passed -0 checkstyle 0m 37s hadoop-common-project/hadoop-common: The patch generated 1 new + 27 unchanged - 1 fixed = 28 total (was 28) +1 mvnsite 1m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 45s the patch passed +1 javadoc 0m 52s the patch passed -1 unit 7m 45s hadoop-common in the patch failed. +1 asflicense 0m 34s The patch does not generate ASF License warnings. 58m 18s Reason Tests Failed junit tests hadoop.security.TestRaceWhenRelogin Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HADOOP-14511 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12872146/HADOOP-14511.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux efc28b86dbe4 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / a062374 Default Java 1.8.0_131 findbugs v3.1.0-RC1 findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/artifact/patchprocess/branch-findbugs-hadoop-common-project_hadoop-common-warnings.html checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12485/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Patch 001

          • Do not access parameters if it is null

          Testing Done

          • TestClientToAMTokens
          • TestClientProtocolWithDelegationToken
          Show
          jzhuge John Zhuge added a comment - Patch 001 Do not access parameters if it is null Testing Done TestClientToAMTokens TestClientProtocolWithDelegationToken
          Hide
          jzhuge John Zhuge added a comment -

          On branch-2, TestClientProtocolWithDelegationToken.testDelegationTokenRpc NPE:

          testDelegationTokenRpc(org.apache.hadoop.hdfs.security.TestClientProtocolWithDelegationToken)  Time elapsed: 3.241 sec  <<< ERROR!
          java.lang.NullPointerException: null
          	at org.apache.hadoop.ipc.WritableRpcEngine$Invocation.toString(WritableRpcEngine.java:185)
          	at java.lang.String.valueOf(String.java:2994)
          	at java.lang.StringBuilder.append(StringBuilder.java:131)
          	at org.apache.hadoop.ipc.Client$Connection$3.run(Client.java:1114)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          	at java.lang.Thread.run(Thread.java:745)
          

          And TestClientToAMTokens NPE:

            <testcase name="testClientToAMTokens" classname="org.apache.hadoop.yarn.server.resourcemanager.security.TestClientToAMTokens" time="5.759">
              <error type="java.lang.NullPointerException:">java.lang.NullPointerException: null
                  at org.apache.hadoop.ipc.WritableRpcEngine$Invocation.toString(WritableRpcEngine.java:185)
                  at java.lang.String.valueOf(String.java:2994)
                  at java.lang.StringBuilder.append(StringBuilder.java:131)
                  at org.apache.hadoop.ipc.Client$Connection$3.run(Client.java:1114)
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
                  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                  at java.lang.Thread.run(Thread.java:745)
          
          Show
          jzhuge John Zhuge added a comment - On branch-2, TestClientProtocolWithDelegationToken.testDelegationTokenRpc NPE: testDelegationTokenRpc(org.apache.hadoop.hdfs.security.TestClientProtocolWithDelegationToken) Time elapsed: 3.241 sec <<< ERROR! java.lang.NullPointerException: null at org.apache.hadoop.ipc.WritableRpcEngine$Invocation.toString(WritableRpcEngine.java:185) at java.lang.String.valueOf(String.java:2994) at java.lang.StringBuilder.append(StringBuilder.java:131) at org.apache.hadoop.ipc.Client$Connection$3.run(Client.java:1114) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) And TestClientToAMTokens NPE: <testcase name="testClientToAMTokens" classname="org.apache.hadoop.yarn.server.resourcemanager.security.TestClientToAMTokens" time="5.759"> <error type="java.lang.NullPointerException:">java.lang.NullPointerException: null at org.apache.hadoop.ipc.WritableRpcEngine$Invocation.toString(WritableRpcEngine.java:185) at java.lang.String.valueOf(String.java:2994) at java.lang.StringBuilder.append(StringBuilder.java:131) at org.apache.hadoop.ipc.Client$Connection$3.run(Client.java:1114) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
          Hide
          jzhuge John Zhuge added a comment -

          WriteableRPCEngine is deprecated in trunk, so won't fix in trunk.

          Show
          jzhuge John Zhuge added a comment - WriteableRPCEngine is deprecated in trunk, so won't fix in trunk.

            People

            • Assignee:
              jzhuge John Zhuge
              Reporter:
              jzhuge John Zhuge
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development