[ https://issues.apache.org/jira/browse/HDFS-14219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16770796#comment-16770796 ]
Tao Jie commented on HDFS-14219: -------------------------------- I checked code in FsDatasetImpl.java, it seems missed one line change in HDFS-10682 when it was merged into branch-2.8.x {code} List<FsVolumeImpl> curVolumes = null; - synchronized(this) { + try (AutoCloseableLock lock = datasetLock.acquire()) { curVolumes = volumes.getVolumes(); for (FsVolumeSpi v : curVolumes) { builders.put(v.getStorageID(), BlockListAsLongs.builder(maxDataLength)); {code} [~vagarychen], [~arpitagarwal] would you have a look at this patch? > ConcurrentModificationException occurs in datanode occasionally > --------------------------------------------------------------- > > Key: HDFS-14219 > URL: https://issues.apache.org/jira/browse/HDFS-14219 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 2.8.2 > Reporter: Tao Jie > Priority: Minor > Attachments: HDFS-14219.001.patch > > > ERROR occasionally occurs in datanode log: > ERROR BPServiceActor.java:792 - Exception in BPOfferService for Block pool > BP-1687106048-10.14.9.17-1535259994856 (Datanode Uuid > c17e635a-912f-4488-b4e8-93a58a27b5db) service to osscmh-9-21/10.14.9.21:8070 > java.util.ConcurrentModificationException: modification=62852685 != > iterModification = 62852684 > at > org.apache.hadoop.util.LightWeightGSet$SetIterator.ensureNext(LightWeightGSet.java:305) > at > org.apache.hadoop.util.LightWeightGSet$SetIterator.hasNext(LightWeightGSet.java:322) > at > org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.getBlockReports(FsDatasetImpl.java:1872) > at > org.apache.hadoop.hdfs.server.datanode.BPServiceActor.blockReport(BPServiceActor.java:349) > at > org.apache.hadoop.hdfs.server.datanode.BPServiceActor.offerService(BPServiceActor.java:648) > at > org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:790) > at java.lang.Thread.run(Thread.java:745) -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org