[ 
https://issues.apache.org/jira/browse/MESOS-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anand Mazumdar updated MESOS-6801:
----------------------------------
    Labels: newbie  (was: )

> 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)

Reply via email to