You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Chun-Hung Hsiao (JIRA)" <ji...@apache.org> on 2018/07/19 22:32:00 UTC

[jira] [Created] (MESOS-9098) `os::clone` returns `Failed to clone: Success` on error.

Chun-Hung Hsiao created MESOS-9098:
--------------------------------------

             Summary: `os::clone` returns `Failed to clone: Success` on error.
                 Key: MESOS-9098
                 URL: https://issues.apache.org/jira/browse/MESOS-9098
             Project: Mesos
          Issue Type: Improvement
          Components: stout
    Affects Versions: 1.7.0
            Reporter: Chun-Hung Hsiao


{{os::clone}} in stout is implemented in a way that when {{::clone}} fails, it would call {{::munmap}} to free the allocated stack memory, which would overwrite {{errno}}, causing it to return an {{Failed to clone: Success}} error:
[https://github.com/apache/mesos/blob/master/3rdparty/stout/include/stout/os/linux.hpp#L165]
We should preserve {{errno}} before calling {{::munmap}}, and return {{::munmap}}'s {{errno}} only if {{::clone}}'s {{errno}} is not zero.



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