Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1AE24200BE2 for ; Thu, 15 Dec 2016 20:31:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1968F160B2D; Thu, 15 Dec 2016 19:31:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 630A5160B13 for ; Thu, 15 Dec 2016 20:30:59 +0100 (CET) Received: (qmail 36130 invoked by uid 500); 15 Dec 2016 19:30:58 -0000 Mailing-List: contact issues-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list issues@mesos.apache.org Received: (qmail 36112 invoked by uid 99); 15 Dec 2016 19:30:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2016 19:30:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7DB682C03DE for ; Thu, 15 Dec 2016 19:30:58 +0000 (UTC) Date: Thu, 15 Dec 2016 19:30:58 +0000 (UTC) From: "Benjamin Bannier (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MESOS-6801) IOSwitchboard::connect installs continuations capturing this without properly deferring/dispatching to an actor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 15 Dec 2016 19:31:00 -0000 [ https://issues.apache.org/jira/browse/MESOS-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15752265#comment-15752265 ] Benjamin Bannier commented on MESOS-6801: ----------------------------------------- Ah sorry, I missed the explicit {{self()}} to {{process::loop}} and also looked at {{process::internal::loop}}. > IOSwitchboard::connect installs continuations capturing this without properly deferring/dispatching to an actor > --------------------------------------------------------------------------------------------------------------- > > Key: MESOS-6801 > URL: https://issues.apache.org/jira/browse/MESOS-6801 > Project: Mesos > Issue Type: Bug > Reporter: Benjamin Bannier > Labels: newbie > > In the body of {{IOSwitchboard::connect}} lambdas capturing {{this}} are created and used as callbacks without properly deferring to a libprocess actor. > {noformat} > /tmp/SRC/src/slave/containerizer/mesos/io/switchboard.cpp:686:7: warning: callback capturing this should be dispatched/deferred to a specific PID [mesos-this-capture] > [=](const Nothing&) { > ^ > /tmp/SRC/src/slave/containerizer/mesos/io/switchboard.cpp:1492:7: warning: callback capturing this should be dispatched/deferred to a specific PID [mesos-this-capture] > [=](const Result& record) -> Future { > ^ > {noformat} > Patterns like this can create use-after-free scenarios or introduce data races which can often be avoided by installing the callbacks via {{defer}}/{{dispatch}} on some process' actor. > This code should be revisited to remove existing data races. -- This message was sent by Atlassian JIRA (v6.3.4#6332)