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 9763C10AD8 for ; Tue, 17 Dec 2013 20:44:07 +0000 (UTC) Received: (qmail 12596 invoked by uid 500); 17 Dec 2013 20:44:07 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 12553 invoked by uid 500); 17 Dec 2013 20:44:07 -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 12544 invoked by uid 99); 17 Dec 2013 20:44:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 20:44:07 +0000 Date: Tue, 17 Dec 2013 20:44:07 +0000 (UTC) From: "Brandon Li (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-5657) race condition causes writeback state error in NFS gateway 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-5657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13850873#comment-13850873 ] Brandon Li commented on HDFS-5657: ---------------------------------- Thank you, Jing, for reviewing the patch and proposing the new solution. I've committed the patch. > race condition causes writeback state error in NFS gateway > ---------------------------------------------------------- > > Key: HDFS-5657 > URL: https://issues.apache.org/jira/browse/HDFS-5657 > Project: Hadoop HDFS > Issue Type: Bug > Components: nfs > Reporter: Brandon Li > Assignee: Brandon Li > Attachments: HDFS-5657.001.patch, HDFS-5657.002.patch, HDFS-5657.new.001.patch, HDFS-5657.new.002.patch > > > A race condition between NFS gateway writeback executor thread and new write handler thread can cause writeback state check failure, e.g., > {noformat} > 2013-11-26 10:34:07,859 DEBUG nfs3.RpcProgramNfs3 (Nfs3Utils.java:writeChannel(113)) - WRITE_RPC_CALL_END______957880843 > 2013-11-26 10:34:07,863 DEBUG nfs3.OpenFileCtx (OpenFileCtx.java:offerNextToWrite(832)) - The asyn write task has no pending writes, fileId: 30938 > 2013-11-26 10:34:07,871 ERROR nfs3.AsyncDataService (AsyncDataService.java:run(136)) - Asyn data service got error:java.lang.IllegalStateException: The openFileCtx has false async status > at com.google.common.base.Preconditions.checkState(Preconditions.java:145) > at org.apache.hadoop.hdfs.nfs.nfs3.OpenFileCtx.executeWriteBack(OpenFileCtx.java:890) > at org.apache.hadoop.hdfs.nfs.nfs3.AsyncDataService$WriteBackTask.run(AsyncDataService.java:134) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > 2013-11-26 10:34:07,901 DEBUG nfs3.RpcProgramNfs3 (RpcProgramNfs3.java:write(707)) - requesed offset=917504 and current filesize=917504 > 2013-11-26 10:34:07,902 DEBUG nfs3.WriteManager (WriteManager.java:handleWrite(131)) - handleWrite fileId: 30938 offset: 917504 length:65536 stableHow:0 > {noformat} -- This message was sent by Atlassian JIRA (v6.1.4#6159)