hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7066) LazyWriter#evictBlocks misses a null check for replicaState
Date Thu, 02 Oct 2014 13:05:06 GMT

    [ https://issues.apache.org/jira/browse/HDFS-7066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14156551#comment-14156551
] 

Hudson commented on HDFS-7066:
------------------------------

FAILURE: Integrated in Hadoop-Mapreduce-trunk #1914 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1914/])
HDFS-7066. LazyWriter#evictBlocks misses a null check for replicaState. (Contributed by Xiaoyu
Yao) (arp: rev a4dcbaa33255cd1dd8d6c54763f55486c9e4317c)
* hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
* hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt


> LazyWriter#evictBlocks misses a null check for replicaState
> -----------------------------------------------------------
>
>                 Key: HDFS-7066
>                 URL: https://issues.apache.org/jira/browse/HDFS-7066
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode
>    Affects Versions: HDFS-6581
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HDFS-7066.0.patch
>
>
> LazyWriter#evictBlocks (added for HDFS-6581) misses a null check for replicaState. As
a result, there are many NPEs in the debug log under certain conditions. 
> {code}
> 2014-09-15 14:27:10,820 DEBUG impl.FsDatasetImpl (FsDatasetImpl.java:evictBlocks(2335))
- Evicting block null
> 2014-09-15 14:27:10,821 WARN  impl.FsDatasetImpl (FsDatasetImpl.java:run(2409)) - Ignoring
exception in LazyWriter:
> java.lang.NullPointerException
> 	at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl$LazyWriter.evictBlocks(FsDatasetImpl.java:2343)
> 	at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl$LazyWriter.run(FsDatasetImpl.java:2396)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}
> The proposed fix is to break if there is no candidate available to evict.
> {code}
> 	while (iterations++ < MAX_BLOCK_EVICTIONS_PER_ITERATION &&
>             transientFreeSpaceBelowThreshold()) {
>            LazyWriteReplicaTracker.ReplicaState replicaState =
>                lazyWriteReplicaTracker.getNextCandidateForEviction();
>            ++++++++++++++++++++
> 	    if (replicaState == null) {
>               break;
>            }
>            ++++++++++++++++++++
>            if (LOG.isDebugEnabled()) {
>              LOG.debug("Evicting block " + replicaState);
>            }
> {code}



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

Mime
View raw message