Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F91CD8E4 for ; Tue, 28 Aug 2012 10:48:10 +0000 (UTC) Received: (qmail 34316 invoked by uid 500); 28 Aug 2012 10:48:10 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 34033 invoked by uid 500); 28 Aug 2012 10:48:09 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 33955 invoked by uid 99); 28 Aug 2012 10:48:09 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Aug 2012 10:48:09 +0000 Date: Tue, 28 Aug 2012 21:48:09 +1100 (NCT) From: "Suresh Srinivas (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <223550380.5591.1346150889629.JavaMail.jiratomcat@arcas> In-Reply-To: <1285687004.4064.1346110807862.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HDFS-3860) HeartbeatManager#Monitor may wrongly hold the writelock of namesystem MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443058#comment-13443058 ] Suresh Srinivas commented on HDFS-3860: --------------------------------------- BTW could you please also ensure that this pattern of code is not repeated in any other places. > HeartbeatManager#Monitor may wrongly hold the writelock of namesystem > --------------------------------------------------------------------- > > Key: HDFS-3860 > URL: https://issues.apache.org/jira/browse/HDFS-3860 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 3.0.0 > Reporter: Jing Zhao > Assignee: Jing Zhao > Attachments: HDFS-3860.patch, HDFS-heartbeat-testcase.patch > > > In HeartbeatManager#heartbeatCheck, if some dead datanode is found, the monitor thread will acquire the write lock of namesystem, and recheck the safemode. If it is in safemode, the monitor thread will return from the heartbeatCheck function without release the write lock. This may cause the monitor thread wrongly holding the write lock forever. > The attached test case tries to simulate this bad scenario. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira