[
https://issues.apache.org/jira/browse/MESOS-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15751878#comment-15751878
]
Benjamin Bannier commented on MESOS-6801:
-----------------------------------------
cc [~jieyu] [~klueska] [~vinodkone]
> 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)