[ 
https://issues.apache.org/jira/browse/HDFS-9445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Walter Su updated HDFS-9445:
----------------------------
    Attachment: HDFS-9445.01.patch

Sorry for late update. Let's get it done.
{code}
// If a DFSClient has the replica in its cache of short-circuit file
// descriptors (and the client is using ShortCircuitShm), invalidate it.
datanode.getShortCircuitRegistry().processBlockInvalidation(
          new ExtendedBlockId(invalidBlks[i].getBlockId(), bpid));

// If the block is cached, start uncaching it.
cacheManager.uncacheBlock(bpid, invalidBlks[i].getBlockId());
{code}
The 2 lines are copied from _public void invalidate(..)_. It's a clean-up after 
remove blocks from volumeMap.  Those 2 lines are the only part same as 
{{invalidate}}.
These lines look unrelated. So it's hard to pick a proper func name for them.
Those 2 lines don't require inside the FSDatasetLock.
I just moved them to {{removeVolumes}}. Let me know if it's ok to you.

> Deadlock in datanode
> --------------------
>
>                 Key: HDFS-9445
>                 URL: https://issues.apache.org/jira/browse/HDFS-9445
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.7.2
>            Reporter: Kihwal Lee
>            Assignee: Walter Su
>            Priority: Blocker
>         Attachments: HDFS-9445.00.patch, HDFS-9445.01.patch
>
>
> {noformat}
> Found one Java-level deadlock:
> =============================
> "DataXceiver for client DFSClient_attempt_xxx at /1.2.3.4:100 [Sending block 
> BP-xxxxx:blk_123_456]":
>   waiting to lock monitor 0x00007f77d0731768 (object 0x00000000d60d9930, a 
> org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl),
>   which is held by "Thread-565"
> "Thread-565":
>   waiting for ownable synchronizer 0x00000000d55613c8, (a 
> java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync),
>   which is held by "DataNode: heartbeating to my-nn:8020"
> "DataNode: heartbeating to my-nn:8020":
>   waiting to lock monitor 0x00007f77d0731768 (object 0x00000000d60d9930, a 
> org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl),
>   which is held by "Thread-565"
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to