You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ZanderXu (Jira)" <ji...@apache.org> on 2026/04/22 07:03:00 UTC

[jira] [Assigned] (HDFS-17893) NPE in DFSStripedInputStream.readWithStrategy

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

ZanderXu reassigned HDFS-17893:
-------------------------------

    Assignee: Dave Marion

> 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
>            Assignee: Dave Marion
>            Priority: Major
>              Labels: pull-request-available
>
> [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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org