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

Zsolt Venczel commented on HDFS-14101:
--------------------------------------

Thanks [~kihwal] for reporting the issue!

DFSTestUtil.Builder creates files with random size no larger then 512 bytes and 
no smaller then 1 byte.
{code}
     DFSTestUtil util = new DFSTestUtil.Builder().
          setName("testCorruptFilesCorruptedBlock").setNumFiles(2).
          setMaxLevels(1).setMaxSize(512).build();
{code}

Whenever the file size is 1 byte the test fails as it tries to corrupt a block 
by inserting a 2 bytes long buffer starting 2 bytes before the end of the file 
that is -1.
The submitted patch should fix this (statistically this test had failed 1 times 
per 512 run but it was running fine for 2000 runs having the patch).

> Random failure of testListCorruptFilesCorruptedBlock
> ----------------------------------------------------
>
>                 Key: HDFS-14101
>                 URL: https://issues.apache.org/jira/browse/HDFS-14101
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 3.2.0, 3.0.3, 2.8.5
>            Reporter: Kihwal Lee
>            Assignee: Zsolt Venczel
>            Priority: Major
>              Labels: newbie
>         Attachments: HDFS-14101.01.patch
>
>
> We've seen this occasionally.
> {noformat}
> java.lang.IllegalArgumentException: Negative position
>       at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:755)
>       at org.apache.hadoop.hdfs.server.namenode.
>  
> TestListCorruptFileBlocks.testListCorruptFilesCorruptedBlock(TestListCorruptFileBlocks.java:105)
> {noformat}
> The test has a flaw.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to