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

Huaxiang Sun commented on HBASE-25691:
--------------------------------------

I was able to reproduce this issue at my IMacPro. The issue is that 
FileInputStream is created with try-with-resources, so its close() is called 
right after the try sentence.

[https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java#L1078]

 

FileInputStream is a finalize class, so when this object is garbage collected, 
its close() is called again. 

Its close() deletes the persistence file. In the failed case, finalized thread 
calls previous two FileInputStream objects' close() and deletes the persistence 
file. 

> Test failure: TestVerifyBucketCacheFile.testRetrieveFromFile
> ------------------------------------------------------------
>
>                 Key: HBASE-25691
>                 URL: https://issues.apache.org/jira/browse/HBASE-25691
>             Project: HBase
>          Issue Type: Test
>          Components: test
>    Affects Versions: 2.3.4
>            Reporter: Huaxiang Sun
>            Assignee: Huaxiang Sun
>            Priority: Major
>
> Saw this test failure from 2.3 nightly.
> https://ci-hadoop.apache.org/job/HBase/job/HBase%20Nightly/job/branch-2.3/190/testReport/junit/org.apache.hadoop.hbase.io.hfile.bucket/TestVerifyBucketCacheFile/health_checks___yetus_jdk8_hadoop2_checks___testRetrieveFromFile_1__blockSize_16_384__bucketSizes__I_371a67ec_/
> h1. Regression
> health checks / yetus jdk8 hadoop2 checks / 
> org.apache.hadoop.hbase.io.hfile.bucket.TestVerifyBucketCacheFile.testRetrieveFromFile[1:
>  blockSize=16,384, bucketSizes=[I@371a67ec]
> Failing for the past 1 build (Since 
> [!https://ci-hadoop.apache.org/static/e247241e/images/16x16/red.png! 
> #190|https://ci-hadoop.apache.org/job/HBase/job/HBase%20Nightly/job/branch-2.3/190/]
>  )
> [Took 0.32 
> sec.|https://ci-hadoop.apache.org/job/HBase/job/HBase%20Nightly/job/branch-2.3/190/testReport/junit/org.apache.hadoop.hbase.io.hfile.bucket/TestVerifyBucketCacheFile/health_checks___yetus_jdk8_hadoop2_checks___testRetrieveFromFile_1__blockSize_16_384__bucketSizes__I_371a67ec_/history]
>  
> h3. Stacktrace
> java.lang.AssertionError at 
> org.apache.hadoop.hbase.io.hfile.bucket.TestVerifyBucketCacheFile.testRetrieveFromFile(TestVerifyBucketCacheFile.java:136)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to