You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Hairong Kuang (JIRA)" <ji...@apache.org> on 2009/09/21 08:00:18 UTC
[jira] Created: (HDFS-637) DataNode sends an Success ack when block
write fails
DataNode sends an Success ack when block write fails
----------------------------------------------------
Key: HDFS-637
URL: https://issues.apache.org/jira/browse/HDFS-637
Project: Hadoop HDFS
Issue Type: Bug
Components: data-node
Reporter: Hairong Kuang
Assignee: Hairong Kuang
Priority: Blocker
Fix For: 0.21.0
When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-637) DataNode sends a Success ack when
block write fails
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760403#action_12760403 ]
Hudson commented on HDFS-637:
-----------------------------
Integrated in Hadoop-Hdfs-trunk-Commit #57 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/57/])
> DataNode sends a Success ack when block write fails
> ---------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch, interrupted1.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-637) DataNode sends an Success ack when block
write fails
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang updated HDFS-637:
-------------------------------
Attachment: interrupted.patch
This patch should fix the bug.
> DataNode sends an Success ack when block write fails
> ----------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HDFS-637) DataNode sends a Success ack when block
write fails
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang resolved HDFS-637.
--------------------------------
Resolution: Fixed
I've just committed this.
> DataNode sends a Success ack when block write fails
> ---------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch, interrupted1.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-637) DataNode sends an Success ack when block
write fails
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang updated HDFS-637:
-------------------------------
Attachment: interrupted1.patch
Ok, whatever is easier for your future change, I will do it for you.
> DataNode sends an Success ack when block write fails
> ----------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch, interrupted1.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-637) DataNode sends an Success ack when
block write fails
Posted by "Kan Zhang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758456#action_12758456 ]
Kan Zhang commented on HDFS-637:
--------------------------------
I like Raghu's suggestion, which is to simply set a boolean flag in the catch clause (the clause has to be moved to the outset) and add a checking of the flag to the if (Thread.interrupted()) {} block. That way the exit logic is easier to understand (with the comments there). Having the exit logic in one place also facilitates adding further checking on the reason of the interrupt (i.e., local error or downstream error).
> DataNode sends an Success ack when block write fails
> ----------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-637) DataNode sends a Success ack when block
write fails
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang updated HDFS-637:
-------------------------------
Hadoop Flags: [Reviewed]
Summary: DataNode sends a Success ack when block write fails (was: DataNode sends an Success ack when block write fails)
> DataNode sends a Success ack when block write fails
> ---------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch, interrupted1.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-637) DataNode sends an Success ack when
block write fails
Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758906#action_12758906 ]
Hairong Kuang commented on HDFS-637:
------------------------------------
All unit tests passed. Test patch result:
[exec] +1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] -1 tests included. The patch doesn't appear to include any new or modified tests.
[exec] Please justify why no new tests are needed for this patch.
[exec] Also please list what manual steps were performed to verify this patch.
[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 release audit. The applied patch does not increase the total number of release audit warnings.
Unit test is not included because HDFS-624 exposed the bug and with this patch the previously failed test is passed.
> DataNode sends an Success ack when block write fails
> ----------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch, interrupted1.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-637) DataNode sends a Success ack when
block write fails
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763873#action_12763873 ]
Hudson commented on HDFS-637:
-----------------------------
Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #20 (See [http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/20/])
> DataNode sends a Success ack when block write fails
> ---------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch, interrupted1.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-637) DataNode sends a Success ack when
block write fails
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760592#action_12760592 ]
Hudson commented on HDFS-637:
-----------------------------
Integrated in Hadoop-Hdfs-trunk #98 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/98/])
> DataNode sends a Success ack when block write fails
> ---------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch, interrupted1.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-637) DataNode sends an Success ack when
block write fails
Posted by "Kan Zhang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758513#action_12758513 ]
Kan Zhang commented on HDFS-637:
--------------------------------
+1 for the patch.
> DataNode sends an Success ack when block write fails
> ----------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch, interrupted1.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-637) DataNode sends a Success ack when
block write fails
Posted by "gary murry (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760664#action_12760664 ]
gary murry commented on HDFS-637:
---------------------------------
No new unit tests were added because it was found with TestFileAppend3#TC7, which can act as a regression test.
> DataNode sends a Success ack when block write fails
> ---------------------------------------------------
>
> Key: HDFS-637
> URL: https://issues.apache.org/jira/browse/HDFS-637
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Blocker
> Fix For: 0.21.0
>
> Attachments: interrupted.patch, interrupted1.patch
>
>
> When I work on HDFS-624, I saw TestFileAppend3#TC7 occasionally fails. After lots of debug, I saw that the client unexpected received a response of "-2 SUCCESS SUCCESS" in which -2 is the packet sequence number. This happened in a pipeline of 2 datanodes and one of them failed. It turned out when block receiver fails, it shuts down itself and interrupts the packet responder but responder tries to handle interruption with the condition "Thread.isInterrupted()" but unfortunately a thread's interrupt status is not set in some cases as explained in the Thread#interrupt javadoc:
> If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
> So datanode does not detect the interruption and continues as if no error occurs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.