You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Gaston Kleiman <ga...@mesosphere.io> on 2018/03/08 22:00:38 UTC
Re: Review Request 65962: Avoided copying `Owned` pointers in the
default executor.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65962/
-----------------------------------------------------------
(Updated March 8, 2018, 2 p.m.)
Review request for mesos and Joseph Wu.
Changes
-------
Addressed Benjamin's feedback.
Summary (updated)
-----------------
Avoided copying `Owned` pointers in the default executor.
Repository: mesos
Description (updated)
-------
`Owned` pointers are copied in multiple places of the default executor.
This violates the semantic of owned pointers and works only because
`Owned` is currently implemented with `shared_ptr`, it would otherwise
lead to double-freeing the pointers.
This patch changes those places to use references to the original
`Owned` objects or raw pointers instead of copies.
Diffs (updated)
-----
src/launcher/default_executor.cpp 906836f3b8e0af79d7c61f90fd8a95f193b26e84
Diff: https://reviews.apache.org/r/65962/diff/2/
Changes: https://reviews.apache.org/r/65962/diff/1-2/
Testing
-------
`sudo bin/mesos-tests.sh --gtest_filter="*Default*"` on GNU/Linux
Thanks,
Gaston Kleiman
Re: Review Request 65962: Avoided copying `Owned` pointers in the
default executor.
Posted by Gaston Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65962/
-----------------------------------------------------------
(Updated March 16, 2018, 12:54 p.m.)
Review request for mesos and Joseph Wu.
Changes
-------
Rebase.
Repository: mesos
Description
-------
`Owned` pointers are copied in multiple places of the default executor.
This violates the semantic of owned pointers and works only because
`Owned` is currently implemented with `shared_ptr`, it would otherwise
lead to double-freeing the pointers.
This patch changes those places to use references to the original
`Owned` objects or raw pointers instead of copies.
Diffs (updated)
-----
src/launcher/default_executor.cpp 906836f3b8e0af79d7c61f90fd8a95f193b26e84
Diff: https://reviews.apache.org/r/65962/diff/3/
Changes: https://reviews.apache.org/r/65962/diff/2-3/
Testing
-------
`sudo bin/mesos-tests.sh --gtest_filter="*Default*"` on GNU/Linux
Thanks,
Gaston Kleiman
Re: Review Request 65962: Avoided copying `Owned` pointers in the
default executor.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65962/#review198913
-----------------------------------------------------------
FAIL: Some of the unit tests failed. Please check the relevant logs.
Reviews applied: `['65692', '65693', '65694', '65695', '65962']`
Failed command: `Start-MesosCITesting`
All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/65962
Relevant logs:
- [mesos-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/65962/logs/mesos-tests-stdout.log):
```
[----------] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest
[ RUN ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0
[ OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0 (59 ms)
[ RUN ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1
[ OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1 (71 ms)
[----------] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest (133 ms total)
[----------] 1 test from IsolationFlag/CpuIsolatorTest
[ RUN ] IsolationFlag/CpuIsolatorTest.ROOT_UserCpuUsage/0
[ OK ] IsolationFlag/CpuIsolatorTest.ROOT_UserCpuUsage/0 (2660 ms)
[----------] 1 test from IsolationFlag/CpuIsolatorTest (2690 ms total)
[----------] 1 test from IsolationFlag/MemoryIsolatorTest
[ RUN ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0
[ OK ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0 (2545 ms)
[----------] 1 test from IsolationFlag/MemoryIsolatorTest (2574 ms total)
[----------] Global test environment tear-down
[==========] 916 tests from 91 test cases ran. (508955 ms total)
[ PASSED ] 913 tests.
[ FAILED ] 3 tests, listed below:
[ FAILED ] MesosContainerizer/DefaultExecutorTest.KillTask/0, where GetParam() = "mesos"
[ FAILED ] MesosContainerizer/DefaultExecutorTest.KillMultipleTasks/0, where GetParam() = "mesos"
[ FAILED ] MesosContainerizer/DefaultExecutorTest.CommitSuicideOnKillTask/0, where GetParam() = "mesos"
3 FAILED TESTS
YOU HAVE 210 DISABLED TESTS
```
- [mesos-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/65962/logs/mesos-tests-stderr.log):
```
I0308 23:00:25.409377 5088 master.cpp:10210] Updating the state of task dd492b18-d3df-4c01-ace0-3a4d4b5ad64f of framework 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-0000 (latest state: TASK_KILLED, status update state: TASK_KILLED)
I0308 23:00:25.409377 7524 slave.cpp:3878] Shutting down framework 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-0000
I0308 23:00:25.410382 7524 slave.cpp:6571] Shutting down executor 'dd492b18-d3df-4c01-ace0-3a4d4b5ad64f' of frameI0308 23:00:24.681372 5728 exec.cpp:162] Version: 1.6.0
I0308 23:00:24.710374 3924 exec.cpp:236] Executor registered on agent 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-S0
I0308 23:00:24.714376 10496 executor.cpp:176] Received SUBSCRIBED event
I0308 23:00:24.719409 10496 executor.cpp:180] Subscribed executor on build-srv-04.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net
I0308 23:00:24.719409 10496 executor.cpp:176] Received LAUNCH event
I0308 23:00:24.725380 10496 executor.cpp:648] Starting task dd492b18-d3df-4c01-ace0-3a4d4b5ad64f
I0308 23:00:24.810376 10496 executor.cpp:483] Running 'D:\DCOS\mesos\src\mesos-containerizer.exe launch <POSSIBLY-SENSITIVE-DATA>'
I0308 23:00:25.373379 10496 executor.cpp:661] Forked command at 4152
I0308 23:00:25.413379 5188 exec.cpp:445] Executor asked to shutdown
I0308 23:00:25.414381 10496 executor.cpp:176] Received SHUTDOWN event
I0308 23:00:25.414381 10496 executor.cpp:758] Shutting down
I0308 23:00:25.414381 10496 executor.cpp:868] Sending SIGTERM to process tree at pid 4work 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-0000 at executor(1)@10.3.1.5:55239
I0308 23:00:25.412379 7524 slave.cpp:924] Agent terminating
I0308 23:00:25.412379 5088 master.cpp:10309] Removing task dd492b18-d3df-4c01-ace0-3a4d4b5ad64f with resources cpus(allocated: *):4; mem(allocated: *):2048; disk(allocated: *):1024; ports(allocated: *):[31000-32000] of framework 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-0000 on agent 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-S0 at slave(398)@10.3.1.5:55218 (build-srv-04.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
W0308 23:00:25.412379 7524 slave.cpp:3874] Ignoring shutdown framework 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-0000 because it is terminating
I0308 23:00:25.415379 5088 master.cpp:1306] Agent 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-S0 at slave(398)@10.3.1.5:55218 (build-srv-04.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net) disconnected
I0308 23:00:25.415379 5088 master.cpp:3276] Disconnecting agent 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-S0 at slave(398)@10.3.1.5:55218 (build-srv-04.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0308 23:00:25.415379 8832 hierarchical.cpp:344] Removed framework 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-0000
I0308 23:00:25.416378 8944 containerizer.cpp:2338] Destroying container 2735efd5-a003-4ba8-8d94-a896862eab4d in RUNNING state
I0308 23:00:25.416378 8944 containerizer.cpp:2952] Transitioning the state of container 2735efd5-a003-4ba8-8d94-a896862eab4d from RUNNING to DESTROYING
I0308 23:00:25.416378 5088 master.cpp:3295] Deactivating agent 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-S0 at slave(398)@10.3.1.5:55218 (build-srv-04.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0308 23:00:25.416378 7524 hierarchical.cpp:766] Agent 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-S0 deactivated
I0308 23:00:25.417379 8944 launcher.cpp:156] Asked to destroy container 2735efd5-a003-4ba8-8d94-a896862eab4d
I0308 23:00:25.445412 7524 containerizer.cpp:2791] Container 2735efd5-a003-4ba8-8d94-a896862eab4d has exited
I0308 23:00:25.478404 11020 master.cpp:1149] Master terminating
I0308 23:00:25.481686 8944 hierarchical.cpp:609] Removed agent 8f6aeb97-aa0f-48e8-9d60-2d51d8587d9c-S0
I0308 23:00:26.180690 7192 process.cpp:929] Stopped the socket accept loop
```
- Mesos Reviewbot Windows
On March 8, 2018, 10 p.m., Gaston Kleiman wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65962/
> -----------------------------------------------------------
>
> (Updated March 8, 2018, 10 p.m.)
>
>
> Review request for mesos and Joseph Wu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> `Owned` pointers are copied in multiple places of the default executor.
> This violates the semantic of owned pointers and works only because
> `Owned` is currently implemented with `shared_ptr`, it would otherwise
> lead to double-freeing the pointers.
>
> This patch changes those places to use references to the original
> `Owned` objects or raw pointers instead of copies.
>
>
> Diffs
> -----
>
> src/launcher/default_executor.cpp 906836f3b8e0af79d7c61f90fd8a95f193b26e84
>
>
> Diff: https://reviews.apache.org/r/65962/diff/2/
>
>
> Testing
> -------
>
> `sudo bin/mesos-tests.sh --gtest_filter="*Default*"` on GNU/Linux
>
>
> Thanks,
>
> Gaston Kleiman
>
>
Re: Review Request 65962: Avoided copying `Owned` pointers in the
default executor.
Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65962/#review198939
-----------------------------------------------------------
Patch looks great!
Reviews applied: [65692, 65693, 65694, 65695, 65962]
Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh
- Mesos Reviewbot
On March 8, 2018, 10 p.m., Gaston Kleiman wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65962/
> -----------------------------------------------------------
>
> (Updated March 8, 2018, 10 p.m.)
>
>
> Review request for mesos and Joseph Wu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> `Owned` pointers are copied in multiple places of the default executor.
> This violates the semantic of owned pointers and works only because
> `Owned` is currently implemented with `shared_ptr`, it would otherwise
> lead to double-freeing the pointers.
>
> This patch changes those places to use references to the original
> `Owned` objects or raw pointers instead of copies.
>
>
> Diffs
> -----
>
> src/launcher/default_executor.cpp 906836f3b8e0af79d7c61f90fd8a95f193b26e84
>
>
> Diff: https://reviews.apache.org/r/65962/diff/2/
>
>
> Testing
> -------
>
> `sudo bin/mesos-tests.sh --gtest_filter="*Default*"` on GNU/Linux
>
>
> Thanks,
>
> Gaston Kleiman
>
>