You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benjamin Bannier (JIRA)" <ji...@apache.org> on 2016/12/15 17:03:58 UTC
[jira] [Created] (MESOS-6801) IOSwitchboard::connect installs
continuations capturing this without properly deferring/dispatching to an
actor
Benjamin Bannier created MESOS-6801:
---------------------------------------
Summary: 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
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<agent::Call>& record) -> Future<bool> {
^
{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)