You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Jie Yu (JIRA)" <ji...@apache.org> on 2014/08/27 20:35:59 UTC
[jira] [Created] (MESOS-1738) SubprocessTest.Status sometimes
terminated by SIGTERM
Jie Yu created MESOS-1738:
-----------------------------
Summary: SubprocessTest.Status sometimes terminated by SIGTERM
Key: MESOS-1738
URL: https://issues.apache.org/jira/browse/MESOS-1738
Project: Mesos
Issue Type: Bug
Components: libprocess
Affects Versions: 0.20.0
Environment: ./configure
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
Mac OS X 10.8.5
Reporter: Jie Yu
Sometimes, you'll get this (once every 100 runs):
{noformat}
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from SubprocessTest
[ RUN ] SubprocessTest.Status
W0827 11:16:26.919852 1972556160 glog.hpp:41] RAW: Received signal SIGTERM; exiting.
W0827 11:16:27.055503 1972556160 glog.hpp:41] RAW: Received signal SIGTERM; exiting.
Terminated: 15
{noformat}
After adding a few prints like the following:
{noformat}
TEST_F(SubprocessTest, Status)
{
...
// SIGTERM.
s = subprocess("sleep 60");
ASSERT_SOME(s);
LOG(INFO) << ::getpid();
LOG(INFO) << s.get().pid();
kill(s.get().pid(), SIGTERM);
...
}
inline void handler(int signal)
{
if (signal == SIGTERM) {
RAW_LOG(WARNING, "Received signal SIGTERM; exiting. %d", ::getpid());
...
}
...
}
{noformat}
I got this:
{noformat}
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from SubprocessTest
[ RUN ] SubprocessTest.Status
I0827 11:16:27.055408 1972556160 subprocess_tests.cpp:80] 11072
I0827 11:16:27.055503 1972556160 subprocess_tests.cpp:81] 11347
W0827 11:16:26.919852 1972556160 glog.hpp:41] RAW: Received signal SIGTERM; exiting. 11072
W0827 11:16:27.055503 1972556160 glog.hpp:41] RAW: Received signal SIGTERM; exiting. 11072
Terminated: 15
{noformat}
The behavior is similar to this thread:
http://compgroups.net/comp.unix.programmer/sigterm-to-child-also-kills-parent/535939
--
This message was sent by Atlassian JIRA
(v6.2#6252)