hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemanth Yamijala (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-5462) Glibc double free exception thrown when chown syscall fails.
Date Mon, 06 Apr 2009 06:38:12 GMT

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

Hemanth Yamijala commented on HADOOP-5462:

Few comments on the patch:

- run_task_as_user: variable task_script is unused.
- run_task_as_user: when the pid_path variable is freed, it would be good to set it to NULL.
Same holds for task_script_path if execlp fails.
- run_task_as_user: Regarding the removal of chown, though the call is not necessary, I am
thinking a better idea is to actually do this *after* switching the user. I don't see why
root privileges are required to do this operation. This way, the file would be written as
owned by the child, with the right permissions (so, no need for the chmod as well).
- kill_user_task: Like above, I think we can have the reading of the pid file happen after
switching the user. Coupled with that change, since the file will be written as the user itself,
it can be read back by him as well.
- run_task_as_user: We are doing an fclose of LOGFILE (both explicitly and by the fcloseall
call) before execlp, but afterwards, we are writing to it in some error conditions. Maybe
we can just remove these prints. Coupled with the above changes to do more operations after
switching the user, it may mean that we cannot log in even more cases. Because the error codes
are indicative enough, I think this is fine though.

> Glibc double free exception thrown when chown syscall fails.
> ------------------------------------------------------------
>                 Key: HADOOP-5462
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5462
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.21.0
>            Reporter: Sreekanth Ramakrishnan
>            Assignee: Sreekanth Ramakrishnan
>         Attachments: HADOOP-5462.patch
> When setuid script's chown call fails, a glibc double free exception is thrown. The reason
for this is that file_handle which was opened to write the pid file is already closed and
the cleanup: label tries to close it once again.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message