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

Eric Yang commented on YARN-7654:
---------------------------------

[~jlowe] {quote}
In the following code the parent frees memory that the child is about to use, 
resulting a use-after-free error:

{code}
  if (child_pid == 0) {
    FILE* so_fd = fopen(so, "a+");
    [...]
    FILE* se_fd = fopen(se, "a+");
    [...]
  }
  free(so);
  free(se);
{code}

Part of the problem is that the parent is not waiting for the child to complete 
as it did before when it was calling pclose(). I suspect that's why retries 
needed to be added here – it's not tied at all to the entry point feature being 
used but the fact that the parent is not waiting for the child.  The parent can 
end up asking for a process that docker hasn't finished launching yet. If we 
fix the parent to wait then I don't think there's a need to retry the inspect.
{quote}

I don't think the above is correct.  After fork, parent and child have 
different address space because they are separate processes.  Child so pointer 
is no longer the same as so pointer in parent.


> Support ENTRY_POINT for docker container
> ----------------------------------------
>
>                 Key: YARN-7654
>                 URL: https://issues.apache.org/jira/browse/YARN-7654
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: yarn
>    Affects Versions: 3.1.0
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>            Priority: Blocker
>         Attachments: YARN-7654.001.patch, YARN-7654.002.patch, 
> YARN-7654.003.patch, YARN-7654.004.patch, YARN-7654.005.patch, 
> YARN-7654.006.patch, YARN-7654.007.patch
>
>
> Docker image may have ENTRY_POINT predefined, but this is not supported in 
> the current implementation.  It would be nice if we can detect existence of 
> {{launch_command}} and base on this variable launch docker container in 
> different ways:
> h3. Launch command exists
> {code}
> docker run [image]:[version]
> docker exec [container_id] [launch_command]
> {code}
> h3. Use ENTRY_POINT
> {code}
> docker run [image]:[version]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to