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

Mingliang Liu commented on HDFS-9672:
-------------------------------------

Suppose the {{LeaseManager$Monitor}} is doing blocking I/O via: {{run() -> 
FSEditLog#logSync() -> EditLogOutputStream#flush() -> JournalSet#flushAndSync() 
-> JournalSet#mapJournalsAndReportErrors()}}, if there is an 
InterruptException, the channel will be closed and the journals will be 
disabled via {{disableAndReportErrorOnJournals()}}. The test main thread then 
closes the edit log because of {{MiniDFSCluster#restartNameNode()}}. During the 
closing process, it will call {{FSEditLog#endCurrentLogSegment()}} which calls 
{{FSEditLog#logSync()}} internally. At the point, the {{logSync()}} will fail 
because all the journals are disabled; the {{System#exit()}} will be called 
immediately. This may be a potential bug which happens when the NN is stopping 
all active services.

Normally, the in-progress edit log would be finalized by 
{{FSEditLog#endCurrentLogSegment}}. For testing purposes, we can disable that 
here.

> o.a.h.hdfs.TestLeaseRecovery2 fails intermittently
> --------------------------------------------------
>
>                 Key: HDFS-9672
>                 URL: https://issues.apache.org/jira/browse/HDFS-9672
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 3.0.0
>            Reporter: Mingliang Liu
>            Assignee: Mingliang Liu
>         Attachments: HDFS-9672.000.patch
>
>
> It fails in recent builds, see:
> https://builds.apache.org/job/PreCommit-HDFS-Build/14177/testReport/org.apache.hadoop.hdfs/
> https://builds.apache.org/job/PreCommit-HDFS-Build/14147/testReport/org.apache.hadoop.hdfs/
> Failing test methods include:
> * 
> org.apache.hadoop.hdfs.TestLeaseRecovery2.testHardLeaseRecoveryWithRenameAfterNameNodeRestart
> * org.apache.hadoop.hdfs.TestLeaseRecovery2.testLeaseRecoverByAnotherUser
> * org.apache.hadoop.hdfs.TestLeaseRecovery2.testHardLeaseRecovery
> * 
> org.apache.hadoop.hdfs.TestLeaseRecovery2.org.apache.hadoop.hdfs.TestLeaseRecovery2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to