mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Till Toenshoff <toensh...@me.com>
Subject Re: Review Request 49027: Removed dangling reference error in a lambda capture.
Date Tue, 21 Jun 2016 16:39:23 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49027/#review138872
-----------------------------------------------------------


Ship it!




Ship It!

- Till Toenshoff


On June 21, 2016, 3:38 p.m., Alexander Rojas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49027/
> -----------------------------------------------------------
> 
> (Updated June 21, 2016, 3:38 p.m.)
> 
> 
> Review request for mesos, Joerg Schad, Joris Van Remoortere, and Till Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Capturing function parameters by reference in a lambda was causing
> a crash in certain situations.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 4992aef6a357877651b1466bdc0202cf645e4c4c 
> 
> Diff: https://reviews.apache.org/r/49027/diff/
> 
> 
> Testing
> -------
> 
> ```sh
> #! /usr/bin/env bash
> 
> rm -rf /tmp/mesos/*
> 
> cat <<EOF > /tmp/credentials.txt
> foo bar
> baz bar
> EOF
> 
> cat <<EOF > /tmp/acls.json
> {
>   "permissive": false,
>   "access_mesos_logs" : [
>     {
>       "principals" : { "values" : ["foo"] },
>       "logs" : { "type" : "ANY" }
>     }
>   ],
>   "access_sandboxes" : [
>     {
>       "principals" : { "values" : ["foo"] },
>       "users" : { "values" : ["$USER"] }
>     }
>   ],
>   "view_tasks" : [
>     {
>       "principals" : { "values" : ["foo"] },
>       "users" : { "values" : ["$USER"] }
>     }
>   ],
>   "view_executors" : [
>     {
>       "principals" : { "values" : ["foo"] },
>       "users" : { "values" : ["$USER"] }
>     }
>   ],
>   "view_frameworks" : [
>     {
>       "principals" : { "values" : ["foo"] },
>       "users" : { "values" : ["$USER"] }
>     }
>   ],
>   "register_frameworks" : [
>    {
>      "principals" : { "values" : ["foo"] },
>      "roles" : { "values" : ["test"] }
>    }
>   ],
>   "run_tasks" : [
>    {
>      "principals" : { "values" : ["foo"] },
>      "users" : { "values" : ["$USER"] }
>    }
>   ],
>   "get_endpoints" : [
>    {
>      "principals" : { "values" : ["foo"] },
>      "paths" : { "type" : "ANY" }
>    }
>   ]
> }
> EOF
> 
> ./bin/mesos-master.sh --work_dir=/tmp/mesos/master &
> ./bin/mesos-slave.sh --work_dir=/tmp/mesos/slave \
>                      --master=127.0.0.1:5050 \
>                      --authenticate_http \
>                      --http_credentials=file:///tmp/credentials.txt \
>                      --acls=file:///tmp/acls.json &
> ./src/mesos-execute  \
>   --command='while true; do echo "Hello world"; sleep 3; done' \
>   --role=test \
>   --master=127.0.0.1:5050 \
>   --name=echoer \
>   --principal=foo &
> 
> SANDBOX_VPATH=`http GET http://127.0.0.1:5051/files/debug -a foo:bar -b  --pretty=none
\
>      | python -c 'import json,sys;obj=json.load(sys.stdin);print obj.keys()[0]'`
> 
> while true; do
>   # This would eventually crash the agent on the wrong version.
>   http GET http://127.0.0.1:5051/files/download?path=${SANDBOX_VPATH}/stdout -a foo:bar
>   sleep 0.5
> done
> 
> ```
> 
> 
> Thanks,
> 
> Alexander Rojas
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message