You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "gtin (JIRA)" <ji...@apache.org> on 2016/08/07 21:23:20 UTC

[jira] [Comment Edited] (MESOS-4577) libprocess can not run on 16-byte aligned stack mandatory architecture(aarch64)

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

gtin edited comment on MESOS-4577 at 8/7/16 9:23 PM:
-----------------------------------------------------

is there a solution for this issue?  I am still getting the same error
 3857 slave.cpp:3976] Container '43ceaef3-53b7-4e3f-be71-f3966b22d446' for executor 'test' of framework b7efc1d1-bc99-4aff-8220-e0f58fc7c327-0000 failed to start: Failed to fork executor: Failed to clone child process: Failed to clone: Invalid argument


was (Author: gtinjr@gmail.com):
is there a solution for this issue? I am not sure if changing the stackSize from 8 * 1024 * 1024; to 16 * 1024 * 1024; is the right thing to do.  I tried making this change and I still got the same error
 3857 slave.cpp:3976] Container '43ceaef3-53b7-4e3f-be71-f3966b22d446' for executor 'test' of framework b7efc1d1-bc99-4aff-8220-e0f58fc7c327-0000 failed to start: Failed to fork executor: Failed to clone child process: Failed to clone: Invalid argument

> libprocess can not run on 16-byte aligned stack mandatory architecture(aarch64) 
> --------------------------------------------------------------------------------
>
>                 Key: MESOS-4577
>                 URL: https://issues.apache.org/jira/browse/MESOS-4577
>             Project: Mesos
>          Issue Type: Bug
>          Components: libprocess, stout
>         Environment: Linux 10-175-112-202 4.1.6-rc3.aarch64 #1 SMP Mon Oct 12 01:43:03 UTC 2015 aarch64 aarch64 aarch64 GNU/Linux
>            Reporter: AndyPang
>            Assignee: AndyPang
>              Labels: mesosphere
>
> mesos run in AArch64 will get error, the log is:
> {code}
> E0101 00:06:56.636520 32411 slave.cpp:3342] Container 'b6be429a-08f0-4d52-b01d-abfcb6e0106b' for executor 'hello.84d205ae-f626-11de-bd66-7a3f6cf980b9' of framework '868b9f04-9179-427b-b050-ee8f89ffa3bd-0000' failed to start: Failed to fork executor: Failed to clone child process: Failed to clone: Invalid argument 
> {code}
> the "clone" achieve in libprocess 3rdparty stout library(in linux.hpp) packaging a syscall "clone" :
> {code:title=clone|borderStyle=solid}
> inline pid_t clone(const lambda::function<int()>& func, int flags)
> {
>   // Stack for the child.
>   // - unsigned long long used for best alignment.
>   // - 8 MiB appears to be the default for "ulimit -s" on OSX and Linux.
>   //
>   // NOTE: We need to allocate the stack dynamically. This is because
>   // glibc's 'clone' will modify the stack passed to it, therefore the
>   // stack must NOT be shared as multiple 'clone's can be invoked
>   // simultaneously.
>   int stackSize = 8 * 1024 * 1024;
>   unsigned long long *stack =
>     new unsigned long long[stackSize/sizeof(unsigned long long)];
>   pid_t pid = ::clone(
>       childMain,
>       &stack[stackSize/sizeof(stack[0]) - 1],  // stack grows down.
>       flags,
>       (void*) &func);
>   // If CLONE_VM is not set, ::clone would create a process which runs in a
>   // separate copy of the memory space of the calling process. So we destroy the
>   // stack here to avoid memory leak. If CLONE_VM is set, ::clone would create a
>   // thread which runs in the same memory space with the calling process.
>   if (!(flags & CLONE_VM)) {
>     delete[] stack;
>   }
>   return pid;
> }
> {code}
> syscal "clone" parameter stack is 8-byte aligned,so if in 16-byte aligned stack mandatory architecture(aarch64) it will get error.



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