You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrew Schwartzmeyer <an...@schwartzmeyer.com> on 2017/09/18 20:42:55 UTC

Review Request 62391: Fixed invalid handle bug in `os::process()`.

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

Review request for mesos, James Peach and Joseph Wu.


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


Repository: mesos


Description
-------

This patch fixes a bug found by running `mesos-tests` under Application
Verifier on Windows. Mesos was inadvertently attempting to get a process
handle for the System Idle Process with PID `0`, which is not permitted
by the OS. To remedy this, we now check if `os::process` receives `0`
for its argument, and return an error if so. Furthermore, we remove the
PID `0` from the `os::pids` API, as it is not useful to the programmer,
and only serves to cause errors later. Finally, the return value for
`OpenProcess` was being incorrectly checked, as the API returns a
`nullptr` on failure, not `INVALID_HANDLE_VALUE`.


Diffs
-----

  3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 


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


Testing
-------

Built and ran `mesos-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.


Thanks,

Andrew Schwartzmeyer


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.

> On Sept. 19, 2017, 12:32 p.m., Mesos Reviewbot Windows wrote:
> > FAIL: The file 'C:mesosbuild-outputlogsstout-tests-build-cmake-stdout.log' already exists.
> > 
> > Reviews applied: `['62391']`
> > 
> > All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62391

This looks to be a CI failure the team is investigating.


- Andrew


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


On Sept. 19, 2017, 11 a.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 19, 2017, 11 a.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
>   3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/3/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

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



FAIL: The file 'C:mesosbuild-outputlogsstout-tests-build-cmake-stdout.log' already exists.

Reviews applied: `['62391']`

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

- Mesos Reviewbot Windows


On Sept. 19, 2017, 6 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 19, 2017, 6 p.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
>   3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/3/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

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



PASS: Mesos patch 62391 was successfully built and tested.

Reviews applied: `['62391']`

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

- Mesos Reviewbot Windows


On Sept. 19, 2017, 6 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 19, 2017, 6 p.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
>   3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/3/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62391/
-----------------------------------------------------------

(Updated Sept. 19, 2017, 11 a.m.)


Review request for mesos, James Peach and Joseph Wu.


Changes
-------

Fix style in test.


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


Repository: mesos


Description
-------

This patch fixes a bug found by running `mesos-tests` under Application
Verifier on Windows. Mesos was inadvertently attempting to get a process
handle for the System Idle Process with PID `0`, which is not permitted
by the OS. To remedy this, we now check if `os::process` receives `0`
for its argument, and return an error if so. Furthermore, we remove the
PID `0` from the `os::pids` API, as it is not useful to the programmer,
and only serves to cause errors later. Finally, the return value for
`OpenProcess` was being incorrectly checked, as the API returns a
`nullptr` on failure, not `INVALID_HANDLE_VALUE`.


Diffs (updated)
-----

  3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
  3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 


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

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


Testing
-------

Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.


Thanks,

Andrew Schwartzmeyer


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.

> On Sept. 18, 2017, 8:29 p.m., Mesos Reviewbot Windows wrote:
> > FAIL: Some Mesos tests failed.
> > 
> > Reviews applied: `['62391']`
> > 
> > Failed command: `C:\mesos\src\mesos-tests.exe --verbose`
> > 
> > All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62391
> > 
> > Relevant logs:
> > 
> > - [mesos-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62391/logs/mesos-tests-stdout.log):
> > 
> > ```
> > [ RUN      ] ContentType/SchedulerTest.SchedulerReconnect/0
> > [       OK ] ContentType/SchedulerTest.SchedulerReconnect/0 (228 ms)
> > [ RUN      ] ContentType/SchedulerTest.SchedulerReconnect/1
> > [       OK ] ContentType/SchedulerTest.SchedulerReconnect/1 (256 ms)
> > [----------] 30 tests from ContentType/SchedulerTest (25650 ms total)
> > 
> > [----------] 2 tests from ContentTypeAndSSLConfig/SchedulerSSLTest
> > [ RUN      ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/0
> > [       OK ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/0 (992 ms)
> > [ RUN      ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/1
> > [       OK ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/1 (994 ms)
> > [----------] 2 tests from ContentTypeAndSSLConfig/SchedulerSSLTest (2063 ms total)
> > 
> > [----------] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest
> > [ RUN      ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0
> > [       OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0 (125 ms)
> > [ RUN      ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1
> > [       OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1 (158 ms)
> > [----------] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest (332 ms total)
> > 
> > [----------] Global test environment tear-down
> > [==========] 627 tests from 66 test cases ran. (341688 ms total)
> > [  PASSED  ] 626 tests.
> > [  FAILED  ] 1 test, listed below:
> > [  FAILED  ] ContentType/MasterAPITest.EventAuthorizationFiltering/1, where GetParam() = application/json
> > 
> >  1 FAILED TEST
> >   YOU HAVE 174 DISABLED TESTS
> > 
> > ```
> > 
> > - [mesos-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62391/logs/mesos-tests-stderr.log):
> > 
> > ```
> > I0919 03:28:55.491580 17364 master.cpp:8418] Removing framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (default)
> > I0919 03:28:55.491580 17364 master.cpp:3267] Deactivating framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (default)
> > I0919 03:28:55.491580 21948 hierarchical.cpp:412] Deactivated framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
> > I0919 03:28:55.492578 22180 slave.cpp:3235] Shutting down framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
> > I0919 03:28:55.492578 17364 master.cpp:8993] Updating the state of task 1eef69ce-5917-4e39-b018-eea8b719f3f8 of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (latest state: TASK_KILLED, status update state: TASK_KILLED)
> > I0919 03:28:55.492578 22180 slave.cpp:5731] Shutting down executor 'default' of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (via HTTP)
> > I0919 03:28:55.504575 17364 master.cpp:9087] Removing task 1eef69ce-5917-4e39-b018-eea8b719f3f8 with resources [{"allocation_info":{"role":"*"},"name":"cpus","scalar":{"value":2.0},"type":"SCALAR"},{"allocation_info":{"role":"*"},"name":"mem","scalar":{"value":1024.0},"type":"SCALAR"},{"allocation_info":{"role":"*"},"name":"disk","scalar":{"value":1024.0},"type":"SCALAR"},{"allocation_info":{"role":"*"},"name":"ports","ranges":{"range":[{"begin":31000,"end":32000}]},"type":"RANGES"}] of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 on agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
> > I0919 03:28:55.515578 17364 master.cpp:9116] Removing executor 'default' with resources [] of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 on agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
> > I0919 03:28:55.527577 22180 hierarchical.cpp:355] Removed framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
> > E0919 03:28:55.528578 21784 scheduler.cpp:649] End-Of-File received from master. The master closed the event stream
> > I0919 03:28:55.530576 19512 scheduler.cpp:444] Re-detecting master
> > I0919 03:28:55.533577 19512 scheduler.cpp:470] New master detected at master@10.3.1.5:54306
> > I0919 03:28:55.545578 17364 slave.cpp:5407] Executor 'default' of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 exited with status 0
> > I0919 03:28:55.545578 17364 slave.cpp:5511] Cleaning up executor 'default' of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (via HTTP)
> > W0919 03:28:55.546577 21784 master.cpp:7021] Ignoring unknown exited executor 'default' of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 on agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
> > I0919 03:28:55.547579 22180 gc.cpp:91] Scheduling 'C:\Users\mesos\AppData\Local\Temp\2\kJF7PT\slaves\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0\frameworks\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000\executors\default\runs\08d9a512-2960-4a5c-8a21-0ce143d2e5a8' for gc 6.99999366228148days in the future
> > I0919 03:28:55.548580 17364 slave.cpp:5607] Cleaning up framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
> > I0919 03:28:55.560578 19512 status_update_manager.cpp:285] Closing status update streams for framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
> > I0919 03:28:55.560578 22180 gc.cpp:91] Scheduling 'C:\Users\mesos\AppData\Local\Temp\2\kJF7PT\slaves\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0\frameworks\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000\executors\default' for gc 6.99999365068148days in the future
> > I0919 03:28:55.561579 17364 slave.cpp:861] Agent terminating
> > I0919 03:28:55.561579 22180 gc.cpp:91] Scheduling 'C:\Users\mesos\AppData\Local\Temp\2\kJF7PT\slaves\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0\frameworks\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000' for gc 6.9999935118163days in the future
> > I0919 03:28:55.570580 22016 master.cpp:1321] Agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net) disconnected
> > I0919 03:28:55.571578 22016 master.cpp:3304] Disconnecting agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
> > I0919 03:28:55.571578 22016 master.cpp:3323] Deactivating agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
> > I0919 03:28:55.572579 22180 hierarchical.cpp:690] Agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 deactivated
> > I0919 03:28:55.596582 20824 master.cpp:1163] Master terminating
> > I0919 03:28:55.609583 22016 hierarchical.cpp:626] Removed agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0
> > W0919 03:28:55.617583 20824 master.hpp:2761] Failed to close HTTP pipe for d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (default)
> > I0919 03:28:56.359222 21132 process.cpp:1068] Failed to accept socket: future discarded
> > ```

This can be ignored, it's https://issues.apache.org/jira/browse/MESOS-7945.


- Andrew


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


On Sept. 18, 2017, 4:39 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2017, 4:39 p.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
>   3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/2/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

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



FAIL: Some Mesos tests failed.

Reviews applied: `['62391']`

Failed command: `C:\mesos\src\mesos-tests.exe --verbose`

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

Relevant logs:

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

```
[ RUN      ] ContentType/SchedulerTest.SchedulerReconnect/0
[       OK ] ContentType/SchedulerTest.SchedulerReconnect/0 (228 ms)
[ RUN      ] ContentType/SchedulerTest.SchedulerReconnect/1
[       OK ] ContentType/SchedulerTest.SchedulerReconnect/1 (256 ms)
[----------] 30 tests from ContentType/SchedulerTest (25650 ms total)

[----------] 2 tests from ContentTypeAndSSLConfig/SchedulerSSLTest
[ RUN      ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/0
[       OK ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/0 (992 ms)
[ RUN      ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/1
[       OK ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/1 (994 ms)
[----------] 2 tests from ContentTypeAndSSLConfig/SchedulerSSLTest (2063 ms total)

[----------] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest
[ RUN      ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0
[       OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0 (125 ms)
[ RUN      ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1
[       OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1 (158 ms)
[----------] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest (332 ms total)

[----------] Global test environment tear-down
[==========] 627 tests from 66 test cases ran. (341688 ms total)
[  PASSED  ] 626 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] ContentType/MasterAPITest.EventAuthorizationFiltering/1, where GetParam() = application/json

 1 FAILED TEST
  YOU HAVE 174 DISABLED TESTS

```

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

```
I0919 03:28:55.491580 17364 master.cpp:8418] Removing framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (default)
I0919 03:28:55.491580 17364 master.cpp:3267] Deactivating framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (default)
I0919 03:28:55.491580 21948 hierarchical.cpp:412] Deactivated framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
I0919 03:28:55.492578 22180 slave.cpp:3235] Shutting down framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
I0919 03:28:55.492578 17364 master.cpp:8993] Updating the state of task 1eef69ce-5917-4e39-b018-eea8b719f3f8 of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (latest state: TASK_KILLED, status update state: TASK_KILLED)
I0919 03:28:55.492578 22180 slave.cpp:5731] Shutting down executor 'default' of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (via HTTP)
I0919 03:28:55.504575 17364 master.cpp:9087] Removing task 1eef69ce-5917-4e39-b018-eea8b719f3f8 with resources [{"allocation_info":{"role":"*"},"name":"cpus","scalar":{"value":2.0},"type":"SCALAR"},{"allocation_info":{"role":"*"},"name":"mem","scalar":{"value":1024.0},"type":"SCALAR"},{"allocation_info":{"role":"*"},"name":"disk","scalar":{"value":1024.0},"type":"SCALAR"},{"allocation_info":{"role":"*"},"name":"ports","ranges":{"range":[{"begin":31000,"end":32000}]},"type":"RANGES"}] of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 on agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0919 03:28:55.515578 17364 master.cpp:9116] Removing executor 'default' with resources [] of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 on agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0919 03:28:55.527577 22180 hierarchical.cpp:355] Removed framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
E0919 03:28:55.528578 21784 scheduler.cpp:649] End-Of-File received from master. The master closed the event stream
I0919 03:28:55.530576 19512 scheduler.cpp:444] Re-detecting master
I0919 03:28:55.533577 19512 scheduler.cpp:470] New master detected at master@10.3.1.5:54306
I0919 03:28:55.545578 17364 slave.cpp:5407] Executor 'default' of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 exited with status 0
I0919 03:28:55.545578 17364 slave.cpp:5511] Cleaning up executor 'default' of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (via HTTP)
W0919 03:28:55.546577 21784 master.cpp:7021] Ignoring unknown exited executor 'default' of framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 on agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0919 03:28:55.547579 22180 gc.cpp:91] Scheduling 'C:\Users\mesos\AppData\Local\Temp\2\kJF7PT\slaves\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0\frameworks\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000\executors\default\runs\08d9a512-2960-4a5c-8a21-0ce143d2e5a8' for gc 6.99999366228148days in the future
I0919 03:28:55.548580 17364 slave.cpp:5607] Cleaning up framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
I0919 03:28:55.560578 19512 status_update_manager.cpp:285] Closing status update streams for framework d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000
I0919 03:28:55.560578 22180 gc.cpp:91] Scheduling 'C:\Users\mesos\AppData\Local\Temp\2\kJF7PT\slaves\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0\frameworks\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000\executors\default' for gc 6.99999365068148days in the future
I0919 03:28:55.561579 17364 slave.cpp:861] Agent terminating
I0919 03:28:55.561579 22180 gc.cpp:91] Scheduling 'C:\Users\mesos\AppData\Local\Temp\2\kJF7PT\slaves\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0\frameworks\d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000' for gc 6.9999935118163days in the future
I0919 03:28:55.570580 22016 master.cpp:1321] Agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net) disconnected
I0919 03:28:55.571578 22016 master.cpp:3304] Disconnecting agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0919 03:28:55.571578 22016 master.cpp:3323] Deactivating agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 at slave(254)@10.3.1.5:54306 (mesos-bld-s1.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0919 03:28:55.572579 22180 hierarchical.cpp:690] Agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0 deactivated
I0919 03:28:55.596582 20824 master.cpp:1163] Master terminating
I0919 03:28:55.609583 22016 hierarchical.cpp:626] Removed agent d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-S0
W0919 03:28:55.617583 20824 master.hpp:2761] Failed to close HTTP pipe for d7323cfa-3c5b-401b-823a-3dc5ab9db8b1-0000 (default)
I0919 03:28:56.359222 21132 process.cpp:1068] Failed to accept socket: future discarded
```

- Mesos Reviewbot Windows


On Sept. 18, 2017, 11:39 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2017, 11:39 p.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
>   3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/2/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

Posted by James Peach <jp...@apache.org>.

> On Sept. 19, 2017, 5:01 p.m., James Peach wrote:
> > 3rdparty/stout/include/stout/windows/os.hpp
> > Lines 550 (patched)
> > <https://reviews.apache.org/r/62391/diff/2/?file=1828686#file1828686line550>
> >
> >     So the `Process32First` iteration will actually return the 0 pid in this case?
> >     
> >     Maybe this should return `WindowsError(ERROR_INVALID_PARAMETER, ...)`?
> 
> Andrew Schwartzmeyer wrote:
>     > So the Process32First iteration will actually return the 0 pid in this case?
>     
>     I'm not sure where `Process32First` came into play with this change. Could you clarify? There are uses of `Process32First`, though not in this function; which are you referring to?
>     
>     > Maybe this should return WindowsError(ERROR_INVALID_PARAMETER, ...)?
>     
>     The `WindowsError` class is specifically reserved for handling errors from the Windows API (it checks `GetLastError()`, similiar to `errno`, for you) (that is, we could allow `OpenProcess` to fail, and then return a `WindowsError` and would expect it to contain `ERROR_INVALID_PARAMETER`).
>     
>     However, since we know the input of `pid == 0` is bad, I think it is preferable to return an `Error` directly, without invoking the OS API in a way we know will fail. Summary: this is an `Error` and not a `WindowsError` because we have avoided causing the OS to return an error by preventing erroneous use of the API.
>     
>     That was my reasoning anyway.

> I'm not sure where Process32First came into play with this change ...

I was referring to passing the 0 into `process_entry()`. But I think your reasoning makes sense.


- James


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


On Sept. 19, 2017, 6 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 19, 2017, 6 p.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
>   3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/3/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.

> On Sept. 19, 2017, 10:01 a.m., James Peach wrote:
> > 3rdparty/stout/include/stout/windows/os.hpp
> > Lines 550 (patched)
> > <https://reviews.apache.org/r/62391/diff/2/?file=1828686#file1828686line550>
> >
> >     So the `Process32First` iteration will actually return the 0 pid in this case?
> >     
> >     Maybe this should return `WindowsError(ERROR_INVALID_PARAMETER, ...)`?

> So the Process32First iteration will actually return the 0 pid in this case?

I'm not sure where `Process32First` came into play with this change. Could you clarify? There are uses of `Process32First`, though not in this function; which are you referring to?

> Maybe this should return WindowsError(ERROR_INVALID_PARAMETER, ...)?

The `WindowsError` class is specifically reserved for handling errors from the Windows API (it checks `GetLastError()`, similiar to `errno`, for you) (that is, we could allow `OpenProcess` to fail, and then return a `WindowsError` and would expect it to contain `ERROR_INVALID_PARAMETER`).

However, since we know the input of `pid == 0` is bad, I think it is preferable to return an `Error` directly, without invoking the OS API in a way we know will fail. Summary: this is an `Error` and not a `WindowsError` because we have avoided causing the OS to return an error by preventing erroneous use of the API.

That was my reasoning anyway.


> On Sept. 19, 2017, 10:01 a.m., James Peach wrote:
> > 3rdparty/stout/tests/os/process_tests.cpp
> > Lines 186 (patched)
> > <https://reviews.apache.org/r/62391/diff/2/?file=1828687#file1828687line186>
> >
> >     I think this would be easier to read if you retained a literal expected value:
> >     
> >     ```C
> >     #ifdef __WINDOWS__
> >       // ...
> >       EXPECT_EQ(0, pids.get().count(init_pid));
> >     #else
> >       EXPECT_EQ(1, pids.get().count(init_pid));
> >     #endif
> >     ```

Sure thing.


- Andrew


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


On Sept. 18, 2017, 4:39 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2017, 4:39 p.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
>   3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/2/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62391/#review185709
-----------------------------------------------------------


Fix it, then Ship it!





3rdparty/stout/include/stout/windows/os.hpp
Lines 550 (patched)
<https://reviews.apache.org/r/62391/#comment262020>

    So the `Process32First` iteration will actually return the 0 pid in this case?
    
    Maybe this should return `WindowsError(ERROR_INVALID_PARAMETER, ...)`?



3rdparty/stout/tests/os/process_tests.cpp
Lines 186 (patched)
<https://reviews.apache.org/r/62391/#comment262022>

    I think this would be easier to read if you retained a literal expected value:
    
    ```C
    #ifdef __WINDOWS__
      // ...
      EXPECT_EQ(0, pids.get().count(init_pid));
    #else
      EXPECT_EQ(1, pids.get().count(init_pid));
    #endif
    ```


- James Peach


On Sept. 18, 2017, 11:39 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2017, 11:39 p.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
>   3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/2/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62391/
-----------------------------------------------------------

(Updated Sept. 18, 2017, 4:39 p.m.)


Review request for mesos, James Peach and Joseph Wu.


Changes
-------

Fix `stout-tests`.


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


Repository: mesos


Description
-------

This patch fixes a bug found by running `mesos-tests` under Application
Verifier on Windows. Mesos was inadvertently attempting to get a process
handle for the System Idle Process with PID `0`, which is not permitted
by the OS. To remedy this, we now check if `os::process` receives `0`
for its argument, and return an error if so. Furthermore, we remove the
PID `0` from the `os::pids` API, as it is not useful to the programmer,
and only serves to cause errors later. Finally, the return value for
`OpenProcess` was being incorrectly checked, as the API returns a
`nullptr` on failure, not `INVALID_HANDLE_VALUE`.


Diffs (updated)
-----

  3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
  3rdparty/stout/tests/os/process_tests.cpp 963eb4eb3fb64d627e177d760bf42b777ae0e924 


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

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


Testing (updated)
-------

Built and ran `mesos-tests`, `libprocess-tests`, and `stout-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.


Thanks,

Andrew Schwartzmeyer


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.

> On Sept. 18, 2017, 3:49 p.m., Mesos Reviewbot Windows wrote:
> > FAIL: Some Mesos stdout-tests tests failed.
> > 
> > Reviews applied: `['62391']`
> > 
> > Failed command: `C:\mesos\3rdparty\stout\tests\Debug\stout-tests.exe`
> > 
> > All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62391
> > 
> > Relevant logs:
> > 
> > - [stdout-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62391/logs/stdout-tests-stdout.log):
> > 
> > ```
> > [ RUN      ] SocketTests.InitSocket
> > [       OK ] SocketTests.InitSocket (1 ms)
> > [----------] 1 test from SocketTests (17 ms total)
> > 
> > [----------] 2 tests from StrerrorTest
> > [ RUN      ] StrerrorTest.ValidErrno
> > [       OK ] StrerrorTest.ValidErrno (0 ms)
> > [ RUN      ] StrerrorTest.InvalidErrno
> > [       OK ] StrerrorTest.InvalidErrno (0 ms)
> > [----------] 2 tests from StrerrorTest (58 ms total)
> > 
> > [----------] 3 tests from SystemsTests
> > [ RUN      ] SystemsTests.Uname
> > [       OK ] SystemsTests.Uname (1 ms)
> > [ RUN      ] SystemsTests.Sysname
> > [       OK ] SystemsTests.Sysname (1 ms)
> > [ RUN      ] SystemsTests.Release
> > [       OK ] SystemsTests.Release (1 ms)
> > [----------] 3 tests from SystemsTests (86 ms total)
> > 
> > [----------] Global test environment tear-down
> > [==========] 256 tests from 43 test cases ran. (12385 ms total)
> > [  PASSED  ] 255 tests.
> > [  FAILED  ] 1 test, listed below:
> > [  FAILED  ] ProcessTest.Pids
> > 
> >  1 FAILED TEST
> >   YOU HAVE 12 DISABLED TESTS
> > 
> > ```
> > 
> > - [stdout-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/62391/logs/stdout-tests-stderr.log):
> > 
> > ```
> > 'invalid.command' is not recognized as an internal or external command,
> > operable program or batch file.
> > Subcommand 'subcommand' is not available
> > Usage: command <subcommand> [OPTIONS]
> > 
> > Available subcommands:
> >     help
> >     subcommand2
> > 
> > Multiple subcommands have name 'subcommand'
> > ```

Heh, I didn't run stout-tests... my bad. Fixing.


- Andrew


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


On Sept. 18, 2017, 1:42 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2017, 1:42 p.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/1/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 62391: Fixed invalid handle bug in `os::process()`.

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



FAIL: Some Mesos stdout-tests tests failed.

Reviews applied: `['62391']`

Failed command: `C:\mesos\3rdparty\stout\tests\Debug\stout-tests.exe`

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

Relevant logs:

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

```
[ RUN      ] SocketTests.InitSocket
[       OK ] SocketTests.InitSocket (1 ms)
[----------] 1 test from SocketTests (17 ms total)

[----------] 2 tests from StrerrorTest
[ RUN      ] StrerrorTest.ValidErrno
[       OK ] StrerrorTest.ValidErrno (0 ms)
[ RUN      ] StrerrorTest.InvalidErrno
[       OK ] StrerrorTest.InvalidErrno (0 ms)
[----------] 2 tests from StrerrorTest (58 ms total)

[----------] 3 tests from SystemsTests
[ RUN      ] SystemsTests.Uname
[       OK ] SystemsTests.Uname (1 ms)
[ RUN      ] SystemsTests.Sysname
[       OK ] SystemsTests.Sysname (1 ms)
[ RUN      ] SystemsTests.Release
[       OK ] SystemsTests.Release (1 ms)
[----------] 3 tests from SystemsTests (86 ms total)

[----------] Global test environment tear-down
[==========] 256 tests from 43 test cases ran. (12385 ms total)
[  PASSED  ] 255 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] ProcessTest.Pids

 1 FAILED TEST
  YOU HAVE 12 DISABLED TESTS

```

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

```
'invalid.command' is not recognized as an internal or external command,
operable program or batch file.
Subcommand 'subcommand' is not available
Usage: command <subcommand> [OPTIONS]

Available subcommands:
    help
    subcommand2

Multiple subcommands have name 'subcommand'
```

- Mesos Reviewbot Windows


On Sept. 18, 2017, 8:42 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62391/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2017, 8:42 p.m.)
> 
> 
> Review request for mesos, James Peach and Joseph Wu.
> 
> 
> Bugs: MESOS-7988
>     https://issues.apache.org/jira/browse/MESOS-7988
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch fixes a bug found by running `mesos-tests` under Application
> Verifier on Windows. Mesos was inadvertently attempting to get a process
> handle for the System Idle Process with PID `0`, which is not permitted
> by the OS. To remedy this, we now check if `os::process` receives `0`
> for its argument, and return an error if so. Furthermore, we remove the
> PID `0` from the `os::pids` API, as it is not useful to the programmer,
> and only serves to cause errors later. Finally, the return value for
> `OpenProcess` was being incorrectly checked, as the API returns a
> `nullptr` on failure, not `INVALID_HANDLE_VALUE`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/windows/os.hpp f35bf312a25066a167dc66243ad9bf8333cb36a6 
> 
> 
> Diff: https://reviews.apache.org/r/62391/diff/1/
> 
> 
> Testing
> -------
> 
> Built and ran `mesos-tests` on Windows under Application Verifier. All tests pass, and the error from `OpenProcess` is no longer being returned.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>