Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10962

TestRequestHedgingProxyProvider is flaky

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.4
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: test
    • Labels:
      None

      Description

      This test fails occasionally with an error like this:

      org.apache.hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider.testHedgingWhenOneFails
      
      
      Error Message
      
      Wanted but not invoked:
      namenodeProtocols.getStats();
      -> at org.apache.hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider.testHedgingWhenOneFails(TestRequestHedgingProxyProvider.java:78)
      Actually, there were zero interactions with this mock.
      Stacktrace
      
      org.mockito.exceptions.verification.WantedButNotInvoked: 
      Wanted but not invoked:
      namenodeProtocols.getStats();
      -> at org.apache.hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider.testHedgingWhenOneFails(TestRequestHedgingProxyProvider.java:78)
      Actually, there were zero interactions with this mock.
      
      	at org.apache.hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider.testHedgingWhenOneFails(TestRequestHedgingProxyProvider.java:78)
      Standard Output
      
      2016-09-26 15:26:02,234 WARN  hdfs.DFSUtil (DFSUtil.java:getAddressesForNameserviceId(689)) - Namenode for mycluster-26780990 remains unresolved for ID nn1.  Check your hdfs-site.xml file to ensure namenodes are configured properly.
      2016-09-26 15:26:02,340 WARN  hdfs.DFSUtil (DFSUtil.java:getAddressesForNameserviceId(689)) - Namenode for mycluster-26780990 remains unresolved for ID nn2.  Check your hdfs-site.xml file to ensure namenodes are configured properly.
      
      1. HDFS-10962.001.patch
        2 kB
        Andrew Wang
      2. HDFS-10962.002.patch
        6 kB
        Andrew Wang

        Activity

        Hide
        andrew.wang Andrew Wang added a comment -

        I was unable to repro this locally after running it 100 times with load, but looking at the code I suspect it's due to the thread pool executor being cancelled before the badmock gets called.

        So, I attempted to fix this in two ways:

        • Reverse the order of badmock and goodmock so badmock gets called first
        • Added a little sleep before goodmock responds to give time for the badmock to also get called.
        Show
        andrew.wang Andrew Wang added a comment - I was unable to repro this locally after running it 100 times with load, but looking at the code I suspect it's due to the thread pool executor being cancelled before the badmock gets called. So, I attempted to fix this in two ways: Reverse the order of badmock and goodmock so badmock gets called first Added a little sleep before goodmock responds to give time for the badmock to also get called.
        Hide
        xiaochen Xiao Chen added a comment -

        Thanks Andrew for the fix.

        It makes sense, but since we can't repro I feel a little unconfident. How do you feel about also adding some debug logs into RequestHedgingProxyProvider and set log level to debug in the test? That will give us more to investigate if your fix didn't solve it 100%.

        Show
        xiaochen Xiao Chen added a comment - Thanks Andrew for the fix. It makes sense, but since we can't repro I feel a little unconfident. How do you feel about also adding some debug logs into RequestHedgingProxyProvider and set log level to debug in the test? That will give us more to investigate if your fix didn't solve it 100%.
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 20s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 8m 28s trunk passed
        +1 compile 0m 52s trunk passed
        +1 checkstyle 0m 29s trunk passed
        +1 mvnsite 1m 2s trunk passed
        +1 mvneclipse 0m 14s trunk passed
        +1 findbugs 1m 52s trunk passed
        +1 javadoc 1m 2s trunk passed
        +1 mvninstall 0m 49s the patch passed
        +1 compile 0m 42s the patch passed
        +1 javac 0m 42s the patch passed
        +1 checkstyle 0m 22s the patch passed
        +1 mvnsite 0m 49s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 48s the patch passed
        +1 javadoc 0m 52s the patch passed
        +1 unit 77m 29s hadoop-hdfs in the patch passed.
        +1 asflicense 0m 22s The patch does not generate ASF License warnings.
        98m 59s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10962
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831679/HDFS-10962.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 43b6924f6edc 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 31f8da2
        Default Java 1.8.0_101
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17015/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17015/console
        Powered by Apache Yetus 0.4.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 20s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 8m 28s trunk passed +1 compile 0m 52s trunk passed +1 checkstyle 0m 29s trunk passed +1 mvnsite 1m 2s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 1m 52s trunk passed +1 javadoc 1m 2s trunk passed +1 mvninstall 0m 49s the patch passed +1 compile 0m 42s the patch passed +1 javac 0m 42s the patch passed +1 checkstyle 0m 22s the patch passed +1 mvnsite 0m 49s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 48s the patch passed +1 javadoc 0m 52s the patch passed +1 unit 77m 29s hadoop-hdfs in the patch passed. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 98m 59s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10962 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831679/HDFS-10962.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 43b6924f6edc 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 31f8da2 Default Java 1.8.0_101 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17015/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17015/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        andrew.wang Andrew Wang added a comment -

        Thanks for reviewing Xiao, I added some TRACE logging that will help confirm or deny my hypothesis if there is a future failure.

        Show
        andrew.wang Andrew Wang added a comment - Thanks for reviewing Xiao, I added some TRACE logging that will help confirm or deny my hypothesis if there is a future failure.
        Hide
        xiaochen Xiao Chen added a comment -

        Thanks Andrew, looks great. +1 pending jenkins.

        Show
        xiaochen Xiao Chen added a comment - Thanks Andrew, looks great. +1 pending jenkins.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 10s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 6m 53s trunk passed
        +1 compile 0m 43s trunk passed
        +1 checkstyle 0m 25s trunk passed
        +1 mvnsite 0m 50s trunk passed
        +1 mvneclipse 0m 11s trunk passed
        +1 findbugs 1m 40s trunk passed
        +1 javadoc 0m 55s trunk passed
        +1 mvninstall 0m 46s the patch passed
        +1 compile 0m 41s the patch passed
        +1 javac 0m 41s the patch passed
        -0 checkstyle 0m 22s hadoop-hdfs-project/hadoop-hdfs: The patch generated 2 new + 6 unchanged - 0 fixed = 8 total (was 6)
        +1 mvnsite 0m 46s the patch passed
        +1 mvneclipse 0m 9s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 45s the patch passed
        +1 javadoc 0m 50s the patch passed
        -1 unit 62m 50s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 20s The patch does not generate ASF License warnings.
        81m 29s



        Reason Tests
        Failed junit tests hadoop.hdfs.server.namenode.TestAddStripedBlockInFBR



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10962
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831792/HDFS-10962.002.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux ad0b8c62a276 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 8867762
        Default Java 1.8.0_101
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17024/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/17024/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17024/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17024/console
        Powered by Apache Yetus 0.4.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 10s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 6m 53s trunk passed +1 compile 0m 43s trunk passed +1 checkstyle 0m 25s trunk passed +1 mvnsite 0m 50s trunk passed +1 mvneclipse 0m 11s trunk passed +1 findbugs 1m 40s trunk passed +1 javadoc 0m 55s trunk passed +1 mvninstall 0m 46s the patch passed +1 compile 0m 41s the patch passed +1 javac 0m 41s the patch passed -0 checkstyle 0m 22s hadoop-hdfs-project/hadoop-hdfs: The patch generated 2 new + 6 unchanged - 0 fixed = 8 total (was 6) +1 mvnsite 0m 46s the patch passed +1 mvneclipse 0m 9s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 45s the patch passed +1 javadoc 0m 50s the patch passed -1 unit 62m 50s hadoop-hdfs in the patch failed. +1 asflicense 0m 20s The patch does not generate ASF License warnings. 81m 29s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.TestAddStripedBlockInFBR Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10962 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831792/HDFS-10962.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux ad0b8c62a276 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 8867762 Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17024/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/17024/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17024/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17024/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        andrew.wang Andrew Wang added a comment -

        Committed to trunk, branch-2, branch-2.8. Thanks for reviewing Xiao!

        Show
        andrew.wang Andrew Wang added a comment - Committed to trunk, branch-2, branch-2.8. Thanks for reviewing Xiao!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10549 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10549/)
        HDFS-10962. TestRequestHedgingProxyProvider is flaky. (wang: rev e68c7b96c76b243da53ae539e7c760bf2c08f26e)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/RequestHedgingProxyProvider.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRequestHedgingProxyProvider.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10549 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10549/ ) HDFS-10962 . TestRequestHedgingProxyProvider is flaky. (wang: rev e68c7b96c76b243da53ae539e7c760bf2c08f26e) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/RequestHedgingProxyProvider.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRequestHedgingProxyProvider.java

          People

          • Assignee:
            andrew.wang Andrew Wang
            Reporter:
            andrew.wang Andrew Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development