Dave Marion created HDFS-17893:
----------------------------------
Summary: NPE in DFSStripedInputStream.readWithStrategy
Key: HDFS-17893
URL: https://issues.apache.org/jira/browse/HDFS-17893
Project: Hadoop HDFS
Issue Type: Bug
Components: ec
Affects Versions: 3.5.0
Reporter: Dave Marion
[DFSStripedInputStream.readWithStrategy|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedInputStream.java#L391]
checks to see if it is closed, then enters a retry loop where it ends up
calling *readOneStripe* (line 421). *readOneStripe* calls *readStripe* on the
{*}StatefulStripeReader{*}, which defaults to its parent class
{*}StripeReader{*}. *StripeReader.readStripe* (line 356) on an exception calls
close on the *DFSStripedInputStream* which ends up setting *decoder* to null.
*DFSStripedInputStream.readWithStrategy* catches the IOException and retries
calling *readOneStripe* again, which throws a NullPointerException in the call
to *resetCurStripeBuffer* because the *decoder* is null when *useDirectBuffer*
is called.
With the retries that DFSStripedInputStream is doing in readWithStrategy, it's
likely that either the StripedReader should not be closing the
DFSStripedInputStream, or the closed check needs to happen again at the top of
the retry loop.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]