Issue Details (XML | Word | Printable)

Key: HADOOP-4399
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Pete Wyckoff
Reporter: Pete Wyckoff
Votes: 0
Watchers: 1
Operations

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

fuse-dfs per FD context is not thread safe and can cause segfaults and corruptions

Created: 13/Oct/08 12:56 AM   Updated: 08/Jul/09 05:05 PM
Return to search
Component/s: None
Affects Version/s: 0.19.0
Fix Version/s: 0.18.2

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works HADOOP-4399.1.txt 2008-10-13 06:13 PM Pete Wyckoff 7 kB
Text File Licensed for inclusion in ASF works HADOOP-4399.2.txt 2008-10-16 05:44 PM Pete Wyckoff 50 kB
Text File Licensed for inclusion in ASF works HADOOP-4399.3.txt 2008-10-16 09:12 PM Pete Wyckoff 50 kB
Text File TEST-TestFuseDFS.txt 2008-10-16 05:42 PM Pete Wyckoff 35 kB
Text File TEST-TestFuseDFS.txt 2008-10-13 11:38 PM Pete Wyckoff 33 kB
Issue Links:
Reference
 

Hadoop Flags: Reviewed
Resolution Date: 20/Oct/08 05:12 AM


 Description  « Hide
for reads, optimal solution would be to have a per thread (per FD) context - including the buffer. Otherwise, protect the FD context with a mutex as in hadoop-4397 and hadoop-4398.

for writes, should just protect the context with a mutex as in hadoop-4398.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pete Wyckoff added a comment - 13/Oct/08 06:13 PM
building on hadoop-4397, I did the following:

1. protect dfs_read accesses to the read buffer with a critical section based on a per file handle mutex.
2. open inits the per file handle mutex
3. release destroys the mutex

Also put a comment in dfs_getattr and a "soft" assertion that dfs->fs global filesystem handle is already set in dfs_init.

No new tests as this is a concurrency fix, but all the existing 10 tests pass.


Hadoop QA added a comment - 13/Oct/08 08:49 PM
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12392026/HADOOP-4399.1.txt
against trunk revision 704186.

+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/3451/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3451/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3451/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3451/console

This message is automatically generated.


Pete Wyckoff added a comment - 13/Oct/08 09:30 PM
TestJobQueueInformation failed because of https://issues.apache.org/jira/browse/HADOOP-4378.

Zheng Shao added a comment - 13/Oct/08 11:36 PM
+1 Code looks good.

Pete Wyckoff added a comment - 13/Oct/08 11:38 PM
the (successful) output of ant -Dlibhdfs=1 -Dfusedfs=1 -Dtestcase=TestFuseDFS

Pete Wyckoff added a comment - 14/Oct/08 01:30 AM
ready to commit.

Pete Wyckoff added a comment - 16/Oct/08 05:41 PM
this patch it turns out did not capture all concurrency problems.

Pete Wyckoff added a comment - 16/Oct/08 05:42 PM
newest patch's output of ant -Dlibhdfs=1 -Dfusedfs=1 -Dtestcase=TestFuseDFS test-contrib.

Pete Wyckoff added a comment - 16/Oct/08 05:44 PM
this is the ubber patch that fixes all concurrency issues for all .

Pete Wyckoff added a comment - 16/Oct/08 05:44 PM
submitting for hudson.

Pete Wyckoff added a comment - 16/Oct/08 09:12 PM
fixed some comments.

Zheng Shao added a comment - 17/Oct/08 12:54 AM
+1
Talked with Pete. Looks good to me.

Hadoop QA added a comment - 17/Oct/08 03:05 AM
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12392297/HADOOP-4399.3.txt
against trunk revision 705420.

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

+1 tests included. The patch appears to include 18 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/3479/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3479/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3479/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3479/console

This message is automatically generated.


Pete Wyckoff added a comment - 17/Oct/08 06:18 PM
this is ready to commit please.
thx, pete

dhruba borthakur added a comment - 20/Oct/08 05:12 AM
I just committed this. Thanks Pete!

dhruba borthakur added a comment - 20/Oct/08 06:26 PM
This fix is needed for 0.18.2 release as well.

Hudson added a comment - 23/Oct/08 09:56 PM