You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Qian Zhang <zh...@gmail.com> on 2017/10/04 15:48:12 UTC

Review Request 62775: Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.

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

Review request for mesos, Anand Mazumdar and Vinod Kone.


Bugs: MESOS-7975
    https://issues.apache.org/jira/browse/MESOS-7975


Repository: mesos


Description
-------

Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.


Diffs
-----

  src/tests/default_executor_tests.cpp 2b4c643b8fb2fc8f2a5e98984ae1c267f66885d1 


Diff: https://reviews.apache.org/r/62775/diff/1/


Testing
-------


Thanks,

Qian Zhang


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/#review189796
-----------------------------------------------------------



FAIL: Mesos tests failed to build.

Reviews applied: `['62685', '62326', '62327', '62774', '62775']`

Failed command: `cmake.exe --build . --target mesos-tests --config Debug`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775

Relevant logs:

- [mesos-tests-build-cmake-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775/logs/mesos-tests-build-cmake-stdout.log):

```
  C:\DCOS\mesos\mesos\src\master/master.hpp(2070): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\DCOS\mesos\mesos\src\tests\status_update_manager_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\src\master/master.hpp(2070): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\DCOS\mesos\mesos\src\tests\sorter_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\src\master/master.hpp(2070): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\DCOS\mesos\mesos\src\tests\values_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\src\tests\values_tests.cpp(51): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\src\tests\values_tests.cpp(51): warning C4305: 'argument': truncation from 'double' to 'float' [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\common\http_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\common\http_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\common\recordio_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\common\recordio_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\common\type_utils_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\common\type_utils_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\containerizer\containerizer_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\containerizer\containerizer_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\containerizer\docker_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\DCOS\mesos\mesos\src\tests\containerizer\docker_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\src\master/master.hpp(2070): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\DCOS\mesos\mesos\src\tests\common\type_utils_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\src\master/master.hpp(2070): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\DCOS\mesos\mesos\src\tests\containerizer\containerizer_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\mesos\src\master/master.hpp(2070): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\DCOS\mesos\mesos\src\tests\containerizer\docker_tests.cpp) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]


"C:\DCOS\mesos\src\tests\mesos-tests.vcxproj" (default target) (1) ->
(Link target) -> 
  default_executor_tests.obj : error LNK2001: unresolved external symbol "public: static char const * const mesos::internal::tests::KillPolicyTestHelper::NAME" (?NAME@KillPolicyTestHelper@tests@internal@mesos@@2QBDB) [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
  C:\DCOS\mesos\src\mesos-tests.exe : fatal error LNK1120: 1 unresolved externals [C:\DCOS\mesos\src\tests\mesos-tests.vcxproj]

    454 Warning(s)
    2 Error(s)

Time Elapsed 01:10:11.53
```

- [mesos-tests-CMakeOutput.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775/logs/mesos-tests-CMakeOutput.log):

```
  Creating directory "C:\DCOS\mesos\CMakeFiles\CMakeTmp\Debug\".

  Creating directory "cmTC_92950.dir\Debug\cmTC_92950.tlog\".

InitializeBuildStatus:

  Creating "cmTC_92950.dir\Debug\cmTC_92950.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_SUPPORTS_CXX11 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_92950.dir\Debug\" /Fd"cmTC_92950.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue C:\DCOS\mesos\CMakeFiles\CMakeTmp\src.cxx

  Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  

  cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_SUPPORTS_CXX11 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_92950.dir\Debug\" /Fd"cmTC_92950.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue C:\DCOS\mesos\CMakeFiles\CMakeTmp\src.cxx

  src.cxx

  

Link:

  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\DCOS\mesos\CMakeFiles\CMakeTmp\Debug\cmTC_92950.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/DCOS/mesos/CMakeFiles/CMakeTmp/Debug/cmTC_92950.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/DCOS/mesos/CMakeFiles/CMakeTmp/Debug/cmTC_92950.lib" /MACHINE:X64  /machine:x64 cmTC_92950.dir\Debug\src.obj

  cmTC_92950.vcxproj -> C:\DCOS\mesos\CMakeFiles\CMakeTmp\Debug\cmTC_92950.exe

  cmTC_92950.vcxproj -> C:/DCOS/mesos/CMakeFiles/CMakeTmp/Debug/cmTC_92950.pdb (Full PDB)

FinalizeBuildStatus:

  Deleting file "cmTC_92950.dir\Debug\cmTC_92950.tlog\unsuccessfulbuild".

  Touching "cmTC_92950.dir\Debug\cmTC_92950.tlog\cmTC_92950.lastbuildstate".

Done Building Project "C:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_92950.vcxproj" (default targets).



Build succeeded.

    0 Warning(s)

    0 Error(s)



Time Elapsed 00:00:01.72


Source file was:
int main() { return 0; }
```

- [mesos-tests-CMakeError.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775/logs/mesos-tests-CMakeError.log):

```
PrepareForBuild:

  Creating directory "cmTC_9a414.dir\Debug\".

  Creating directory "C:\DCOS\mesos\CMakeFiles\CMakeTmp\Debug\".

  Creating directory "cmTC_9a414.dir\Debug\cmTC_9a414.tlog\".

InitializeBuildStatus:

  Creating "cmTC_9a414.dir\Debug\cmTC_9a414.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /D WIN32 /D _WINDOWS /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /D _UNICODE /D UNICODE /Gm- /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_9a414.dir\Debug\" /Fd"cmTC_9a414.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue C:\DCOS\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c

  Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  

  cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /D WIN32 /D _WINDOWS /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /D _UNICODE /D UNICODE /Gm- /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_9a414.dir\Debug\" /Fd"cmTC_9a414.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue C:\DCOS\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c

  CheckIncludeFile.c

  

C:\DCOS\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_9a414.vcxproj]

Done Building Project "C:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_9a414.vcxproj" (default targets) -- FAILED.



Build FAILED.



"C:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_9a414.vcxproj" (default target) (1) ->

(ClCompile target) -> 

  C:\DCOS\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\DCOS\mesos\CMakeFiles\CMakeTmp\cmTC_9a414.vcxproj]



    0 Warning(s)

    1 Error(s)



Time Elapsed 00:00:01.13



```

- Mesos Reviewbot Windows


On Nov. 1, 2017, 11:45 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Nov. 1, 2017, 11:45 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp f485b613084331c18781c2f0070d049061179050 
>   src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/3/
> 
> 
> Testing
> -------
> 
> [ RUN      ] MesosContainerizer/DefaultExecutorTest.KillMultipleTasks/0
> I1101 19:07:49.244680 24316 executor.cpp:192] Version: 1.5.0
> I1101 19:07:49.277947 24336 default_executor.cpp:191] Received SUBSCRIBED event
> I1101 19:07:49.281920 24336 default_executor.cpp:195] Subscribed executor on workstation
> I1101 19:07:49.282701 24336 default_executor.cpp:191] Received LAUNCH_GROUP event
> I1101 19:07:49.286540 24330 default_executor.cpp:402] Setting 'MESOS_CONTAINER_IP' to: 10.0.2.5
> I1101 19:07:49.313779 24336 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.342092 24331 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.374323 24334 default_executor.cpp:640] Successfully launched tasks [ aebaff2e-92fd-47e6-8423-48ceeb21f231, e7db282a-dc45-4a52-a48d-58e58c27f556 ] in child containers [ dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675, dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 ]
> I1101 19:07:49.386710 24337 default_executor.cpp:713] Waiting for child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 of task 'aebaff2e-92fd-47e6-8423-48ceeb21f231'
> I1101 19:07:49.387315 24337 default_executor.cpp:713] Waiting for child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 of task 'e7db282a-dc45-4a52-a48d-58e58c27f556'
> I1101 19:07:49.446444 24331 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.458606 24335 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.499390 24332 default_executor.cpp:191] Received KILL event
> I1101 19:07:49.499712 24332 default_executor.cpp:1172] Received kill for task 'aebaff2e-92fd-47e6-8423-48ceeb21f231'
> I1101 19:07:49.500016 24332 default_executor.cpp:1057] Killing task aebaff2e-92fd-47e6-8423-48ceeb21f231 running in child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 with SIGTERM signal
> I1101 19:07:49.500139 24332 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:07:49.501317 24332 default_executor.cpp:191] Received KILL event
> I1101 19:07:49.501617 24332 default_executor.cpp:1172] Received kill for task 'e7db282a-dc45-4a52-a48d-58e58c27f556'
> I1101 19:07:49.501972 24332 default_executor.cpp:1057] Killing task e7db282a-dc45-4a52-a48d-58e58c27f556 running in child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 with SIGTERM signal
> I1101 19:07:49.502081 24332 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:07:49.577337 24332 default_executor.cpp:888] Child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 of task 'aebaff2e-92fd-47e6-8423-48ceeb21f231' completed in state TASK_KILLED: Command terminated with signal Killed
> I1101 19:07:49.577422 24332 default_executor.cpp:924] Killing task group containing tasks [ aebaff2e-92fd-47e6-8423-48ceeb21f231, e7db282a-dc45-4a52-a48d-58e58c27f556 ]
> I1101 19:07:49.588505 24332 default_executor.cpp:888] Child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 of task 'e7db282a-dc45-4a52-a48d-58e58c27f556' completed in state TASK_KILLED: Command terminated with signal Killed
> I1101 19:07:49.588593 24332 default_executor.cpp:1017] Terminating after 1secs
> [       OK ] MesosContainerizer/DefaultExecutorTest.KillMultipleTasks/0 (1013 ms)
> 
> 
> [ RUN      ] ROOT_DOCKER_DockerAndMesosContainerizers/DefaultExecutorTest.KillMultipleTasks/0
> I1101 19:44:45.021219 24574 executor.cpp:192] Version: 1.5.0
> I1101 19:44:45.062325 24591 default_executor.cpp:191] Received SUBSCRIBED event
> I1101 19:44:45.066876 24591 default_executor.cpp:195] Subscribed executor on workstation
> I1101 19:44:45.067586 24591 default_executor.cpp:191] Received LAUNCH_GROUP event
> I1101 19:44:45.070425 24590 default_executor.cpp:402] Setting 'MESOS_CONTAINER_IP' to: 10.0.2.5
> I1101 19:44:45.101138 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.120609 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.200438 24592 default_executor.cpp:640] Successfully launched tasks [ bd4ea3aa-e920-4f5b-8fc1-11986c006e8f, 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 ] in child containers [ decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092, decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b ]
> I1101 19:44:45.252046 24592 default_executor.cpp:713] Waiting for child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 of task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f'
> I1101 19:44:45.255779 24592 default_executor.cpp:713] Waiting for child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b of task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4'
> I1101 19:44:45.289633 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.295717 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.355026 24589 default_executor.cpp:191] Received KILL event
> I1101 19:44:45.355679 24589 default_executor.cpp:1172] Received kill for task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f'
> I1101 19:44:45.355995 24589 default_executor.cpp:1057] Killing task bd4ea3aa-e920-4f5b-8fc1-11986c006e8f running in child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 with SIGTERM signal
> I1101 19:44:45.356132 24589 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:44:45.357436 24589 default_executor.cpp:191] Received KILL event
> I1101 19:44:45.357635 24589 default_executor.cpp:1172] Received kill for task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4'
> I1101 19:44:45.357844 24589 default_executor.cpp:1057] Killing task 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 running in child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b with SIGTERM signal
> I1101 19:44:45.358074 24589 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:44:45.519832 24592 default_executor.cpp:888] Child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b of task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4' completed in state TASK_KILLED: Command terminated with signal Killed
> I1101 19:44:45.520102 24592 default_executor.cpp:924] Killing task group containing tasks [ bd4ea3aa-e920-4f5b-8fc1-11986c006e8f, 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 ]
> I1101 19:44:45.521134 24592 default_executor.cpp:888] Child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 of task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f' completed in state TASK_KILLED: Command terminated with signal Terminated
> I1101 19:44:45.521200 24592 default_executor.cpp:1017] Terminating after 1secs
> [       OK ] ROOT_DOCKER_DockerAndMesosContainerizers/DefaultExecutorTest.KillMultipleTasks/0 (1417 ms)
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Qian Zhang <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/
-----------------------------------------------------------

(Updated Nov. 1, 2017, 7:45 p.m.)


Review request for mesos, Anand Mazumdar and Vinod Kone.


Changes
-------

Addressed review comments and updated testing section.


Bugs: MESOS-7975
    https://issues.apache.org/jira/browse/MESOS-7975


Repository: mesos


Description
-------

Added a test `ROOT_NoTransitionFromKillingToFinished`.


Diffs (updated)
-----

  src/tests/default_executor_tests.cpp f485b613084331c18781c2f0070d049061179050 
  src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 


Diff: https://reviews.apache.org/r/62775/diff/3/

Changes: https://reviews.apache.org/r/62775/diff/2-3/


Testing (updated)
-------

[ RUN      ] MesosContainerizer/DefaultExecutorTest.KillMultipleTasks/0
I1101 19:07:49.244680 24316 executor.cpp:192] Version: 1.5.0
I1101 19:07:49.277947 24336 default_executor.cpp:191] Received SUBSCRIBED event
I1101 19:07:49.281920 24336 default_executor.cpp:195] Subscribed executor on workstation
I1101 19:07:49.282701 24336 default_executor.cpp:191] Received LAUNCH_GROUP event
I1101 19:07:49.286540 24330 default_executor.cpp:402] Setting 'MESOS_CONTAINER_IP' to: 10.0.2.5
I1101 19:07:49.313779 24336 default_executor.cpp:191] Received ACKNOWLEDGED event
I1101 19:07:49.342092 24331 default_executor.cpp:191] Received ACKNOWLEDGED event
I1101 19:07:49.374323 24334 default_executor.cpp:640] Successfully launched tasks [ aebaff2e-92fd-47e6-8423-48ceeb21f231, e7db282a-dc45-4a52-a48d-58e58c27f556 ] in child containers [ dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675, dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 ]
I1101 19:07:49.386710 24337 default_executor.cpp:713] Waiting for child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 of task 'aebaff2e-92fd-47e6-8423-48ceeb21f231'
I1101 19:07:49.387315 24337 default_executor.cpp:713] Waiting for child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 of task 'e7db282a-dc45-4a52-a48d-58e58c27f556'
I1101 19:07:49.446444 24331 default_executor.cpp:191] Received ACKNOWLEDGED event
I1101 19:07:49.458606 24335 default_executor.cpp:191] Received ACKNOWLEDGED event
I1101 19:07:49.499390 24332 default_executor.cpp:191] Received KILL event
I1101 19:07:49.499712 24332 default_executor.cpp:1172] Received kill for task 'aebaff2e-92fd-47e6-8423-48ceeb21f231'
I1101 19:07:49.500016 24332 default_executor.cpp:1057] Killing task aebaff2e-92fd-47e6-8423-48ceeb21f231 running in child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 with SIGTERM signal
I1101 19:07:49.500139 24332 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
I1101 19:07:49.501317 24332 default_executor.cpp:191] Received KILL event
I1101 19:07:49.501617 24332 default_executor.cpp:1172] Received kill for task 'e7db282a-dc45-4a52-a48d-58e58c27f556'
I1101 19:07:49.501972 24332 default_executor.cpp:1057] Killing task e7db282a-dc45-4a52-a48d-58e58c27f556 running in child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 with SIGTERM signal
I1101 19:07:49.502081 24332 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
I1101 19:07:49.577337 24332 default_executor.cpp:888] Child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 of task 'aebaff2e-92fd-47e6-8423-48ceeb21f231' completed in state TASK_KILLED: Command terminated with signal Killed
I1101 19:07:49.577422 24332 default_executor.cpp:924] Killing task group containing tasks [ aebaff2e-92fd-47e6-8423-48ceeb21f231, e7db282a-dc45-4a52-a48d-58e58c27f556 ]
I1101 19:07:49.588505 24332 default_executor.cpp:888] Child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 of task 'e7db282a-dc45-4a52-a48d-58e58c27f556' completed in state TASK_KILLED: Command terminated with signal Killed
I1101 19:07:49.588593 24332 default_executor.cpp:1017] Terminating after 1secs
[       OK ] MesosContainerizer/DefaultExecutorTest.KillMultipleTasks/0 (1013 ms)


[ RUN      ] ROOT_DOCKER_DockerAndMesosContainerizers/DefaultExecutorTest.KillMultipleTasks/0
I1101 19:44:45.021219 24574 executor.cpp:192] Version: 1.5.0
I1101 19:44:45.062325 24591 default_executor.cpp:191] Received SUBSCRIBED event
I1101 19:44:45.066876 24591 default_executor.cpp:195] Subscribed executor on workstation
I1101 19:44:45.067586 24591 default_executor.cpp:191] Received LAUNCH_GROUP event
I1101 19:44:45.070425 24590 default_executor.cpp:402] Setting 'MESOS_CONTAINER_IP' to: 10.0.2.5
I1101 19:44:45.101138 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
I1101 19:44:45.120609 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
I1101 19:44:45.200438 24592 default_executor.cpp:640] Successfully launched tasks [ bd4ea3aa-e920-4f5b-8fc1-11986c006e8f, 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 ] in child containers [ decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092, decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b ]
I1101 19:44:45.252046 24592 default_executor.cpp:713] Waiting for child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 of task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f'
I1101 19:44:45.255779 24592 default_executor.cpp:713] Waiting for child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b of task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4'
I1101 19:44:45.289633 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
I1101 19:44:45.295717 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
I1101 19:44:45.355026 24589 default_executor.cpp:191] Received KILL event
I1101 19:44:45.355679 24589 default_executor.cpp:1172] Received kill for task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f'
I1101 19:44:45.355995 24589 default_executor.cpp:1057] Killing task bd4ea3aa-e920-4f5b-8fc1-11986c006e8f running in child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 with SIGTERM signal
I1101 19:44:45.356132 24589 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
I1101 19:44:45.357436 24589 default_executor.cpp:191] Received KILL event
I1101 19:44:45.357635 24589 default_executor.cpp:1172] Received kill for task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4'
I1101 19:44:45.357844 24589 default_executor.cpp:1057] Killing task 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 running in child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b with SIGTERM signal
I1101 19:44:45.358074 24589 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
I1101 19:44:45.519832 24592 default_executor.cpp:888] Child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b of task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4' completed in state TASK_KILLED: Command terminated with signal Killed
I1101 19:44:45.520102 24592 default_executor.cpp:924] Killing task group containing tasks [ bd4ea3aa-e920-4f5b-8fc1-11986c006e8f, 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 ]
I1101 19:44:45.521134 24592 default_executor.cpp:888] Child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 of task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f' completed in state TASK_KILLED: Command terminated with signal Terminated
I1101 19:44:45.521200 24592 default_executor.cpp:1017] Terminating after 1secs
[       OK ] ROOT_DOCKER_DockerAndMesosContainerizers/DefaultExecutorTest.KillMultipleTasks/0 (1417 ms)


Thanks,

Qian Zhang


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/#review188113
-----------------------------------------------------------



FAIL: Mesos tests failed to build.

Reviews applied: `['62685', '62326', '62327', '62774', '62775']`

Failed command: `cmake.exe --build . --target mesos-tests --config Debug`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775

Relevant logs:

- [mesos-tests-build-cmake-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775/logs/mesos-tests-build-cmake-stdout.log):

```
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\uri_fetcher_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\uri_fetcher_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\common\http_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\common\http_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\common\recordio_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\common\recordio_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\src\master/master.hpp(2059): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\mesos\mesos\src\tests\values_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\src\tests\values_tests.cpp(51): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\src\tests\values_tests.cpp(51): warning C4305: 'argument': truncation from 'double' to 'float' [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\common\type_utils_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\common\type_utils_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\src\master/master.hpp(2059): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\mesos\mesos\src\tests\common\type_utils_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\containerizer\containerizer_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\containerizer\containerizer_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(59): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\containerizer\docker_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\3rdparty\stout\include\stout/windows/os.hpp(448): warning C4996: 'GetVersionExW': was declared deprecated (compiling source file C:\mesos\mesos\src\tests\containerizer\docker_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\src\master/master.hpp(2059): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\mesos\mesos\src\tests\containerizer\containerizer_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\mesos\src\master/master.hpp(2059): warning C4244: 'return': conversion from 'unsigned __int64' to 'double', possible loss of data (compiling source file C:\mesos\mesos\src\tests\containerizer\docker_tests.cpp) [C:\mesos\src\tests\mesos-tests.vcxproj]


"C:\mesos\src\tests\mesos-tests.vcxproj" (default target) (1) ->
(Link target) -> 
  default_executor_tests.obj : error LNK2001: unresolved external symbol "public: static char const * const mesos::internal::tests::KillPolicyTestHelper::NAME" (?NAME@KillPolicyTestHelper@tests@internal@mesos@@2QBDB) [C:\mesos\src\tests\mesos-tests.vcxproj]
  C:\mesos\src\mesos-tests.exe : fatal error LNK1120: 1 unresolved externals [C:\mesos\src\tests\mesos-tests.vcxproj]

    454 Warning(s)
    2 Error(s)

Time Elapsed 01:08:26.03
```

- [mesos-tests-CMakeOutput.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775/logs/mesos-tests-CMakeOutput.log):

```
  Creating directory "C:\mesos\CMakeFiles\CMakeTmp\Debug\".

  Creating directory "cmTC_ca605.dir\Debug\cmTC_ca605.tlog\".

InitializeBuildStatus:

  Creating "cmTC_ca605.dir\Debug\cmTC_ca605.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_SUPPORTS_CXX11 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_ca605.dir\Debug\" /Fd"cmTC_ca605.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue C:\mesos\CMakeFiles\CMakeTmp\src.cxx

  Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  

  cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_SUPPORTS_CXX11 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_ca605.dir\Debug\" /Fd"cmTC_ca605.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue C:\mesos\CMakeFiles\CMakeTmp\src.cxx

  src.cxx

  

Link:

  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\mesos\CMakeFiles\CMakeTmp\Debug\cmTC_ca605.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/mesos/CMakeFiles/CMakeTmp/Debug/cmTC_ca605.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/mesos/CMakeFiles/CMakeTmp/Debug/cmTC_ca605.lib" /MACHINE:X64  /machine:x64 cmTC_ca605.dir\Debug\src.obj

  cmTC_ca605.vcxproj -> C:\mesos\CMakeFiles\CMakeTmp\Debug\cmTC_ca605.exe

  cmTC_ca605.vcxproj -> C:/mesos/CMakeFiles/CMakeTmp/Debug/cmTC_ca605.pdb (Full PDB)

FinalizeBuildStatus:

  Deleting file "cmTC_ca605.dir\Debug\cmTC_ca605.tlog\unsuccessfulbuild".

  Touching "cmTC_ca605.dir\Debug\cmTC_ca605.tlog\cmTC_ca605.lastbuildstate".

Done Building Project "C:\mesos\CMakeFiles\CMakeTmp\cmTC_ca605.vcxproj" (default targets).



Build succeeded.

    0 Warning(s)

    0 Error(s)



Time Elapsed 00:00:01.80


Source file was:
int main() { return 0; }
```

- [mesos-tests-CMakeError.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775/logs/mesos-tests-CMakeError.log):

```
PrepareForBuild:

  Creating directory "cmTC_05a9a.dir\Debug\".

  Creating directory "C:\mesos\CMakeFiles\CMakeTmp\Debug\".

  Creating directory "cmTC_05a9a.dir\Debug\cmTC_05a9a.tlog\".

InitializeBuildStatus:

  Creating "cmTC_05a9a.dir\Debug\cmTC_05a9a.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /D WIN32 /D _WINDOWS /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /D _UNICODE /D UNICODE /Gm- /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_05a9a.dir\Debug\" /Fd"cmTC_05a9a.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue C:\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c

  Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  

  cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /D WIN32 /D _WINDOWS /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /D _UNICODE /D UNICODE /Gm- /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_05a9a.dir\Debug\" /Fd"cmTC_05a9a.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue C:\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c

  CheckIncludeFile.c

  

C:\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\mesos\CMakeFiles\CMakeTmp\cmTC_05a9a.vcxproj]

Done Building Project "C:\mesos\CMakeFiles\CMakeTmp\cmTC_05a9a.vcxproj" (default targets) -- FAILED.



Build FAILED.



"C:\mesos\CMakeFiles\CMakeTmp\cmTC_05a9a.vcxproj" (default target) (1) ->

(ClCompile target) -> 

  C:\mesos\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\mesos\CMakeFiles\CMakeTmp\cmTC_05a9a.vcxproj]



    0 Warning(s)

    1 Error(s)



Time Elapsed 00:00:01.95



```

- Mesos Reviewbot Windows


On Oct. 16, 2017, 8:36 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2017, 8:36 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 68312010a45df5dbdb6d9d4c49d1faa5d8c60472 
>   src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Qian Zhang <zh...@gmail.com>.

> On Nov. 1, 2017, 6:33 a.m., Vinod Kone wrote:
> > Can you update the testing section. Ran it in a loop I hope?

Updated the testing section, and yes, I ran it in a loop (100 times) and it works well.


- Qian


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


On Nov. 1, 2017, 7:45 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Nov. 1, 2017, 7:45 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp f485b613084331c18781c2f0070d049061179050 
>   src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/3/
> 
> 
> Testing
> -------
> 
> [ RUN      ] MesosContainerizer/DefaultExecutorTest.KillMultipleTasks/0
> I1101 19:07:49.244680 24316 executor.cpp:192] Version: 1.5.0
> I1101 19:07:49.277947 24336 default_executor.cpp:191] Received SUBSCRIBED event
> I1101 19:07:49.281920 24336 default_executor.cpp:195] Subscribed executor on workstation
> I1101 19:07:49.282701 24336 default_executor.cpp:191] Received LAUNCH_GROUP event
> I1101 19:07:49.286540 24330 default_executor.cpp:402] Setting 'MESOS_CONTAINER_IP' to: 10.0.2.5
> I1101 19:07:49.313779 24336 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.342092 24331 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.374323 24334 default_executor.cpp:640] Successfully launched tasks [ aebaff2e-92fd-47e6-8423-48ceeb21f231, e7db282a-dc45-4a52-a48d-58e58c27f556 ] in child containers [ dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675, dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 ]
> I1101 19:07:49.386710 24337 default_executor.cpp:713] Waiting for child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 of task 'aebaff2e-92fd-47e6-8423-48ceeb21f231'
> I1101 19:07:49.387315 24337 default_executor.cpp:713] Waiting for child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 of task 'e7db282a-dc45-4a52-a48d-58e58c27f556'
> I1101 19:07:49.446444 24331 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.458606 24335 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.499390 24332 default_executor.cpp:191] Received KILL event
> I1101 19:07:49.499712 24332 default_executor.cpp:1172] Received kill for task 'aebaff2e-92fd-47e6-8423-48ceeb21f231'
> I1101 19:07:49.500016 24332 default_executor.cpp:1057] Killing task aebaff2e-92fd-47e6-8423-48ceeb21f231 running in child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 with SIGTERM signal
> I1101 19:07:49.500139 24332 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:07:49.501317 24332 default_executor.cpp:191] Received KILL event
> I1101 19:07:49.501617 24332 default_executor.cpp:1172] Received kill for task 'e7db282a-dc45-4a52-a48d-58e58c27f556'
> I1101 19:07:49.501972 24332 default_executor.cpp:1057] Killing task e7db282a-dc45-4a52-a48d-58e58c27f556 running in child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 with SIGTERM signal
> I1101 19:07:49.502081 24332 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:07:49.577337 24332 default_executor.cpp:888] Child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 of task 'aebaff2e-92fd-47e6-8423-48ceeb21f231' completed in state TASK_KILLED: Command terminated with signal Killed
> I1101 19:07:49.577422 24332 default_executor.cpp:924] Killing task group containing tasks [ aebaff2e-92fd-47e6-8423-48ceeb21f231, e7db282a-dc45-4a52-a48d-58e58c27f556 ]
> I1101 19:07:49.588505 24332 default_executor.cpp:888] Child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 of task 'e7db282a-dc45-4a52-a48d-58e58c27f556' completed in state TASK_KILLED: Command terminated with signal Killed
> I1101 19:07:49.588593 24332 default_executor.cpp:1017] Terminating after 1secs
> [       OK ] MesosContainerizer/DefaultExecutorTest.KillMultipleTasks/0 (1013 ms)
> 
> 
> [ RUN      ] ROOT_DOCKER_DockerAndMesosContainerizers/DefaultExecutorTest.KillMultipleTasks/0
> I1101 19:44:45.021219 24574 executor.cpp:192] Version: 1.5.0
> I1101 19:44:45.062325 24591 default_executor.cpp:191] Received SUBSCRIBED event
> I1101 19:44:45.066876 24591 default_executor.cpp:195] Subscribed executor on workstation
> I1101 19:44:45.067586 24591 default_executor.cpp:191] Received LAUNCH_GROUP event
> I1101 19:44:45.070425 24590 default_executor.cpp:402] Setting 'MESOS_CONTAINER_IP' to: 10.0.2.5
> I1101 19:44:45.101138 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.120609 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.200438 24592 default_executor.cpp:640] Successfully launched tasks [ bd4ea3aa-e920-4f5b-8fc1-11986c006e8f, 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 ] in child containers [ decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092, decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b ]
> I1101 19:44:45.252046 24592 default_executor.cpp:713] Waiting for child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 of task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f'
> I1101 19:44:45.255779 24592 default_executor.cpp:713] Waiting for child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b of task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4'
> I1101 19:44:45.289633 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.295717 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.355026 24589 default_executor.cpp:191] Received KILL event
> I1101 19:44:45.355679 24589 default_executor.cpp:1172] Received kill for task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f'
> I1101 19:44:45.355995 24589 default_executor.cpp:1057] Killing task bd4ea3aa-e920-4f5b-8fc1-11986c006e8f running in child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 with SIGTERM signal
> I1101 19:44:45.356132 24589 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:44:45.357436 24589 default_executor.cpp:191] Received KILL event
> I1101 19:44:45.357635 24589 default_executor.cpp:1172] Received kill for task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4'
> I1101 19:44:45.357844 24589 default_executor.cpp:1057] Killing task 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 running in child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b with SIGTERM signal
> I1101 19:44:45.358074 24589 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:44:45.519832 24592 default_executor.cpp:888] Child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b of task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4' completed in state TASK_KILLED: Command terminated with signal Killed
> I1101 19:44:45.520102 24592 default_executor.cpp:924] Killing task group containing tasks [ bd4ea3aa-e920-4f5b-8fc1-11986c006e8f, 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 ]
> I1101 19:44:45.521134 24592 default_executor.cpp:888] Child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 of task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f' completed in state TASK_KILLED: Command terminated with signal Terminated
> I1101 19:44:45.521200 24592 default_executor.cpp:1017] Terminating after 1secs
> [       OK ] ROOT_DOCKER_DockerAndMesosContainerizers/DefaultExecutorTest.KillMultipleTasks/0 (1417 ms)
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Vinod Kone <vi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/#review189764
-----------------------------------------------------------


Ship it!




Can you update the testing section. Ran it in a loop I hope?

- Vinod Kone


On Oct. 16, 2017, 8:36 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2017, 8:36 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 68312010a45df5dbdb6d9d4c49d1faa5d8c60472 
>   src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Qian Zhang <zh...@gmail.com>.

> On Nov. 1, 2017, 8:02 a.m., Gaston Kleiman wrote:
> > LGTM, just two small comments:
> > 
> > 1) The `TASK_STARTING` changes have landed, so we'll have to update the test.
> > 2) There's a new helper method that we should use to create the `KILL` call.

Thanks for the review comments! I have addressed them in the latest patch.


- Qian


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


On Nov. 1, 2017, 7:45 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Nov. 1, 2017, 7:45 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp f485b613084331c18781c2f0070d049061179050 
>   src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/3/
> 
> 
> Testing
> -------
> 
> [ RUN      ] MesosContainerizer/DefaultExecutorTest.KillMultipleTasks/0
> I1101 19:07:49.244680 24316 executor.cpp:192] Version: 1.5.0
> I1101 19:07:49.277947 24336 default_executor.cpp:191] Received SUBSCRIBED event
> I1101 19:07:49.281920 24336 default_executor.cpp:195] Subscribed executor on workstation
> I1101 19:07:49.282701 24336 default_executor.cpp:191] Received LAUNCH_GROUP event
> I1101 19:07:49.286540 24330 default_executor.cpp:402] Setting 'MESOS_CONTAINER_IP' to: 10.0.2.5
> I1101 19:07:49.313779 24336 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.342092 24331 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.374323 24334 default_executor.cpp:640] Successfully launched tasks [ aebaff2e-92fd-47e6-8423-48ceeb21f231, e7db282a-dc45-4a52-a48d-58e58c27f556 ] in child containers [ dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675, dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 ]
> I1101 19:07:49.386710 24337 default_executor.cpp:713] Waiting for child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 of task 'aebaff2e-92fd-47e6-8423-48ceeb21f231'
> I1101 19:07:49.387315 24337 default_executor.cpp:713] Waiting for child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 of task 'e7db282a-dc45-4a52-a48d-58e58c27f556'
> I1101 19:07:49.446444 24331 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.458606 24335 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:07:49.499390 24332 default_executor.cpp:191] Received KILL event
> I1101 19:07:49.499712 24332 default_executor.cpp:1172] Received kill for task 'aebaff2e-92fd-47e6-8423-48ceeb21f231'
> I1101 19:07:49.500016 24332 default_executor.cpp:1057] Killing task aebaff2e-92fd-47e6-8423-48ceeb21f231 running in child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 with SIGTERM signal
> I1101 19:07:49.500139 24332 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:07:49.501317 24332 default_executor.cpp:191] Received KILL event
> I1101 19:07:49.501617 24332 default_executor.cpp:1172] Received kill for task 'e7db282a-dc45-4a52-a48d-58e58c27f556'
> I1101 19:07:49.501972 24332 default_executor.cpp:1057] Killing task e7db282a-dc45-4a52-a48d-58e58c27f556 running in child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 with SIGTERM signal
> I1101 19:07:49.502081 24332 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:07:49.577337 24332 default_executor.cpp:888] Child container dcceb657-8f81-4486-8a08-e7fa9651fdac.cb2c9a1a-d8ce-440b-a5d5-311ac527f675 of task 'aebaff2e-92fd-47e6-8423-48ceeb21f231' completed in state TASK_KILLED: Command terminated with signal Killed
> I1101 19:07:49.577422 24332 default_executor.cpp:924] Killing task group containing tasks [ aebaff2e-92fd-47e6-8423-48ceeb21f231, e7db282a-dc45-4a52-a48d-58e58c27f556 ]
> I1101 19:07:49.588505 24332 default_executor.cpp:888] Child container dcceb657-8f81-4486-8a08-e7fa9651fdac.a3b934a2-5cb6-4612-a369-2fa26897e9b6 of task 'e7db282a-dc45-4a52-a48d-58e58c27f556' completed in state TASK_KILLED: Command terminated with signal Killed
> I1101 19:07:49.588593 24332 default_executor.cpp:1017] Terminating after 1secs
> [       OK ] MesosContainerizer/DefaultExecutorTest.KillMultipleTasks/0 (1013 ms)
> 
> 
> [ RUN      ] ROOT_DOCKER_DockerAndMesosContainerizers/DefaultExecutorTest.KillMultipleTasks/0
> I1101 19:44:45.021219 24574 executor.cpp:192] Version: 1.5.0
> I1101 19:44:45.062325 24591 default_executor.cpp:191] Received SUBSCRIBED event
> I1101 19:44:45.066876 24591 default_executor.cpp:195] Subscribed executor on workstation
> I1101 19:44:45.067586 24591 default_executor.cpp:191] Received LAUNCH_GROUP event
> I1101 19:44:45.070425 24590 default_executor.cpp:402] Setting 'MESOS_CONTAINER_IP' to: 10.0.2.5
> I1101 19:44:45.101138 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.120609 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.200438 24592 default_executor.cpp:640] Successfully launched tasks [ bd4ea3aa-e920-4f5b-8fc1-11986c006e8f, 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 ] in child containers [ decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092, decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b ]
> I1101 19:44:45.252046 24592 default_executor.cpp:713] Waiting for child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 of task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f'
> I1101 19:44:45.255779 24592 default_executor.cpp:713] Waiting for child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b of task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4'
> I1101 19:44:45.289633 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.295717 24588 default_executor.cpp:191] Received ACKNOWLEDGED event
> I1101 19:44:45.355026 24589 default_executor.cpp:191] Received KILL event
> I1101 19:44:45.355679 24589 default_executor.cpp:1172] Received kill for task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f'
> I1101 19:44:45.355995 24589 default_executor.cpp:1057] Killing task bd4ea3aa-e920-4f5b-8fc1-11986c006e8f running in child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 with SIGTERM signal
> I1101 19:44:45.356132 24589 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:44:45.357436 24589 default_executor.cpp:191] Received KILL event
> I1101 19:44:45.357635 24589 default_executor.cpp:1172] Received kill for task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4'
> I1101 19:44:45.357844 24589 default_executor.cpp:1057] Killing task 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 running in child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b with SIGTERM signal
> I1101 19:44:45.358074 24589 default_executor.cpp:1079] Scheduling escalation to SIGKILL in 3secs from now
> I1101 19:44:45.519832 24592 default_executor.cpp:888] Child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.bb89dcf8-c30d-4fe1-a42b-91e1e0ff221b of task '187e2bdc-38a4-4e3d-bb74-33fb816e31c4' completed in state TASK_KILLED: Command terminated with signal Killed
> I1101 19:44:45.520102 24592 default_executor.cpp:924] Killing task group containing tasks [ bd4ea3aa-e920-4f5b-8fc1-11986c006e8f, 187e2bdc-38a4-4e3d-bb74-33fb816e31c4 ]
> I1101 19:44:45.521134 24592 default_executor.cpp:888] Child container decae4b4-dd75-4c12-8d8f-cfee34c3bf70.c1190d4b-8ebd-42e8-bc04-2c295318d092 of task 'bd4ea3aa-e920-4f5b-8fc1-11986c006e8f' completed in state TASK_KILLED: Command terminated with signal Terminated
> I1101 19:44:45.521200 24592 default_executor.cpp:1017] Terminating after 1secs
> [       OK ] ROOT_DOCKER_DockerAndMesosContainerizers/DefaultExecutorTest.KillMultipleTasks/0 (1417 ms)
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Gaston Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/#review189774
-----------------------------------------------------------



LGTM, just two small comments:

1) The `TASK_STARTING` changes have landed, so we'll have to update the test.
2) There's a new helper method that we should use to create the `KILL` call.


src/tests/default_executor_tests.cpp
Lines 1288 (patched)
<https://reviews.apache.org/r/62775/#comment267002>

    The default executor now sends a `TASK_STARTING` update, so we have to update this test.



src/tests/default_executor_tests.cpp
Lines 1358-1367 (patched)
<https://reviews.apache.org/r/62775/#comment267001>

    Nit: this should call the new `createCallKill` helper method.


- Gaston Kleiman


On Oct. 16, 2017, 1:36 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2017, 1:36 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 68312010a45df5dbdb6d9d4c49d1faa5d8c60472 
>   src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/#review188114
-----------------------------------------------------------



Patch looks great!

Reviews applied: [62685, 62326, 62327, 62774, 62775]

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 Oct. 16, 2017, 11:36 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2017, 11:36 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 68312010a45df5dbdb6d9d4c49d1faa5d8c60472 
>   src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Qian Zhang <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/
-----------------------------------------------------------

(Updated Oct. 16, 2017, 4:36 p.m.)


Review request for mesos, Anand Mazumdar and Vinod Kone.


Changes
-------

Fixed the issue that the task did not exit with 0.


Summary (updated)
-----------------

Added a test `ROOT_NoTransitionFromKillingToFinished`.


Bugs: MESOS-7975
    https://issues.apache.org/jira/browse/MESOS-7975


Repository: mesos


Description (updated)
-------

Added a test `ROOT_NoTransitionFromKillingToFinished`.


Diffs (updated)
-----

  src/tests/default_executor_tests.cpp 68312010a45df5dbdb6d9d4c49d1faa5d8c60472 
  src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 


Diff: https://reviews.apache.org/r/62775/diff/2/

Changes: https://reviews.apache.org/r/62775/diff/1-2/


Testing
-------


Thanks,

Qian Zhang


Re: Review Request 62775: Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/#review187109
-----------------------------------------------------------



PASS: Mesos patch 62775 was successfully built and tested.

Reviews applied: `['62685', '62326', '62327', '62774', '62775']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775

- Mesos Reviewbot Windows


On Oct. 4, 2017, 6:48 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2017, 6:48 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 2b4c643b8fb2fc8f2a5e98984ae1c267f66885d1 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/#review187113
-----------------------------------------------------------



Patch looks great!

Reviews applied: [62685, 62326, 62327, 62774, 62775]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Oct. 4, 2017, 3:48 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2017, 3:48 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 2b4c643b8fb2fc8f2a5e98984ae1c267f66885d1 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.

Posted by Qian Zhang <zh...@gmail.com>.

> On Oct. 5, 2017, 4:40 a.m., Gaston Kleiman wrote:
> > src/tests/default_executor_tests.cpp
> > Lines 1273-1277 (patched)
> > <https://reviews.apache.org/r/62775/diff/1/?file=1846112#file1846112line1273>
> >
> >     You could use the `KillPolicyTestHelper` with `--sleep_duration=0` instead of this.
> >     
> >     If you do that, you don't need to mark the test as `ROOT_INTERNET_CURL` and it will be run more often.
> 
> Qian Zhang wrote:
>     Thanks, I have tried it, and found an issue about this test: When I use the `nginx:alpine` image and ran this test, I found:
>     ```
>     [ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished/0
>     ...
>     I1006 06:32:32.615941 29160 default_executor.cpp:1004] Killing task 6eacb18a-69f6-48ca-8ffd-4134b75c8525 running in child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be with SIGTERM signal
>     I1006 06:32:32.616163 29160 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 06:32:32.664510 29177 default_executor.cpp:185] Received ACKNOWLEDGED event
>     I1006 06:32:32.700647 29180 default_executor.cpp:842] Child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be of task '6eacb18a-69f6-48ca-8ffd-4134b75c8525' in state TASK_KILLED terminated with signal Terminated
>     ...
>     ```
>     
>     And when I use `KillPolicyTestHelper` with `--sleep_duration=0` and run this test, I found:
>     ```
>     [ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_NoTransitionFromKillingToFinished/0
>     I1006 06:38:32.138226 30407 default_executor.cpp:1004] Killing task 636f6b03-b083-4522-813e-aa2122e60915 running in child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 with SIGTERM signal
>     I1006 06:38:32.138247 30407 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 06:38:32.187152 30421 default_executor.cpp:185] Received ACKNOWLEDGED event
>     I1006 06:38:32.225972 30423 default_executor.cpp:842] Child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 of task '636f6b03-b083-4522-813e-aa2122e60915' in state TASK_KILLED terminated with signal Killed
>     ```
>     
>     So as you see, the child container was terminated with either `signal Terminated` (SIGTERM) or `signal Killed` (SIGKILL), this seems not correct, because when I run the same task group (`nginx:alpine` or `KillPolicyTestHelper`) with `mesos-execute`, I see:
>     ```
>     I1006 01:35:42.375380 12666 default_executor.cpp:1004] Killing task test1 running in child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 with SIGTERM signal
>     I1006 01:35:42.375432 12666 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 01:35:42.530655 12635 default_executor.cpp:842] Child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 of task 'test1' in state TASK_KILLED exited with status 0
>     ```
>     This time the child container exited with status 0 rather than terminated with any signal, I think this is correct behavior. So it seems as long as I run the test, the task (child container) never exits with 0, this is not what we expect. I am not sure what's wrong with test, any comments?
> 
> Gaston Kleiman wrote:
>     Have you tried setting `CommandInfo.shell` to `false` and adding `--sleep_duration=0` to `CommandInfo.arguments`? If `CommandInfo.shell` is set to `true`, `sh` will receive the SIGTERM signal and exit instead of propagating it to the helper.

Yeah, I have already set it, here is the diff on top of this patch:
```
-  v1::CommandInfo command;
-  command.set_shell(false);
+  v1::CommandInfo commandInfo;
+  commandInfo.set_shell(false);
+  commandInfo.set_value(getTestHelperPath("test-helper"));
+  commandInfo.add_arguments("test-helper");
+  commandInfo.add_arguments(KillPolicyTestHelper::NAME);
+  commandInfo.add_arguments("--sleep_duration=1");
 
   v1::TaskInfo taskInfo = v1::createTask(
       agentId,
       v1::Resources::parse("cpus:0.1;mem:32;disk:32").get(),
-      command);
-
-  // The "nginx:alpine" container returns an "EXIT_STATUS" of 0 on
-  // receiving a SIGTERM.
-  mesos::v1::Image image;
-  image.set_type(mesos::v1::Image::DOCKER);
-  image.mutable_docker()->set_name("nginx:alpine");
-
-  mesos::v1::ContainerInfo* container = taskInfo.mutable_container();
-  container->set_type(mesos::v1::ContainerInfo::MESOS);
-  container->mutable_mesos()->mutable_image()->CopyFrom(image);
+      commandInfo);
```

After debugging, I found the nested container status file does not exist:
```
ls: cannot access /tmp/MesosContainerizer_DefaultExecutorTest_ROOT_NoTransitionFromKillingToFinished_0_kztkSB/containers/c649ec7d-972c-4d4c-8c3a-14d6fdc44bce/containers/3cafd0f9-f8c7-49b9-8865-6c74f9483dc0/status: No such file or directory
```
But this file exists when the task is running, I am not sure why it gets deleted during the test. If this file does not exist, the nested container will be considered as termiated by SIGKILL (see https://github.com/apache/mesos/blob/1.4.0/src/slave/containerizer/mesos/containerizer.cpp#L2600).


- Qian


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


On Oct. 4, 2017, 11:48 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2017, 11:48 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 2b4c643b8fb2fc8f2a5e98984ae1c267f66885d1 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Qian Zhang <zh...@gmail.com>.

> On Oct. 5, 2017, 4:40 a.m., Gaston Kleiman wrote:
> > src/tests/default_executor_tests.cpp
> > Lines 1273-1277 (patched)
> > <https://reviews.apache.org/r/62775/diff/1/?file=1846112#file1846112line1273>
> >
> >     You could use the `KillPolicyTestHelper` with `--sleep_duration=0` instead of this.
> >     
> >     If you do that, you don't need to mark the test as `ROOT_INTERNET_CURL` and it will be run more often.
> 
> Qian Zhang wrote:
>     Thanks, I have tried it, and found an issue about this test: When I use the `nginx:alpine` image and ran this test, I found:
>     ```
>     [ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished/0
>     ...
>     I1006 06:32:32.615941 29160 default_executor.cpp:1004] Killing task 6eacb18a-69f6-48ca-8ffd-4134b75c8525 running in child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be with SIGTERM signal
>     I1006 06:32:32.616163 29160 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 06:32:32.664510 29177 default_executor.cpp:185] Received ACKNOWLEDGED event
>     I1006 06:32:32.700647 29180 default_executor.cpp:842] Child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be of task '6eacb18a-69f6-48ca-8ffd-4134b75c8525' in state TASK_KILLED terminated with signal Terminated
>     ...
>     ```
>     
>     And when I use `KillPolicyTestHelper` with `--sleep_duration=0` and run this test, I found:
>     ```
>     [ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_NoTransitionFromKillingToFinished/0
>     I1006 06:38:32.138226 30407 default_executor.cpp:1004] Killing task 636f6b03-b083-4522-813e-aa2122e60915 running in child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 with SIGTERM signal
>     I1006 06:38:32.138247 30407 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 06:38:32.187152 30421 default_executor.cpp:185] Received ACKNOWLEDGED event
>     I1006 06:38:32.225972 30423 default_executor.cpp:842] Child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 of task '636f6b03-b083-4522-813e-aa2122e60915' in state TASK_KILLED terminated with signal Killed
>     ```
>     
>     So as you see, the child container was terminated with either `signal Terminated` (SIGTERM) or `signal Killed` (SIGKILL), this seems not correct, because when I run the same task group (`nginx:alpine` or `KillPolicyTestHelper`) with `mesos-execute`, I see:
>     ```
>     I1006 01:35:42.375380 12666 default_executor.cpp:1004] Killing task test1 running in child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 with SIGTERM signal
>     I1006 01:35:42.375432 12666 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 01:35:42.530655 12635 default_executor.cpp:842] Child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 of task 'test1' in state TASK_KILLED exited with status 0
>     ```
>     This time the child container exited with status 0 rather than terminated with any signal, I think this is correct behavior. So it seems as long as I run the test, the task (child container) never exits with 0, this is not what we expect. I am not sure what's wrong with test, any comments?
> 
> Gaston Kleiman wrote:
>     Have you tried setting `CommandInfo.shell` to `false` and adding `--sleep_duration=0` to `CommandInfo.arguments`? If `CommandInfo.shell` is set to `true`, `sh` will receive the SIGTERM signal and exit instead of propagating it to the helper.
> 
> Qian Zhang wrote:
>     Yeah, I have already set it, here is the diff on top of this patch:
>     ```
>     -  v1::CommandInfo command;
>     -  command.set_shell(false);
>     +  v1::CommandInfo commandInfo;
>     +  commandInfo.set_shell(false);
>     +  commandInfo.set_value(getTestHelperPath("test-helper"));
>     +  commandInfo.add_arguments("test-helper");
>     +  commandInfo.add_arguments(KillPolicyTestHelper::NAME);
>     +  commandInfo.add_arguments("--sleep_duration=1");
>      
>        v1::TaskInfo taskInfo = v1::createTask(
>            agentId,
>            v1::Resources::parse("cpus:0.1;mem:32;disk:32").get(),
>     -      command);
>     -
>     -  // The "nginx:alpine" container returns an "EXIT_STATUS" of 0 on
>     -  // receiving a SIGTERM.
>     -  mesos::v1::Image image;
>     -  image.set_type(mesos::v1::Image::DOCKER);
>     -  image.mutable_docker()->set_name("nginx:alpine");
>     -
>     -  mesos::v1::ContainerInfo* container = taskInfo.mutable_container();
>     -  container->set_type(mesos::v1::ContainerInfo::MESOS);
>     -  container->mutable_mesos()->mutable_image()->CopyFrom(image);
>     +      commandInfo);
>     ```
>     
>     After debugging, I found the nested container status file does not exist:
>     ```
>     ls: cannot access /tmp/MesosContainerizer_DefaultExecutorTest_ROOT_NoTransitionFromKillingToFinished_0_kztkSB/containers/c649ec7d-972c-4d4c-8c3a-14d6fdc44bce/containers/3cafd0f9-f8c7-49b9-8865-6c74f9483dc0/status: No such file or directory
>     ```
>     But this file exists when the task is running, I am not sure why it gets deleted during the test. If this file does not exist, the nested container will be considered as termiated by SIGKILL (see https://github.com/apache/mesos/blob/1.4.0/src/slave/containerizer/mesos/containerizer.cpp#L2600).

Found the root cause of this issue, receiving `TASK_RUNNING` does not guarantee the task (`test-helper`) is fully started, so if we kill the task right after receiving `TASK_RUNNING`, the task may not be ready yet (e.g., the signal handler is not set), that's why `SIGTERM` was not handled as what we expect. We need to make sure the task is fully started before killing it.


- Qian


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


On Oct. 16, 2017, 4:36 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2017, 4:36 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 68312010a45df5dbdb6d9d4c49d1faa5d8c60472 
>   src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.

Posted by Qian Zhang <zh...@gmail.com>.

> On Oct. 5, 2017, 4:40 a.m., Gaston Kleiman wrote:
> > src/tests/default_executor_tests.cpp
> > Lines 1273-1277 (patched)
> > <https://reviews.apache.org/r/62775/diff/1/?file=1846112#file1846112line1273>
> >
> >     You could use the `KillPolicyTestHelper` with `--sleep_duration=0` instead of this.
> >     
> >     If you do that, you don't need to mark the test as `ROOT_INTERNET_CURL` and it will be run more often.

Thanks, I have tried it, and found an issue about this test: When I use the `nginx:alpine` image and ran this test, I found:
```
[ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished/0
...
I1006 06:32:32.615941 29160 default_executor.cpp:1004] Killing task 6eacb18a-69f6-48ca-8ffd-4134b75c8525 running in child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be with SIGTERM signal
I1006 06:32:32.616163 29160 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
I1006 06:32:32.664510 29177 default_executor.cpp:185] Received ACKNOWLEDGED event
I1006 06:32:32.700647 29180 default_executor.cpp:842] Child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be of task '6eacb18a-69f6-48ca-8ffd-4134b75c8525' in state TASK_KILLED terminated with signal Terminated
...
```

And when I use `KillPolicyTestHelper` with `--sleep_duration=0` and run this test, I found:
```
[ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_NoTransitionFromKillingToFinished/0
I1006 06:38:32.138226 30407 default_executor.cpp:1004] Killing task 636f6b03-b083-4522-813e-aa2122e60915 running in child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 with SIGTERM signal
I1006 06:38:32.138247 30407 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
I1006 06:38:32.187152 30421 default_executor.cpp:185] Received ACKNOWLEDGED event
I1006 06:38:32.225972 30423 default_executor.cpp:842] Child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 of task '636f6b03-b083-4522-813e-aa2122e60915' in state TASK_KILLED terminated with signal Killed
```

So as you see, the child container was terminated with either `signal Terminated` (SIGTERM) or `signal Killed` (SIGKILL), this seems not correct, because when I run the same task group (`nginx:alpine` or `KillPolicyTestHelper`) with `mesos-execute`, I see:
```
I1006 01:35:42.375380 12666 default_executor.cpp:1004] Killing task test1 running in child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 with SIGTERM signal
I1006 01:35:42.375432 12666 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
I1006 01:35:42.530655 12635 default_executor.cpp:842] Child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 of task 'test1' in state TASK_KILLED exited with status 0
```
This time the child container exited with status 0 rather than terminated with any signal, I think this is correct behavior. So it seems as long as I run the test, the task (child container) never exits with 0, this is not what we expect. I am not sure what's wrong with test, any comments?


- Qian


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


On Oct. 4, 2017, 11:48 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2017, 11:48 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 2b4c643b8fb2fc8f2a5e98984ae1c267f66885d1 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_NoTransitionFromKillingToFinished`.

Posted by Gaston Kleiman <ga...@mesosphere.io>.

> On Oct. 4, 2017, 1:40 p.m., Gaston Kleiman wrote:
> > src/tests/default_executor_tests.cpp
> > Lines 1273-1277 (patched)
> > <https://reviews.apache.org/r/62775/diff/1/?file=1846112#file1846112line1273>
> >
> >     You could use the `KillPolicyTestHelper` with `--sleep_duration=0` instead of this.
> >     
> >     If you do that, you don't need to mark the test as `ROOT_INTERNET_CURL` and it will be run more often.
> 
> Qian Zhang wrote:
>     Thanks, I have tried it, and found an issue about this test: When I use the `nginx:alpine` image and ran this test, I found:
>     ```
>     [ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished/0
>     ...
>     I1006 06:32:32.615941 29160 default_executor.cpp:1004] Killing task 6eacb18a-69f6-48ca-8ffd-4134b75c8525 running in child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be with SIGTERM signal
>     I1006 06:32:32.616163 29160 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 06:32:32.664510 29177 default_executor.cpp:185] Received ACKNOWLEDGED event
>     I1006 06:32:32.700647 29180 default_executor.cpp:842] Child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be of task '6eacb18a-69f6-48ca-8ffd-4134b75c8525' in state TASK_KILLED terminated with signal Terminated
>     ...
>     ```
>     
>     And when I use `KillPolicyTestHelper` with `--sleep_duration=0` and run this test, I found:
>     ```
>     [ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_NoTransitionFromKillingToFinished/0
>     I1006 06:38:32.138226 30407 default_executor.cpp:1004] Killing task 636f6b03-b083-4522-813e-aa2122e60915 running in child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 with SIGTERM signal
>     I1006 06:38:32.138247 30407 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 06:38:32.187152 30421 default_executor.cpp:185] Received ACKNOWLEDGED event
>     I1006 06:38:32.225972 30423 default_executor.cpp:842] Child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 of task '636f6b03-b083-4522-813e-aa2122e60915' in state TASK_KILLED terminated with signal Killed
>     ```
>     
>     So as you see, the child container was terminated with either `signal Terminated` (SIGTERM) or `signal Killed` (SIGKILL), this seems not correct, because when I run the same task group (`nginx:alpine` or `KillPolicyTestHelper`) with `mesos-execute`, I see:
>     ```
>     I1006 01:35:42.375380 12666 default_executor.cpp:1004] Killing task test1 running in child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 with SIGTERM signal
>     I1006 01:35:42.375432 12666 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 01:35:42.530655 12635 default_executor.cpp:842] Child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 of task 'test1' in state TASK_KILLED exited with status 0
>     ```
>     This time the child container exited with status 0 rather than terminated with any signal, I think this is correct behavior. So it seems as long as I run the test, the task (child container) never exits with 0, this is not what we expect. I am not sure what's wrong with test, any comments?
> 
> Gaston Kleiman wrote:
>     Have you tried setting `CommandInfo.shell` to `false` and adding `--sleep_duration=0` to `CommandInfo.arguments`? If `CommandInfo.shell` is set to `true`, `sh` will receive the SIGTERM signal and exit instead of propagating it to the helper.
> 
> Qian Zhang wrote:
>     Yeah, I have already set it, here is the diff on top of this patch:
>     ```
>     -  v1::CommandInfo command;
>     -  command.set_shell(false);
>     +  v1::CommandInfo commandInfo;
>     +  commandInfo.set_shell(false);
>     +  commandInfo.set_value(getTestHelperPath("test-helper"));
>     +  commandInfo.add_arguments("test-helper");
>     +  commandInfo.add_arguments(KillPolicyTestHelper::NAME);
>     +  commandInfo.add_arguments("--sleep_duration=1");
>      
>        v1::TaskInfo taskInfo = v1::createTask(
>            agentId,
>            v1::Resources::parse("cpus:0.1;mem:32;disk:32").get(),
>     -      command);
>     -
>     -  // The "nginx:alpine" container returns an "EXIT_STATUS" of 0 on
>     -  // receiving a SIGTERM.
>     -  mesos::v1::Image image;
>     -  image.set_type(mesos::v1::Image::DOCKER);
>     -  image.mutable_docker()->set_name("nginx:alpine");
>     -
>     -  mesos::v1::ContainerInfo* container = taskInfo.mutable_container();
>     -  container->set_type(mesos::v1::ContainerInfo::MESOS);
>     -  container->mutable_mesos()->mutable_image()->CopyFrom(image);
>     +      commandInfo);
>     ```
>     
>     After debugging, I found the nested container status file does not exist:
>     ```
>     ls: cannot access /tmp/MesosContainerizer_DefaultExecutorTest_ROOT_NoTransitionFromKillingToFinished_0_kztkSB/containers/c649ec7d-972c-4d4c-8c3a-14d6fdc44bce/containers/3cafd0f9-f8c7-49b9-8865-6c74f9483dc0/status: No such file or directory
>     ```
>     But this file exists when the task is running, I am not sure why it gets deleted during the test. If this file does not exist, the nested container will be considered as termiated by SIGKILL (see https://github.com/apache/mesos/blob/1.4.0/src/slave/containerizer/mesos/containerizer.cpp#L2600).
> 
> Qian Zhang wrote:
>     Found the root cause of this issue, receiving `TASK_RUNNING` does not guarantee the task (`test-helper`) is fully started, so if we kill the task right after receiving `TASK_RUNNING`, the task may not be ready yet (e.g., the signal handler is not set), that's why `SIGTERM` was not handled as what we expect. We need to make sure the task is fully started before killing it.

Good catch! Anand did something similar in https://reviews.apache.org/r/61575, but it hasn't been committed yet.


- Gaston


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


On Oct. 16, 2017, 1:36 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2017, 1:36 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 68312010a45df5dbdb6d9d4c49d1faa5d8c60472 
>   src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.

Posted by Gaston Kleiman <ga...@mesosphere.io>.

> On Oct. 4, 2017, 1:40 p.m., Gaston Kleiman wrote:
> > src/tests/default_executor_tests.cpp
> > Lines 1273-1277 (patched)
> > <https://reviews.apache.org/r/62775/diff/1/?file=1846112#file1846112line1273>
> >
> >     You could use the `KillPolicyTestHelper` with `--sleep_duration=0` instead of this.
> >     
> >     If you do that, you don't need to mark the test as `ROOT_INTERNET_CURL` and it will be run more often.
> 
> Qian Zhang wrote:
>     Thanks, I have tried it, and found an issue about this test: When I use the `nginx:alpine` image and ran this test, I found:
>     ```
>     [ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished/0
>     ...
>     I1006 06:32:32.615941 29160 default_executor.cpp:1004] Killing task 6eacb18a-69f6-48ca-8ffd-4134b75c8525 running in child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be with SIGTERM signal
>     I1006 06:32:32.616163 29160 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 06:32:32.664510 29177 default_executor.cpp:185] Received ACKNOWLEDGED event
>     I1006 06:32:32.700647 29180 default_executor.cpp:842] Child container 10f2af6b-232d-485e-86a0-9bbdd419a280.f6c078ba-9c08-4cb0-80fc-18bc154477be of task '6eacb18a-69f6-48ca-8ffd-4134b75c8525' in state TASK_KILLED terminated with signal Terminated
>     ...
>     ```
>     
>     And when I use `KillPolicyTestHelper` with `--sleep_duration=0` and run this test, I found:
>     ```
>     [ RUN      ] MesosContainerizer/DefaultExecutorTest.ROOT_NoTransitionFromKillingToFinished/0
>     I1006 06:38:32.138226 30407 default_executor.cpp:1004] Killing task 636f6b03-b083-4522-813e-aa2122e60915 running in child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 with SIGTERM signal
>     I1006 06:38:32.138247 30407 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 06:38:32.187152 30421 default_executor.cpp:185] Received ACKNOWLEDGED event
>     I1006 06:38:32.225972 30423 default_executor.cpp:842] Child container c9af5166-6aee-4cb3-890e-2846fcb1179e.0994b090-5e88-4a36-a63a-3eacbbbabf89 of task '636f6b03-b083-4522-813e-aa2122e60915' in state TASK_KILLED terminated with signal Killed
>     ```
>     
>     So as you see, the child container was terminated with either `signal Terminated` (SIGTERM) or `signal Killed` (SIGKILL), this seems not correct, because when I run the same task group (`nginx:alpine` or `KillPolicyTestHelper`) with `mesos-execute`, I see:
>     ```
>     I1006 01:35:42.375380 12666 default_executor.cpp:1004] Killing task test1 running in child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 with SIGTERM signal
>     I1006 01:35:42.375432 12666 default_executor.cpp:1026] Scheduling escalation to SIGKILL in 3secs from now
>     I1006 01:35:42.530655 12635 default_executor.cpp:842] Child container 814d48e9-4776-420a-8194-e61c820315be.921436e3-238e-4b86-a644-189c40d44da8 of task 'test1' in state TASK_KILLED exited with status 0
>     ```
>     This time the child container exited with status 0 rather than terminated with any signal, I think this is correct behavior. So it seems as long as I run the test, the task (child container) never exits with 0, this is not what we expect. I am not sure what's wrong with test, any comments?

Have you tried setting `CommandInfo.shell` to `false` and adding `--sleep_duration=0` to `CommandInfo.arguments`? If `CommandInfo.shell` is set to `true`, `sh` will receive the SIGTERM signal and exit instead of propagating it to the helper.


- Gaston


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


On Oct. 4, 2017, 8:48 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2017, 8:48 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 2b4c643b8fb2fc8f2a5e98984ae1c267f66885d1 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.

Posted by Gaston Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/#review187126
-----------------------------------------------------------




src/tests/default_executor_tests.cpp
Lines 1273-1277 (patched)
<https://reviews.apache.org/r/62775/#comment264048>

    You could use the `KillPolicyTestHelper` with `--sleep_duration=0` instead of this.
    
    If you do that, you don't need to mark the test as `ROOT_INTERNET_CURL` and it will be run more often.


- Gaston Kleiman


On Oct. 4, 2017, 8:48 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2017, 8:48 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 2b4c643b8fb2fc8f2a5e98984ae1c267f66885d1 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 62775: Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62775/#review187124
-----------------------------------------------------------



PASS: Mesos patch 62775 was successfully built and tested.

Reviews applied: `['62685', '62326', '62327', '62774', '62775']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62775

- Mesos Reviewbot Windows


On Oct. 4, 2017, 3:48 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62775/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2017, 3:48 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-7975
>     https://issues.apache.org/jira/browse/MESOS-7975
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_INTERNET_CURL_NoTransitionFromKillingToFinished`.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 2b4c643b8fb2fc8f2a5e98984ae1c267f66885d1 
> 
> 
> Diff: https://reviews.apache.org/r/62775/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>