hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gera Shegalov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11349) RawLocalFileSystem leaks file descriptor while creating a file if creat succeeds but chmod fails.
Date Tue, 09 Dec 2014 19:52:13 GMT

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

Gera Shegalov commented on HADOOP-11349:
----------------------------------------

Good idea, [~cmccabe]! It also addresses an additional comment I had for the 002 patch that
the exception should be included in the log.

Thanks for updating the patch, [~varun_saxena]! 

Instead of blindly wrapping the Throwable, you should do it only if it's not {{instanceof
IOException}}. Since you have to do this check twice, maybe add a helper method.

> RawLocalFileSystem leaks file descriptor while creating a file if creat succeeds but
chmod fails.
> -------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11349
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11349
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.6.0
>            Reporter: Chris Nauroth
>            Assignee: Varun Saxena
>            Priority: Minor
>             Fix For: 2.7.0
>
>         Attachments: HADOOP-11349.002.patch, HADOOP-11349.003.patch, HADOOP-11349.patch
>
>
> {{RawLocalFileSystem}} currently implements some file creation operations as a sequence
of 2 syscalls: create the file, followed by setting its permissions.  If creation succeeds,
but then setting permission causes an exception to be thrown, then there is no attempt to
close the previously opened file, resulting in a file descriptor leak.



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

Mime
View raw message