FAQ
DFSClient block read failures cause open DFSInputStream to become unusable
--------------------------------------------------------------------------

Key: HADOOP-4681
URL: https://issues.apache.org/jira/browse/HADOOP-4681
Project: Hadoop Core
Issue Type: Bug
Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
Reporter: Igor Bolotin
Fix For: 0.19.1, 0.20.0


We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.

When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
at java.io.DataInputStream.read(DataInputStream.java:132)
at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
...

The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.

The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).

This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Search Discussions

  • Igor Bolotin (JIRA) at Nov 18, 2008 at 9:50 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Igor Bolotin updated HADOOP-4681:
    ---------------------------------

    Attachment: 4681.patch

    Patch for 0.19 attached
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.1, 0.20.0

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Igor Bolotin (JIRA) at Nov 18, 2008 at 9:56 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Igor Bolotin updated HADOOP-4681:
    ---------------------------------

    Status: Patch Available (was: Open)

    The patch seems to be applicable both for trunk and for 0.19 branch.
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.1, 0.20.0

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Hadoop QA (JIRA) at Nov 21, 2008 at 8:28 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649789#action_12649789 ]

    Hadoop QA commented on HADOOP-4681:
    -----------------------------------

    -1 overall. Here are the results of testing the latest attachment
    http://issues.apache.org/jira/secure/attachment/12394193/4681.patch
    against trunk revision 719431.

    +1 @author. The patch does not contain any @author tags.

    -1 tests included. The patch doesn't appear to include any new or modified tests.
    Please justify why no tests are needed for this patch.

    +1 javadoc. The javadoc tool did not generate any warning messages.

    +1 javac. The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs. The patch does not introduce any new Findbugs warnings.

    +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

    -1 core tests. The patch failed core unit tests.

    +1 contrib tests. The patch passed contrib unit tests.

    Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3621/testReport/
    Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3621/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
    Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3621/artifact/trunk/build/test/checkstyle-errors.html
    Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3621/console

    This message is automatically generated.
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.1, 0.20.0

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Chris Douglas (JIRA) at Nov 25, 2008 at 11:58 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650802#action_12650802 ]

    Chris Douglas commented on HADOOP-4681:
    ---------------------------------------

    The current patch causes about 2x (st x=dfs.client.max.block.acquire.failures) the number retries for an unrecoverable block. It really retries at N\*x, where N is the initial value of {{retries}} in DFSClint.DFSInputStream::read. To be fair, it looks like the current code exercises the same retry logic, but without resetting {{failures}}, the first exhaustion of sources causes it to bail out. It's not clear what the semantics are supposed to be in this case, but it's worth noting that this patch would change them.

    bq. This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    IIRC, the intent of HADOOP-3185 was to avoid filling the deadNodes list with good nodes hosting earler, bad blocks. It also improves on the quick fix in HADOOP-1911.

    I haven't been able to find a path where applying the patch reintroduces an infinite loop.
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.1, 0.20.0

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • dhruba borthakur (JIRA) at Jan 23, 2009 at 4:36 am
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666364#action_12666364 ]

    dhruba borthakur commented on HADOOP-4681:
    ------------------------------------------

    Hi Igor, Thanks for the patch.

    Chris, Do we still need this patch? Can you comment on whether this problem still exists in trunk? And if so, can Igor supply a unit test too?
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.1, 0.20.0

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Chris Douglas (JIRA) at Jan 23, 2009 at 5:04 am
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666377#action_12666377 ]

    Chris Douglas commented on HADOOP-4681:
    ---------------------------------------

    The patch did resolve the issue with long-lived streams introduced by HADOOP-1911 without undoing the fix; this almost certainly remains in trunk. I'd expect a unit test for this would be difficult to write...

    IIRC, it wasn't committed because the change to the retry semantics may not have been appropriate. Someone more familiar with DFSClient should make that call.
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.1, 0.20.0

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Chris Douglas (JIRA) at Feb 10, 2009 at 1:05 am
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Chris Douglas updated HADOOP-4681:
    ----------------------------------

    Component/s: dfs
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.1, 0.20.0

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • stack (JIRA) at May 24, 2009 at 3:51 am
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712493#action_12712493 ]

    stack commented on HADOOP-4681:
    -------------------------------

    +1 on patch being applied to TRUNK as well as to 0.20, and 0.19 branches. DFSClient currently in its treatment of errors is as crude in effect as California's three-strikes rule; any three errors encountered on a file no matter on which of its N blocks and the stream is ruined (See HADOOP-5903 description for more detail though HADOOP-3185 nails the issue way back).
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.2

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Raghu Angadi (JIRA) at May 26, 2009 at 9:05 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713255#action_12713255 ]

    Raghu Angadi commented on HADOOP-4681:
    --------------------------------------

    This bug exists and I don't think the current patch is the right one (yet). We probably don't need this variable at all (see below).

    Looking at how 'failures' variable is used, it is pretty limited. My guess is that it was there right from the beginning and a lot of DFSClient has changed around it since then.

    I would say we need description of what it means : i.e. when it should be incremented and why there should be a limit. That will also answer when it should be reset.

    As I see it now : it is incremented only when connect to a datanode fails. That implies, it should be reset when such connect succeeds (in chooseDataNode()).

    But this is still not enough since it does not allow DFSClient to try all the replicas available (what if number of replicas is larger than 3?). May be we should try each datanode once (or twice)...That implies we probably don't need this variable at all. Just some local counter in 'chooseDataNode()' would do.

    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.2

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Chris Douglas (JIRA) at May 27, 2009 at 1:49 am
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713370#action_12713370 ]

    Chris Douglas commented on HADOOP-4681:
    ---------------------------------------

    bq. May be we should try each datanode once (or twice)...That implies we probably don't need this variable at all. Just some local counter in 'chooseDataNode()' would do.
    Wouldn't this revert- and reintroduce- HADOOP-1911?

    bq. I would say we need description of what it means : i.e. when it should be incremented and why there should be a limit. That will also answer when it should be reset.
    +1
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.2

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Raghu Angadi (JIRA) at May 27, 2009 at 4:18 am
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713401#action_12713401 ]

    Raghu Angadi commented on HADOOP-4681:
    --------------------------------------
    Wouldn't this revert- and reintroduce- HADOOP-1911?
    I see. I just looked at HADOOP-1911 and I don't think it fixed the real problem. The loop is because of combination of reset of dead nodes in chooseDataNode() and 'while (s != null)' loop in blockSeekTo(). Note that actual failure occurs while trying to create BlockReader().. not in chooseDataNode(). The problem is that chooseDataNode() can not decide if the datanode is ok or not.. just an address for DN is not enough. we also need connect(), 'success reply' and at least a few bytes read from the datanode. So HADOOP-1911 fixed the infinite loop, but not for right reasons.

    We could define successful datanode conenction as 'being able to read non zero bytes that we need'. A failure count keeps growing until there is a 'successful connection', and should be reset after that. (Some what similar approach to HADOOP-3831).

    I think this time we should have a explicitly stated policy of when a hard failure occurs (and may be when we refetch the block data etc).


    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.2

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • stack (JIRA) at May 27, 2009 at 5:45 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713656#action_12713656 ]

    stack commented on HADOOP-4681:
    -------------------------------

    .bq We could define successful datanode conenction as 'being able to read non zero bytes that we need'. A failure count keeps growing until there is a 'successful connection', and should be reset after that. (Some what similar approach to HADOOP-3831).

    This seems reasonable to me.
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.2

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Chris Douglas (JIRA) at May 27, 2009 at 6:29 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713676#action_12713676 ]

    Chris Douglas commented on HADOOP-4681:
    ---------------------------------------

    bq. I just looked at HADOOP-1911 and I don't think it fixed the real problem.

    No question; it was literally a last-minute fix for 0.17.0, intended as a partial fix until HADOOP-3185 could be given priority. To be fair, the resolution explicitly renounces any claim to a fix for the real issue...

    bq. We could define successful datanode conenction as 'being able to read non zero bytes that we need'. A failure count keeps growing until there is a 'successful connection', and should be reset after that. (Some what similar approach to HADOOP-3831).

    Isn't that what this patch effects (+/- the 2x dfs.client.max.block.acquire.failures semantics, which are a little odd)? I completely agree that the client code should be reworked to make the retry mechanism more legible, but- particularly if the idea is to push a fix into 0.19 and later- wouldn't it make sense to use this tweak or a variant of it? Clearly it's tricky code, so it seems reasonable to add something like HADOOP-3831 to trunk rather than back-porting it to earlier branches.
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.2

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Raghu Angadi (JIRA) at May 27, 2009 at 7:15 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713701#action_12713701 ]

    Raghu Angadi commented on HADOOP-4681:
    --------------------------------------
    Isn't that what this patch effects (+/- the 2x dfs.client.max.block.acquire.failures semantics, which are a little odd)?
    sort of, I think. It is an improvement, but only on the same lines as the current structure (no explicit policy, hard to see what happens and when). For e.g. it looks like 'a failure' is defined as not being able to connect/fetch from all the replicas. Also success is defined as just being able to get 'ok' from datanode. Which implies it might again go into infinite loop in some conditions (say all replicas are corrupt, thus only one is remaining, and it fails checksum at one particular position).

    The final fix could be as simiple as moving resetting 'failures' to readBuffer(). But I would prefer to add things like 'failures' to be incremented for every failure with a replica and limit the count to something like min(#replicas, large value like 10).

    Finally, I am mainly proposing an explicit policy in a code comment. 0.21 is fine.. big users like HBASE can have it backported.
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.2

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • stack (JIRA) at May 27, 2009 at 7:37 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713704#action_12713704 ]

    stack commented on HADOOP-4681:
    -------------------------------

    .bq For e.g. it looks like 'a failure' is defined as not being able to connect/fetch from all the replicas. Also success is defined as just being able to get 'ok' from datanode.

    I'd say this a substantial improvement over whats currently in place. Will suggest that hbase users apply current patch at least for now.

    I agree that it'd be better if failure were 'smarter' counting the likes of bad checksums in replica, etc., and that the 'failure' policy be explicitly stated.
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.2

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Jonathan Gray (JIRA) at Jun 8, 2009 at 8:10 am
    [ https://issues.apache.org/jira/browse/HADOOP-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12717190#action_12717190 ]

    Jonathan Gray commented on HADOOP-4681:
    ---------------------------------------

    I just tried this patch after getting a lot of bad blocks reported under heavy load from HBase.

    After applying this, I can now get through all my load tests without a problem. The datanode is heavily loaded and HBase takes a while to perform compactions (~1min worst case) but it manages to get through it whereas without the patch it crapped out and I wasn't able to recover easily.

    I'm running an otherwise clean hadoop 0.20.0
    DFSClient block read failures cause open DFSInputStream to become unusable
    --------------------------------------------------------------------------

    Key: HADOOP-4681
    URL: https://issues.apache.org/jira/browse/HADOOP-4681
    Project: Hadoop Core
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.18.2, 0.19.0, 0.19.1, 0.20.0
    Reporter: Igor Bolotin
    Fix For: 0.19.2

    Attachments: 4681.patch


    We are using some Lucene indexes directly from HDFS and for quite long time we were using Hadoop version 0.15.3.
    When tried to upgrade to Hadoop 0.19 - index searches started to fail with exceptions like:
    2008-11-13 16:50:20,314 WARN [Listener-4] [] DFSClient : DFS Read: java.io.IOException: Could not obtain block: blk_5604690829708125511_15489 file=/usr/collarity/data/urls-new/part-00000/20081110-163426/_0.tis
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1708)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1536)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1663)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at org.apache.nutch.indexer.FsDirectory$DfsIndexInput.readInternal(FsDirectory.java:174)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:152)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:76)
    at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:63)
    at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
    at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
    at org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:223)
    at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:217)
    at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
    ...
    The investigation showed that the root of this issue is that we exceeded # of xcievers in the data nodes and that was fixed by changing configuration settings to 2k.
    However - one thing that bothered me was that even after datanodes recovered from overload and most of client servers had been shut down - we still observed errors in the logs of running servers.
    Further investigation showed that fix for HADOOP-1911 introduced another problem - the DFSInputStream instance might become unusable once number of failures over lifetime of this instance exceeds configured threshold.
    The fix for this specific issue seems to be trivial - just reset failure counter before reading next block (patch will be attached shortly).
    This seems to be also related to HADOOP-3185, but I'm not sure I really understand necessity of keeping track of failed block accesses in the DFS client.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedNov 18, '08 at 9:44p
activeJun 8, '09 at 8:10a
posts17
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Jonathan Gray (JIRA): 17 posts

People

Translate

site design / logo © 2022 Grokbase