-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57399/
-----------------------------------------------------------
Review request for mesos, Benjamin Mahler and Greg Mann.
Bugs: MESOS-7106
https://issues.apache.org/jira/browse/MESOS-7106
Repository: mesos
Description
-------
This eliminates a race between `process::finalize` and
`ProcessManager::spawn` in which a managed process
(`ProcessManager::spawn(X, true)`) will reference the `gc`
process after `gc` has been destroyed. The precise
interleaving is possible because the critical section in
`ProcessManager::spawn` only protects access to the
`processes` map. Meaning that a spawn can pass the check
for `finalizing` and then wait until `gc` has been destroyed.
This commit expands the critical section in `ProcessManager::spawn`
to include the check for `finalizing` as well as the dereferencing
of `gc`.
Diffs
-----
3rdparty/libprocess/src/process.cpp 9eb7fe3d20aa9416db5162fa275fcf116f5d6477
Diff: https://reviews.apache.org/r/57399/diff/1/
Testing
-------
cmake .. -DENABLE_LIBEVENT=1 -DENABLE_SSL=1
make check
src/mesos-tests
--gtest_filter="ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/1"
--gtest_repeat=1000
Thanks,
Joseph Wu