mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bannier (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-6801) IOSwitchboard::connect installs continuations capturing this without properly deferring/dispatching to an actor
Date Thu, 15 Dec 2016 19:30:58 GMT

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

Mime
View raw message