Hadoop Common
  1. Hadoop Common
  2. HADOOP-4647

NamenodeFsck creates a new DFSClient but never closes it

    Details

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

      Description

      In NamenodeFsck.lostFoundMove(FileStatus file, LocatedBlocks blocks), a new DFSClient is created but never closed.

      1. 4647_20081113.patch
        1 kB
        Tsz Wo Nicholas Sze
      2. 4647_20081113b.patch
        0.7 kB
        Tsz Wo Nicholas Sze
      3. 4647_20081118.patch
        2 kB
        Tsz Wo Nicholas Sze
      4. 4647_20081118_0.18.patch
        2 kB
        Tsz Wo Nicholas Sze

        Activity

        Hide
        Tsz Wo Nicholas Sze added a comment -

        4647_20081113.patch: added try-finally for closing DFSClient.

        Show
        Tsz Wo Nicholas Sze added a comment - 4647_20081113.patch: added try-finally for closing DFSClient.
        Hide
        Hairong Kuang added a comment -

        I prefer not to change the signature of lostFoundMove and then do the try-catch in lostFoundMove.

        Show
        Hairong Kuang added a comment - I prefer not to change the signature of lostFoundMove and then do the try-catch in lostFoundMove.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        4647_20081113b.patch: incorporated Hairong's comment.

        Show
        Tsz Wo Nicholas Sze added a comment - 4647_20081113b.patch: incorporated Hairong's comment.
        Hide
        Hairong Kuang added a comment -

        +1

        Show
        Hairong Kuang added a comment - +1
        Hide
        dhruba borthakur added a comment -

        Does this mean that the NameNode might leak a few socket descriptors every time an fsck is invoked?

        Show
        dhruba borthakur added a comment - Does this mean that the NameNode might leak a few socket descriptors every time an fsck is invoked?
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12393900/4647_20081113b.patch
        against trunk revision 714107.

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

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

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

        -1 core tests. The patch failed core unit tests.

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3596/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3596/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3596/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3596/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/12393900/4647_20081113b.patch against trunk revision 714107. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3596/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3596/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3596/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3596/console This message is automatically generated.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        > Does this mean that the NameNode might leak a few socket descriptors every time an fsck is invoked?

        This is probably the case. Also, it leak a thread each time in 0.17. All this leaking happen when running fsck with -move.

        Show
        Tsz Wo Nicholas Sze added a comment - > Does this mean that the NameNode might leak a few socket descriptors every time an fsck is invoked? This is probably the case. Also, it leak a thread each time in 0.17. All this leaking happen when running fsck with -move.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        In build #3596, TestFsck failed at line 77: DFSTestUtil.waitReplication(...) during the test setup. Fsck was not involved yet. There are a lot of following messages in the log.

        [junit] 2008-11-17 11:19:37,661 INFO  FSNamesystem.audit (FSNamesystem.java:logAuditEvent(107)) - ugi=hudson,hudson
        	ip=/127.0.0.1	cmd=open	src=/srcdat/57758981436956897	dst=null	perm=null
        [junit] File /srcdat/57758981436956897 has replication factor 4
        [junit] Waiting for replication factor to drain
        

        It seems that the file 57758981436956897 somehow has replication factor 4 and won't drain back to 3.

        Show
        Tsz Wo Nicholas Sze added a comment - In build #3596, TestFsck failed at line 77: DFSTestUtil.waitReplication(...) during the test setup. Fsck was not involved yet. There are a lot of following messages in the log. [junit] 2008-11-17 11:19:37,661 INFO FSNamesystem.audit (FSNamesystem.java:logAuditEvent(107)) - ugi=hudson,hudson ip=/127.0.0.1 cmd=open src=/srcdat/57758981436956897 dst=null perm=null [junit] File /srcdat/57758981436956897 has replication factor 4 [junit] Waiting for replication factor to drain It seems that the file 57758981436956897 somehow has replication factor 4 and won't drain back to 3.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        4647_20081118.patch: fixed the test setting a short blockreport interval.

        Show
        Tsz Wo Nicholas Sze added a comment - 4647_20081118.patch: fixed the test setting a short blockreport interval.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12394205/4647_20081118.patch
        against trunk revision 719651.

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

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

        +1 javadoc. The javadoc tool did not generate any warning messages.

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

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3622/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3622/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3622/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3622/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/12394205/4647_20081118.patch against trunk revision 719651. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3622/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3622/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3622/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3622/console This message is automatically generated.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        4647_20081118_0.18.patch: for 0.18

        Show
        Tsz Wo Nicholas Sze added a comment - 4647_20081118_0.18.patch: for 0.18
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I just committed this.

        Show
        Tsz Wo Nicholas Sze added a comment - I just committed this.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-trunk #668 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/668/)
        . NamenodeFsck should close the DFSClient it has created. (szetszwo)

        Show
        Hudson added a comment - Integrated in Hadoop-trunk #668 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/668/ ) . NamenodeFsck should close the DFSClient it has created. (szetszwo)

          People

          • Assignee:
            Tsz Wo Nicholas Sze
            Reporter:
            Tsz Wo Nicholas Sze
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development