Details
Description
INode.java
public String getFullPathName() { // Get the full path name of this inode. if (isRoot()) { return Path.SEPARATOR; } // compute size of needed bytes for the path int idx = 0; for (INode inode = this; inode != null; inode = inode.getParent()) { // add component + delimiter (if not tail component) idx += inode.getLocalNameBytes().length + (inode != this ? 1 : 0); } byte[] path = new byte[idx]; for (INode inode = this; inode != null; inode = inode.getParent()) { if (inode != this) { path[--idx] = Path.SEPARATOR_CHAR; } byte[] name = inode.getLocalNameBytes(); idx -= name.length; System.arraycopy(name, 0, path, idx, name.length); } return DFSUtil.bytes2String(path); }
We found ArrayIndexOutOfBoundsException at System.arraycopy(name, 0, path, idx, name.length) when ReplicaMonitor work ,and the NameNode will quit.
It seems the two loop is not synchronized, the path's length is changed.
Attachments
Attachments
Issue Links
- is broken by
-
HDFS-10674 Optimize creating a full path from an inode
-
- Resolved
-
- is related to
-
HDFS-12856 BlockReconstructionWork.chooseTargets() violates namesystem locking
-
- Open
-
- relates to
-
HDFS-15366 Active NameNode went down with NPE
-
- Open
-