Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: test
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      We have seen this assert cause occasional failures on Ubuntu.

              Assert.assertEquals(System.currentTimeMillis() + 1000 * 1000,
                           token.getExpires(), 100);
      

      The expected fudge is up to 100ms, we have seen up to ~110ms in practice.

      1. HADOOP-10394.01.patch
        7 kB
        Arpit Agarwal
      2. HADOOP-10394.02.patch
        7 kB
        Arpit Agarwal

        Activity

        Hide
        Arpit Agarwal added a comment -

        I am not familiar with this the code that is being tested but from a quick look it appears safe to increase the fudge factor up to a couple of seconds without compromising the correctness of the test case.

        Show
        Arpit Agarwal added a comment - I am not familiar with this the code that is being tested but from a quick look it appears safe to increase the fudge factor up to a couple of seconds without compromising the correctness of the test case.
        Hide
        Arpit Agarwal added a comment -

        Patch to increase the fudge factor, replace hard-coded timeouts with constant.

        Show
        Arpit Agarwal added a comment - Patch to increase the fudge factor, replace hard-coded timeouts with constant.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12633510/HADOOP-10394.01.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        -1 release audit. The applied patch generated 1 release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-auth.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/3646//testReport/
        Release audit warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/3646//artifact/trunk/patchprocess/patchReleaseAuditProblems.txt
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/3646//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12633510/HADOOP-10394.01.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. -1 release audit . The applied patch generated 1 release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-auth. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/3646//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/3646//artifact/trunk/patchprocess/patchReleaseAuditProblems.txt Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/3646//console This message is automatically generated.
        Hide
        Arpit Agarwal added a comment -

        The RA warning is unrelated to the patch.

        Show
        Arpit Agarwal added a comment - The RA warning is unrelated to the patch.
        Hide
        Haohui Mai added a comment -

        I think that it is sufficient to assert token.getExpires() != 0 instead of asserting on the absolute time. That is, changing

        +        Assert.assertEquals(System.currentTimeMillis() + TOKEN_VALIDITY_SEC * 1000,
        +                     token.getExpires(), TOKEN_EXPIRATION_DELTA_MS);
        

        into

        +        Assert.assertNotEquals(0, token.getExpires());
        
        Show
        Haohui Mai added a comment - I think that it is sufficient to assert token.getExpires() != 0 instead of asserting on the absolute time. That is, changing + Assert.assertEquals( System .currentTimeMillis() + TOKEN_VALIDITY_SEC * 1000, + token.getExpires(), TOKEN_EXPIRATION_DELTA_MS); into + Assert.assertNotEquals(0, token.getExpires());
        Hide
        Arpit Agarwal added a comment -

        Thanks Haohui, updated patch attached.

        Haohui explained offline that weakening the assert does not weaken the security check.

        Even the cookie does not expire as expected, the token (which is validated on the server side) will expire anyway. The security of the system does not depend on whether the cookie has expired or not.

        Show
        Arpit Agarwal added a comment - Thanks Haohui, updated patch attached. Haohui explained offline that weakening the assert does not weaken the security check. Even the cookie does not expire as expected, the token (which is validated on the server side) will expire anyway. The security of the system does not depend on whether the cookie has expired or not.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12633615/HADOOP-10394.02.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-auth.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/3650//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/3650//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12633615/HADOOP-10394.02.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-auth. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/3650//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/3650//console This message is automatically generated.
        Hide
        Haohui Mai added a comment -

        +1

        Show
        Haohui Mai added a comment - +1
        Hide
        Arpit Agarwal added a comment -

        Thanks Haohui. Committed to trunk through branch-2.4.

        Show
        Arpit Agarwal added a comment - Thanks Haohui. Committed to trunk through branch-2.4.
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-trunk-Commit #5302 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5302/)
        HADOOP-10394. TestAuthenticationFilter is flaky. (Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576145)

        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #5302 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5302/ ) HADOOP-10394 . TestAuthenticationFilter is flaky. (Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576145 ) /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #506 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/506/)
        HADOOP-10394. TestAuthenticationFilter is flaky. (Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576145)

        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #506 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/506/ ) HADOOP-10394 . TestAuthenticationFilter is flaky. (Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576145 ) /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Hdfs-trunk #1698 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1698/)
        HADOOP-10394. TestAuthenticationFilter is flaky. (Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576145)

        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #1698 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1698/ ) HADOOP-10394 . TestAuthenticationFilter is flaky. (Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576145 ) /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1723 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1723/)
        HADOOP-10394. TestAuthenticationFilter is flaky. (Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576145)

        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1723 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1723/ ) HADOOP-10394 . TestAuthenticationFilter is flaky. (Arpit Agarwal) (arp: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576145 ) /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

          People

          • Assignee:
            Arpit Agarwal
            Reporter:
            Arpit Agarwal
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development