From xen-devel-bounces@lists.xen.org Thu Feb 18 17:11:55 2016 Received: (at maildrop) by bugs.xenproject.org; 18 Feb 2016 17:11:55 +0000 Received: from lists.xenproject.org ([50.57.142.19] helo=lists.xen.org) by bugs.xenproject.org with esmtp (Exim 4.80) (envelope-from ) id 1aWS7P-0007mB-Di for xen-devel-maildrop-Eithu9ie@bugs.xenproject.org; Thu, 18 Feb 2016 17:11:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWS54-0001nu-PK; Thu, 18 Feb 2016 17:09:30 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWS53-0001nk-KI for xen-devel@lists.xen.org; Thu, 18 Feb 2016 17:09:29 +0000 Received: from [193.109.254.147] by server-15.bemta-14.messagelabs.com id 39/70-10115-8CAF5C65; Thu, 18 Feb 2016 17:09:28 +0000 X-Env-Sender: dunlapg@gmail.com X-Msg-Ref: server-5.tower-27.messagelabs.com!1455815367!24956840!1 X-Originating-IP: [209.85.214.176] X-SpamReason: No, hits=0.3 required=7.0 tests=RCVD_BY_IP X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19188 invoked from network); 18 Feb 2016 17:09:27 -0000 Received: from mail-ob0-f176.google.com (HELO mail-ob0-f176.google.com) (209.85.214.176) by server-5.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 18 Feb 2016 17:09:27 -0000 Received: by mail-ob0-f176.google.com with SMTP id gc3so75023134obb.3 for ; Thu, 18 Feb 2016 09:09:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=SqWpwhTUNAWFGE0z5xSwTS6lmE3gQdMxb+cpVWJ8umE=; b=A7YRNRd8g2Kpbw0W2LYsybFsoRgh7kXPf95FwOamvHbJFh3wxbQpnJbeVfeUuUwr1Z FJO9UQ8/EbY6piSx51heQchsD2POi280aCVu477Ax0qAfvM6YzlVquWOw2wb14jS1/dl OF0SWWQYTFDSFG151uIvGFzgtpsa2BY8+AR5L6OyNSDAkw//hshVx8if/svI1MKScFdh XC8A0W6ShSMlgOwZxd/pkfXdhiwjvw3Nl8g6ukSJ2sAb5DlTdOK6dqIxXCWmbwN4m57m Hkrp+f8Indgogn8gg4KKoaWwsqvl5ejGDEDNzoCiEJ2BP4xNtLuzVH4eztDb6Qy/+NQ+ PHig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=SqWpwhTUNAWFGE0z5xSwTS6lmE3gQdMxb+cpVWJ8umE=; b=HdvMaxA3Nfq95npoAB9Xig838KXIjHgv32EqVpO8Hzi3OpXQV1nx3MDDnD8TBvuHBh Xxp2LsXO0XyM13mGarCiZGPMbzQi+OdbBS2X3UInwDWiEEW/2xPz2s5EGZ2hUuXuFLTD xbzx8rDlfG6cK+Dw8Qkj7p4Uq0AKgS52F90rLZKmtByy2jUwOJrnab4jEhUVGmpC2BP8 b+TAzrdUk/uKyCsQCs1vJlzdYfDrVfo+sx+YsyETKCaxzoXXcDGC+msJVLooP178ggxJ rVMKufS5ZSPehO733mG+iIkpH+yqR67aiCv8ug41tsOGRHn34ngPEiP7a542iwGVYGJ+ S2tg== X-Gm-Message-State: AG10YOR3NsyaLuPLidpebc1H5jAETpvfSHLRT+15MHnLqzvhutx3pdVAR/JJ75gogMU+newGPiP5/4qDKsr2sQ== MIME-Version: 1.0 X-Received: by 10.182.213.7 with SMTP id no7mr7388854obc.22.1455815364784; Thu, 18 Feb 2016 09:09:24 -0800 (PST) Received: by 10.202.205.140 with HTTP; Thu, 18 Feb 2016 09:09:24 -0800 (PST) In-Reply-To: <1447935411.5647.55.camel@citrix.com> References: <564CC43B.1000904@ainfosec.com> <1447924858.5647.15.camel@citrix.com> <564DAA8D.5060305@citrix.com> <1447932195.5647.46.camel@citrix.com> <564DB393.3070805@citrix.com> <1447933727.5647.51.camel@citrix.com> <1447934120.5647.54.camel@citrix.com> <1447935411.5647.55.camel@citrix.com> Date: Thu, 18 Feb 2016 17:09:24 +0000 X-Google-Sender-Auth: Jo4PXe1Agn2u8bVJJLELmrWegW4 Message-ID: From: George Dunlap To: Ian Campbell Cc: Andrew Cooper , Ian Jackson , "xen-devel@lists.xen.org" , Martin Osterloh , Shriram Rajagopalan , Yang Hongyang Subject: Re: [Xen-devel] Current LibXL Status X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org On Thu, Nov 19, 2015 at 12:16 PM, Ian Campbell wrote: > On Thu, 2015-11-19 at 11:55 +0000, Ian Campbell wrote: >> On Thu, 2015-11-19 at 11:48 +0000, Ian Campbell wrote: >> > On Thu, 2015-11-19 at 11:33 +0000, Andrew Cooper wrote: >> > > >> > > The majority of those are cases are not appropriate uses of exit(). >> > > AFAIIR, the *only* valid use of exit() in a library is to clean up in >> > > a >> > > child process from a library-initiated fork(). >> > >> > ... or (in this case) in the libxl-save-helper (separate process). >> > >> > The only one I can find which isn't one of this is >> > in libxl__event_disaster, and that is only if the applications (or >> > language >> > bindings) haven't provided a suitable disaster callback. >> >> Was looking at 4.4, in staging I also see a very odd one in >> drbd_preresume_async, which isn't obviously in a child process AFAICT. >> >> Hongyang, what prevents that exit from killing the whole toolstack >> process? > > I had missed an _async suffix on that function versus the one which was the > actual callback, it is invoked via drbd_async_call which involves a fork(). So what was the conclusion here? It looks like we've confirmed that exit() is only called: 1. In the case of a malloc() failure 2. in libxl-save-helper (a separate process forked by the library) 3. In libxl__event_disaster(), if no callback is provided Which just leaves #1 as something to be discussed? (Also, I had suggested making a new thread, but I can't find any threads continuing this conversation.) -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel