[
https://issues.apache.org/jira/browse/MAPREDUCE-5508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13774296#comment-13774296
]
Chris Nauroth commented on MAPREDUCE-5508:
------------------------------------------
bq. If we call Thread.currentThread().interrupt(), is that possible that fs
won't be closed in JobInProgress#cleanupJob()?
I think fs will be closed, and I don't think calling
Thread.currentThread().interrupt() will harm that. This just sets the
interrupt status of the thread (basically setting a flag to true on the
thread). Nothing substantial happens with the interrupt status immediately.
If there is a call to a blocking API (i.e. Object.wait or Thread.sleep), then a
thread in interrupted status will cause a throw of InterruptedException. I
don't see any calls to blocking APIs between the doAs and the close of fs, so I
don't see an issue that could prevent close of fs.
bq. I think if the answer to my first question is "fs will be closed in
JobInProgress#cleanupJob()", there will be no memory leak.
Yes, I think you're right. Thanks! Please disregard this part of my feedback.
I think the only thing left is to add the call to
Thread.currentThread().interrupt().
> JobTracker memory leak caused by unreleased FileSystem objects in
> JobInProgress#cleanupJob
> ------------------------------------------------------------------------------------------
>
> Key: MAPREDUCE-5508
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-5508
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: jobtracker
> Affects Versions: 1-win, 1.2.1
> Reporter: Xi Fang
> Assignee: Xi Fang
> Priority: Critical
> Attachments: MAPREDUCE-5508.1.patch, MAPREDUCE-5508.patch
>
>
> MAPREDUCE-5351 fixed a memory leak problem but introducing another filesystem
> object (see "tempDirFs") that is not properly released.
> {code} JobInProgress#cleanupJob()
> void cleanupJob() {
> ...
> tempDirFs = jobTempDirPath.getFileSystem(conf);
> CleanupQueue.getInstance().addToQueue(
> new PathDeletionContext(jobTempDirPath, conf, userUGI, jobId));
> ...
> if (tempDirFs != fs) {
> try {
> fs.close();
> } catch (IOException ie) {
> ...
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira