You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2013/08/15 01:11:48 UTC
[jira] [Commented] (MESOS-641) Stout killtree / pstree tests fail
on Ubuntu 10.04.
[ https://issues.apache.org/jira/browse/MESOS-641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13740384#comment-13740384 ]
Benjamin Mahler commented on MESOS-641:
---------------------------------------
There's an issue with the following code in fork.hpp:
// Waits for all of the descendant processes in the tree to update
// their pids and constructs a ProcessTree by calling os::process
// for each pid.
static Try<ProcessTree> coordinate(const Tree& tree)
{
// Wait for the forked process.
// TODO(benh): Don't wait forever?
while (*tree.pid == -1) {
// Make sure we don't keep reading the value from a register.
__sync_synchronize();
}
Result<Process> process = os::process(*tree.pid);
if (process.isError()) {
return Error(process.error());
} else if (process.isNone()) {
// TODO(benh): Use a duplicate of the current process with
// 'tree.pid' instead, or consider copying the 'Process' struct
// via shared memory instead of just the pid.
return Error("Process already terminated");
}
std::list<ProcessTree> children;
for (size_t i = 0; i < tree.children.size(); i++) {
Try<ProcessTree> child = coordinate(tree.children[i]);
if (child.isError()) {
return Error(child.error());
}
children.push_back(child.get());
}
return ProcessTree(process.get(), children);
}
It's possible for one of the processes to have terminated, in which case one cannot construct the process tree reliably. Sometimes resulting in an Error("Process already terminated").
Benh, any thoughts?
> Stout killtree / pstree tests fail on Ubuntu 10.04.
> ---------------------------------------------------
>
> Key: MESOS-641
> URL: https://issues.apache.org/jira/browse/MESOS-641
> Project: Mesos
> Issue Type: Bug
> Components: test
> Affects Versions: 0.14.0
> Environment: Debian Squeeze or Ubuntu 10.04
> git HEAD version (from github)
> Reporter: Damien Hardy
>
> When running stout-tests during make check :
> [...]
> [ RUN ] OsTest.pstree
> stout/tests/os_tests.cpp:517: Failure
> Value of: tree.get().children.size()
> Actual: 2
> Expected: 1u
> Which is: 1
> [ FAILED ] OsTest.pstree (62 ms)
> [...]
> Another instance:
> [ RUN ] OsTest.pstree
> ../../../../3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp:498: Failure
> Value of: tree.get().children.size()
> Actual: 1
> Expected: 0u
> Which is: 0
> ../../../../3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp:517: Failure
> Value of: tree.get().children.size()
> Actual: 2
> Expected: 1u
> Which is: 1
> [ FAILED ] OsTest.pstree (19 ms)
> Also failing:
> [ RUN ] OsTest.killtree
> ../../../../3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp:418: Failure
> tree: Process already terminated
> [ FAILED ] OsTest.killtree (6 ms)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira