[ https://issues.apache.org/jira/browse/MESOS-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15752229#comment-15752229 ]
Anand Mazumdar commented on MESOS-6801: --------------------------------------- {{process::loop}} would use the {{pid}} passed to it as the async execution context i.e., it would implicitly do a {{defer}} to the actor. https://github.com/apache/mesos/blob/master/3rdparty/libprocess/include/process/loop.hpp#L74 > 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<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)