From reviews-return-68860-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Wed Nov 15 11:56:51 2017 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8CADA1054A for ; Wed, 15 Nov 2017 11:56:51 +0000 (UTC) Received: (qmail 99853 invoked by uid 500); 15 Nov 2017 11:56:51 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 99811 invoked by uid 500); 15 Nov 2017 11:56:51 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 99800 invoked by uid 99); 15 Nov 2017 11:56:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Nov 2017 11:56:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6D814C8E9E; Wed, 15 Nov 2017 11:56:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3 X-Spam-Level: *** X-Spam-Status: No, score=3 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id hFxo9_lqD3GN; Wed, 15 Nov 2017 11:56:49 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 95AFC5FB9F; Wed, 15 Nov 2017 11:56:48 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 290A5E00C9; Wed, 15 Nov 2017 11:56:48 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 22A5FC402DD; Wed, 15 Nov 2017 11:56:48 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5068163694530950599==" MIME-Version: 1.0 Subject: Re: Review Request 63678: Improved the signal safety of `ns::clone`. From: Andrei Budnik To: Benjamin Bannier , Jie Yu Cc: Andrei Budnik , James Peach , mesos Date: Wed, 15 Nov 2017 11:56:48 -0000 Message-ID: <20171115115648.35835.73320@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Andrei Budnik X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/63678/ X-Sender: Andrei Budnik X-ReviewBoard-ShipIt: 1 References: <20171114191147.33724.39183@reviews-vm2.apache.org> In-Reply-To: <20171114191147.33724.39183@reviews-vm2.apache.org> X-ReviewBoard-ShipIt-Only: 1 Reply-To: Andrei Budnik X-ReviewRequest-Repository: mesos --===============5068163694530950599== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63678/#review191050 ----------------------------------------------------------- Ship it! Ship It! - Andrei Budnik On Nov. 14, 2017, 7:11 p.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63678/ > ----------------------------------------------------------- > > (Updated Nov. 14, 2017, 7:11 p.m.) > > > Review request for mesos, Benjamin Bannier and Jie Yu. > > > Bugs: MESOS-8159 > https://issues.apache.org/jira/browse/MESOS-8159 > > > Repository: mesos > > > Description > ------- > > `ns::clone` was implicitly using malloc to allocate a stack > after fork but before exec, where we should be avoiding > `malloc`. > > Updated the second clone to use `os::signal_safe::clone`. We > still explicitly allocate a stack after the fork, but since > that is allocated with `mmap` is it safe in this particular > case. > > > Diffs > ----- > > src/linux/ns.cpp 33751b518e95f4f67e6864728e1fdf621f50dd52 > > > Diff: https://reviews.apache.org/r/63678/diff/2/ > > > Testing > ------- > > sudo make check (Fedora 26) > > NOTE: I tried to avoid changing `ns::clone` too much in this patch because [MESOS-8155](https://issues.apache.org/jira/browse/MESOS-8155) and [MESOS-8156](https://issues.apache.org/jira/browse/MESOS-8156) are also going to also hit this code. > > > Thanks, > > James Peach > > --===============5068163694530950599==--