From reviews-return-31590-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Tue Apr 19 15:02:59 2016 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 C2DBA18E01 for ; Tue, 19 Apr 2016 15:02:59 +0000 (UTC) Received: (qmail 47823 invoked by uid 500); 19 Apr 2016 15:02:54 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 47798 invoked by uid 500); 19 Apr 2016 15:02:54 -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 47774 invoked by uid 99); 19 Apr 2016 15:02:54 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2016 15:02:54 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 1013E2B15C5; Tue, 19 Apr 2016 15:02:50 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8974189245249907187==" MIME-Version: 1.0 Subject: Re: Review Request 45996: Fixed memory leak of `gc` in `finalize()` in libprocess. From: Neil Conway To: Joris Van Remoortere Cc: Neil Conway , Joseph Wu , mesos Date: Tue, 19 Apr 2016 15:02:50 -0000 Message-ID: <20160419150250.8135.57423@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Neil Conway X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/45996/ X-Sender: Neil Conway References: <20160414191033.29094.44854@reviews.apache.org> In-Reply-To: <20160414191033.29094.44854@reviews.apache.org> Reply-To: Neil Conway X-ReviewRequest-Repository: mesos --===============8974189245249907187== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On April 14, 2016, 7:10 p.m., Joseph Wu wrote: > > 3rdparty/libprocess/src/process.cpp, lines 489-490 > > > > > > This is now effectively managed by the `ProcessManager`, so you could bring it into the `ProcessManager` 's scope (which would still be global). > > Neil Conway wrote: > This makes sense (and I would love to eliminate all the global state in libprocess), but AFAICS it won't be easy to implement: if we make `gc` a field of `ProcessManager`, we'd ideally like to initialize and spawn the GC process in `ProcessManager`'s constructor. But that isn't possible, because we can't safely call `spawn` at the time we are constructing the ProcessManager. We could still move `gc` to be a field of `ProcessManager` but spawn it separately, but I'm not sure if that is actually a net improvement at that point. > > Joseph Wu wrote: > It should be safe to call `ProcessManager::spawn` rather than `process::spawn` for `gc`. (Unless there's some dependency on the socket `__s__` for new processes...) Sure, but it still seems a bit fragile to me. I'd prefer to take on the removal of all the libprocess global state as a separate project. - Neil ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45996/#review128956 ----------------------------------------------------------- On April 11, 2016, 1:41 a.m., Neil Conway wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45996/ > ----------------------------------------------------------- > > (Updated April 11, 2016, 1:41 a.m.) > > > Review request for mesos and Joris Van Remoortere. > > > Bugs: MESOS-5144 > https://issues.apache.org/jira/browse/MESOS-5144 > > > Repository: mesos > > > Description > ------- > > Fixed memory leak of `gc` in `finalize()` in libprocess. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/gc.hpp 799468ebe49f2a49d325f40ffd8acea727abf74c > 3rdparty/libprocess/src/process.cpp 5e9dcfdc52f3a8223bc43af149b8e1f5dbdf5b0a > > Diff: https://reviews.apache.org/r/45996/diff/ > > > Testing > ------- > > > Thanks, > > Neil Conway > > --===============8974189245249907187==--