Issue Details (XML | Word | Printable)

Key: HADOOP-2891
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: dhruba borthakur
Reporter: Mahadev konar
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

The dfsclient on exit deletes files that are open and not closed.

Created: 25/Feb/08 09:51 PM   Updated: 21/May/08 08:05 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.17.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works abandonFile.patch 2008-02-27 07:00 PM dhruba borthakur 4 kB
Text File Licensed for inclusion in ASF works abandonFile.patch 2008-02-26 10:31 PM dhruba borthakur 3 kB
Text File Licensed for inclusion in ASF works abandonFile.patch 2008-02-26 10:12 PM dhruba borthakur 3 kB
Text File Licensed for inclusion in ASF works abandonFile2.patch 2008-02-29 12:31 AM dhruba borthakur 1 kB
Issue Links:
Reference
 

Resolution Date: 29/Feb/08 06:19 AM


 Description  « Hide
the dfsclient has a shutdown hook that deletes files that have been left open but not closed. We should not be cleaning up files that have been open and not closed.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
dhruba borthakur added a comment - 26/Feb/08 10:12 PM
The close method of the DFSClient closes all open files (instead of abandoning them).

Mahadev konar added a comment - 26/Feb/08 10:27 PM
patch looks good..

1)
for the test case

could you just have

assertTrue(file1 + " does not exist.",
+ fs.exists(file1) )

rather than

assertTrue(file1 + " does not exist.",
+ fs.exists(file1) == true);
+

2) also it would be a good thing to have the check

if (out !=null) {
out.close()
}


dhruba borthakur added a comment - 26/Feb/08 10:31 PM
Incorporated mahadev's code review comments.

Hadoop QA added a comment - 27/Feb/08 06:24 PM
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12376561/abandonFile.patch
against trunk revision 619744.

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

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

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

javac -1. The applied patch generated 620 javac compiler warnings (more than the trunk's current 619 warnings).

release audit +1. The applied patch does not generate any new release audit warnings.

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

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

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

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1848/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1848/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1848/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1848/console

This message is automatically generated.


dhruba borthakur added a comment - 27/Feb/08 07:00 PM
Fix warnings.

Hadoop QA added a comment - 28/Feb/08 04:48 AM
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12376659/abandonFile.patch
against trunk revision 619744.

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

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

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

javac +1. The applied patch does not generate any new javac compiler warnings.

release audit +1. The applied patch does not generate any new release audit warnings.

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

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

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

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1856/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1856/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1856/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1856/console

This message is automatically generated.


dhruba borthakur added a comment - 28/Feb/08 02:16 PM
The previous test failure from Hudson does not seem to be related to this patch. Resubmitting.

Hadoop QA added a comment - 28/Feb/08 03:47 PM
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12376659/abandonFile.patch
against trunk revision 619744.

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

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

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

javac +1. The applied patch does not generate any new javac compiler warnings.

release audit +1. The applied patch does not generate any new release audit warnings.

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

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

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

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1861/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1861/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1861/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1861/console

This message is automatically generated.


Hadoop QA added a comment - 28/Feb/08 10:47 PM
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12376659/abandonFile.patch
against trunk revision 619744.

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

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

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

javac +1. The applied patch does not generate any new javac compiler warnings.

release audit +1. The applied patch does not generate any new release audit warnings.

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

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

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

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1865/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1865/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1865/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1865/console

This message is automatically generated.


dhruba borthakur added a comment - 29/Feb/08 12:21 AM
This introduces a deadlock that I am going to submit a patch.

dhruba borthakur added a comment - 29/Feb/08 12:31 AM
This fixes the deadlock introduced by the previous patch. The locking heirarchy ias as follows:

1. The DFS Client lock.
2. The pendingCreates lock
3. The DFSOutputStream lock.


Hadoop QA added a comment - 29/Feb/08 03:58 AM
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12376781/abandonFile2.patch
against trunk revision 619744.

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

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

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

javac +1. The applied patch does not generate any new javac compiler warnings.

release audit +1. The applied patch does not generate any new release audit warnings.

findbugs -1. The patch appears to introduce 1 new Findbugs warnings.

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

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

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1870/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1870/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1870/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1870/console

This message is automatically generated.


dhruba borthakur added a comment - 29/Feb/08 06:18 AM
The bug is demonstrated by unit test failure in TestMiniMRDFSSort, no separate unit test necessary. Regarding the findbugs warning, "findbugs" in able to detect that one thread is closed() and joined() before the "streamer" variable is accessed, thus it is safe and is not a bug.

dhruba borthakur added a comment - 29/Feb/08 06:19 AM
I just committed thi.s

Hudson added a comment - 29/Feb/08 12:52 PM