Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DB78F2004F5 for ; Fri, 1 Sep 2017 18:34:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D9D1016C97A; Fri, 1 Sep 2017 16:34:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0566216C970 for ; Fri, 1 Sep 2017 18:34:12 +0200 (CEST) Received: (qmail 18375 invoked by uid 500); 1 Sep 2017 16:34:11 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 18364 invoked by uid 99); 1 Sep 2017 16:34:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2017 16:34:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3993B1839A9 for ; Fri, 1 Sep 2017 16:34:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id OhVjHmSb1oes for ; Fri, 1 Sep 2017 16:34:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E0EB05F1E7 for ; Fri, 1 Sep 2017 16:34:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 17CCCE0C18 for ; Fri, 1 Sep 2017 16:34:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id D14B32414F for ; Fri, 1 Sep 2017 16:34:01 +0000 (UTC) Date: Fri, 1 Sep 2017 16:34:01 +0000 (UTC) From: "Istvan Fajth (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11515) -du throws ConcurrentModificationException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 01 Sep 2017 16:34:14 -0000 [ https://issues.apache.org/jira/browse/HDFS-11515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16150796#comment-16150796 ] Istvan Fajth commented on HDFS-11515: ------------------------------------- Hi [~wchevreuil], thank you for the hints, that could have been a solution as well, I believe I was afraid that the structure can be large, and did not wanted to duplicate it, and I was as well not sure what can happen as the problem was stemming from the fact that the deleted inodes was not discovered recursively in the tree as I remember, so with a copy we would have INodes that are left out from the calculation. [~andrew.wang] I am not sure why this issue was reopened, could you please clarify? As far as I know, HDFS-10797 was reverted, along with my patch here due to HDFS-11661 and I do not see anything we need to do with this one, as after reverting HDFS-10797 this is more or less becomes a "Not a bug" or a "Won't fix" as I think. > -du throws ConcurrentModificationException > ------------------------------------------ > > Key: HDFS-11515 > URL: https://issues.apache.org/jira/browse/HDFS-11515 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode, shell > Affects Versions: 2.8.0, 3.0.0-alpha2 > Reporter: Wei-Chiu Chuang > Assignee: Istvan Fajth > Attachments: HDFS-11515.001.patch, HDFS-11515.002.patch, HDFS-11515.003.patch, HDFS-11515.004.patch, HDFS-11515.test.patch > > > HDFS-10797 fixed a disk summary (-du) bug, but it introduced a new bug. > The bug can be reproduced running the following commands: > {noformat} > bash-4.1$ hdfs dfs -mkdir /tmp/d0 > bash-4.1$ hdfs dfsadmin -allowSnapshot /tmp/d0 > Allowing snaphot on /tmp/d0 succeeded > bash-4.1$ hdfs dfs -touchz /tmp/d0/f4 > bash-4.1$ hdfs dfs -mkdir /tmp/d0/d1 > bash-4.1$ hdfs dfs -createSnapshot /tmp/d0 s1 > Created snapshot /tmp/d0/.snapshot/s1 > bash-4.1$ hdfs dfs -mkdir /tmp/d0/d1/d2 > bash-4.1$ hdfs dfs -mkdir /tmp/d0/d1/d3 > bash-4.1$ hdfs dfs -mkdir /tmp/d0/d1/d2/d4 > bash-4.1$ hdfs dfs -mkdir /tmp/d0/d1/d3/d5 > bash-4.1$ hdfs dfs -createSnapshot /tmp/d0 s2 > Created snapshot /tmp/d0/.snapshot/s2 > bash-4.1$ hdfs dfs -rmdir /tmp/d0/d1/d2/d4 > bash-4.1$ hdfs dfs -rmdir /tmp/d0/d1/d2 > bash-4.1$ hdfs dfs -rmdir /tmp/d0/d1/d3/d5 > bash-4.1$ hdfs dfs -rmdir /tmp/d0/d1/d3 > bash-4.1$ hdfs dfs -du -h /tmp/d0 > du: java.util.ConcurrentModificationException > 0 0 /tmp/d0/f4 > {noformat} > A ConcurrentModificationException forced du to terminate abruptly. > Correspondingly, NameNode log has the following error: > {noformat} > 2017-03-08 14:32:17,673 WARN org.apache.hadoop.ipc.Server: IPC Server handler 4 on 8020, call org.apache.hadoop.hdfs.protocol.ClientProtocol.getContentSumma > ry from 10.0.0.198:49957 Call#2 Retry#0 > java.util.ConcurrentModificationException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:922) > at java.util.HashMap$KeyIterator.next(HashMap.java:956) > at org.apache.hadoop.hdfs.server.namenode.ContentSummaryComputationContext.tallyDeletedSnapshottedINodes(ContentSummaryComputationContext.java:209) > at org.apache.hadoop.hdfs.server.namenode.INode.computeAndConvertContentSummary(INode.java:507) > at org.apache.hadoop.hdfs.server.namenode.FSDirectory.getContentSummary(FSDirectory.java:2302) > at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:4535) > at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1087) > at org.apache.hadoop.hdfs.server.namenode.AuthorizationProviderProxyClientProtocol.getContentSummary(AuthorizationProviderProxyClientProtocol.java:5 > 63) > at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.jav > a:873) > at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) > at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:617) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1073) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2216) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2212) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:415) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1920) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2210) > {noformat} > The bug is due to a improper use of HashSet, not concurrent operations. Basically, a HashSet can not be updated while an iterator is traversing it. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org