[ https://issues.apache.org/jira/browse/HBASE-5282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13193912#comment-13193912 ]
Zhihong Yu commented on HBASE-5282: ----------------------------------- What I meant is that if close() throws IOE, status.cleanup() would be skipped. status.cleanup() can be placed before the call to close(). > Possible file handle leak with truncated HLog file. > --------------------------------------------------- > > Key: HBASE-5282 > URL: https://issues.apache.org/jira/browse/HBASE-5282 > Project: HBase > Issue Type: Bug > Affects Versions: 0.94.0, 0.90.5, 0.92.0 > Reporter: Jonathan Hsieh > Assignee: Jonathan Hsieh > Attachments: hbase-5282.patch > > > When debugging hbck, found that the code responsible for this exception can > leak open file handles. > {code} > 12/01/15 05:58:11 INFO regionserver.HRegion: Replaying edits from > hdfs://haus01. > sf.cloudera.com:56020/hbase-jon/test5/98a1e7255731aae44b3836641840113e/recovered > .edits/0000000000003211315; minSequenceid=3214658 > 12/01/15 05:58:11 ERROR handler.OpenRegionHandler: Failed open of > region=test5,8 > \x90\x00\x00\x00\x00\x00\x00/000005_0,1326597390073.98a1e7255731aae44b3836641840 > 113e. > java.io.EOFException > at java.io.DataInputStream.readByte(DataInputStream.java:250) > at > org.apache.hadoop.io.WritableUtils.readVLong(WritableUtils.java:299) > at org.apache.hadoop.io.WritableUtils.readVInt(WritableUtils.java:320) > at org.apache.hadoop.io.Text.readString(Text.java:400) > at > org.apache.hadoop.io.SequenceFile$Reader.init(SequenceFile.java:1486) > at > org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1437) > at > org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1424) > at > org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1419) > at > org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogReader$WALReader.<init>(SequenceFileLogReader.java:57) > at > org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogReader.init(SequenceFileLogReader.java:158) > at > org.apache.hadoop.hbase.regionserver.wal.HLog.getReader(HLog.java:572) > at > org.apache.hadoop.hbase.regionserver.HRegion.replayRecoveredEdits(HRegion.java:1940) > at > org.apache.hadoop.hbase.regionserver.HRegion.replayRecoveredEditsIfAny(HRegion.java:1896) > at > org.apache.hadoop.hbase.regionserver.HRegion.initialize(HRegion.java:366) > at > org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:2661) > at > org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:2647) > at > org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.openRegion(OpenRegionHandler.java:312) > at > org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.process(OpenRegionHandler.java:99) > at > org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:158) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:619) > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira