Details

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

      Description

      TestDFSShell.testFilePermissions fails intermittently with following assertion failure :

      Testcase: testFilePermissions took 0.299 sec
      FAILED
      expected:<...-...> but was:<...w...>
      junit.framework.ComparisonFailure: expected:<...-...> but was:<...w...>
      at org.apache.hadoop.hdfs.TestDFSShell.testChmod(TestDFSShell.java:781)
      at org.apache.hadoop.hdfs.TestDFSShell.testFilePermissions(TestDFSShell.java:832)

      1. HADOOP-5050.patch
        3 kB
        Jakob Homan
      2. TEST-org.apache.hadoop.hdfs.TestDFSShell.txt
        360 kB
        Amareshwari Sriramadasu
      3. HADOOP-5050.patch
        2 kB
        Jakob Homan
      4. TestDFSShell.log
        396 kB
        Amareshwari Sriramadasu

        Activity

        Hide
        Amareshwari Sriramadasu added a comment -

        Attaching the complete test log

        Show
        Amareshwari Sriramadasu added a comment - Attaching the complete test log
        Hide
        Jakob Homan added a comment -

        I've tried quite a bit and have been unable to get the test to fail on my machines. It appears from your log that the local directory that's created during the test has an expected write permission enabled. Out of curiosity, what's the default umask on your machine?

        The assumption currently used by the test, that the newly created directory will have a specific set of permissions on the local filesystem, is probably not a good one to make. I've changed the test test to explicitly set the permissions before the test, this should remove the problem. I've also added logging info to the test to help if further debugging is required.

        Patch passes all local unit tests except known-bad HADOOP-4907.
        test-patch output:

             [exec] +1 overall.  
             [exec] 
             [exec]     +1 @author.  The patch does not contain any @author tags.
             [exec] 
             [exec]     +1 tests included.  The patch appears to include 3 new or modified tests.
             [exec] 
             [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
             [exec] 
             [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
             [exec] 
             [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
             [exec] 
             [exec]     +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
        
        Show
        Jakob Homan added a comment - I've tried quite a bit and have been unable to get the test to fail on my machines. It appears from your log that the local directory that's created during the test has an expected write permission enabled. Out of curiosity, what's the default umask on your machine? The assumption currently used by the test, that the newly created directory will have a specific set of permissions on the local filesystem, is probably not a good one to make. I've changed the test test to explicitly set the permissions before the test, this should remove the problem. I've also added logging info to the test to help if further debugging is required. Patch passes all local unit tests except known-bad HADOOP-4907 . test-patch output: [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
        Hide
        Jakob Homan added a comment -

        Patch explicitly sets local file permissions before testing and adds logging.

        Show
        Jakob Homan added a comment - Patch explicitly sets local file permissions before testing and adds logging.
        Hide
        Amareshwari Sriramadasu added a comment -

        I see the failure with the patch also. Attaching the test log with patch applied.
        umask on my system(Linux RHEL) is 0002.

        Show
        Amareshwari Sriramadasu added a comment - I see the failure with the patch also. Attaching the test log with patch applied. umask on my system(Linux RHEL) is 0002 .
        Hide
        Jakob Homan added a comment -

        Yeah, that umask would have caused the failure you found. That's been corrected, although the first patch was slightly botched. Try again with this one.

        Patch passed all the unit tests, except the usual one. Patch should be applied; corrects bad assumption in unit test.

             [exec] +1 overall.  
             [exec] 
             [exec]     +1 @author.  The patch does not contain any @author tags.
             [exec] 
             [exec]     +1 tests included.  The patch appears to include 3 new or modified tests.
             [exec] 
             [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
             [exec] 
             [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
             [exec] 
             [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
             [exec] 
             [exec]     +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
        
        Show
        Jakob Homan added a comment - Yeah, that umask would have caused the failure you found. That's been corrected, although the first patch was slightly botched. Try again with this one. Patch passed all the unit tests, except the usual one. Patch should be applied; corrects bad assumption in unit test. [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 patch looks good

        I can reproduce the failure by setting umask to 0002. The problem is fixed after the Jakob's patch.

        Show
        Tsz Wo Nicholas Sze added a comment - +1 patch looks good I can reproduce the failure by setting umask to 0002. The problem is fixed after the Jakob's patch.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I just committed this. Thanks, Jakob!

        Show
        Tsz Wo Nicholas Sze added a comment - I just committed this. Thanks, Jakob!

          People

          • Assignee:
            Jakob Homan
            Reporter:
            Amareshwari Sriramadasu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development