You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Jie Yu (JIRA)" <ji...@apache.org> on 2012/06/19 01:56:42 UTC
[jira] [Created] (MESOS-209) A race bug in ProcessManager::spawn in
libprocess.
Jie Yu created MESOS-209:
----------------------------
Summary: A race bug in ProcessManager::spawn in libprocess.
Key: MESOS-209
URL: https://issues.apache.org/jira/browse/MESOS-209
Project: Mesos
Issue Type: Bug
Components: c++-api
Affects Versions: 0.9.0
Environment: All platforms.
Reporter: Jie Yu
Priority: Critical
This is a race bug found in ProcessManager::spawn in libprocess. Below is the description of this bug.
------------------------------------------------------------------------------------------------------
UPID ProcessManager::spawn(ProcessBase* process, bool manage)
{
...
// Use the garbage collector if requested.
if (manage) {
dispatch(gc, &GarbageCollector::manage<ProcessBase>, process);
}
// Add process to the run queue (so 'initialize' will get invoked).
enqueue(process);
VLOG(2) << "Spawned process " << process->self();
return process->self();
}
------------------------------------------------------------------------------------------------------
If a user spawns a process which is very short and sets 'manage' to true. It is likely that the pointer 'process' becomes a dangling pointer after enqueue(..) is called. As a result, a random segfault will be thrown when 'process->self()' is called.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (MESOS-209) A race bug in ProcessManager::spawn
in libprocess.
Posted by "Jie Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MESOS-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jie Yu resolved MESOS-209.
--------------------------
Resolution: Fixed
See the patch here:
https://reviews.apache.org/r/5409/
> A race bug in ProcessManager::spawn in libprocess.
> --------------------------------------------------
>
> Key: MESOS-209
> URL: https://issues.apache.org/jira/browse/MESOS-209
> Project: Mesos
> Issue Type: Bug
> Components: c++-api
> Affects Versions: 0.9.0
> Environment: All platforms.
> Reporter: Jie Yu
> Priority: Critical
> Labels: libprocess
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> This is a race bug found in ProcessManager::spawn in libprocess. Below is the description of this bug.
> ------------------------------------------------------------------------------------------------------
> UPID ProcessManager::spawn(ProcessBase* process, bool manage)
> {
> ...
> // Use the garbage collector if requested.
> if (manage) {
> dispatch(gc, &GarbageCollector::manage<ProcessBase>, process);
> }
> // Add process to the run queue (so 'initialize' will get invoked).
> enqueue(process);
> VLOG(2) << "Spawned process " << process->self();
> return process->self();
> }
> ------------------------------------------------------------------------------------------------------
> If a user spawns a process which is very short and sets 'manage' to true. It is likely that the pointer 'process' becomes a dangling pointer after enqueue(..) is called. As a result, a random segfault will be thrown when 'process->self()' is called.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MESOS-209) A race bug in ProcessManager::spawn
in libprocess.
Posted by "Jie Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MESOS-209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396385#comment-13396385 ]
Jie Yu commented on MESOS-209:
------------------------------
I am going to fix it.
> A race bug in ProcessManager::spawn in libprocess.
> --------------------------------------------------
>
> Key: MESOS-209
> URL: https://issues.apache.org/jira/browse/MESOS-209
> Project: Mesos
> Issue Type: Bug
> Components: c++-api
> Affects Versions: 0.9.0
> Environment: All platforms.
> Reporter: Jie Yu
> Priority: Critical
> Labels: libprocess
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> This is a race bug found in ProcessManager::spawn in libprocess. Below is the description of this bug.
> ------------------------------------------------------------------------------------------------------
> UPID ProcessManager::spawn(ProcessBase* process, bool manage)
> {
> ...
> // Use the garbage collector if requested.
> if (manage) {
> dispatch(gc, &GarbageCollector::manage<ProcessBase>, process);
> }
> // Add process to the run queue (so 'initialize' will get invoked).
> enqueue(process);
> VLOG(2) << "Spawned process " << process->self();
> return process->self();
> }
> ------------------------------------------------------------------------------------------------------
> If a user spawns a process which is very short and sets 'manage' to true. It is likely that the pointer 'process' becomes a dangling pointer after enqueue(..) is called. As a result, a random segfault will be thrown when 'process->self()' is called.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira