[jira] [Updated] (MESOS-1871) Sending SIGTERM to a task command may render it orphaned
[ https://issues.apache.org/jira/browse/MESOS-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander Rukletsov updated MESOS-1871: --- Priority: Minor (was: Major) Sending SIGTERM to a task command may render it orphaned Key: MESOS-1871 URL: https://issues.apache.org/jira/browse/MESOS-1871 Project: Mesos Issue Type: Bug Components: slave Reporter: Alexander Rukletsov Priority: Minor {{CommandExecutor}} launches tasks wrapping them into {{sh -c}}. That means signals are sent to the top process—that is {{sh -c}}—and not to the task directly. Though {{SIGTERM}} is propagated by {{sh -c}} down the process tree, if the task is unresponsive to {{SIGTERM}}, {{sh -c}} terminates reporting success to the {{CommandExecutor}}, rendering the task detached from the parent process and still running. Because the {{CommandExecutor}} thinks the command terminated normally, its OS process exits normally and may not trigger containerizer's escalation which destroys cgroups. Here is the test related to the first part: [https://gist.github.com/rukletsov/68259dfb02421813f9e6]. Here is the test related to the second part: [https://gist.github.com/rukletsov/3f19ecc7389fa51e65c0]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (MESOS-1871) Sending SIGTERM to a task command may render it orphaned
[ https://issues.apache.org/jira/browse/MESOS-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander Rukletsov updated MESOS-1871: --- Assignee: (was: Alexander Rukletsov) Sending SIGTERM to a task command may render it orphaned Key: MESOS-1871 URL: https://issues.apache.org/jira/browse/MESOS-1871 Project: Mesos Issue Type: Bug Components: slave Reporter: Alexander Rukletsov {{CommandExecutor}} launches tasks wrapping them into {{sh -c}}. That means signals are sent to the top process—that is {{sh -c}}—and not to the task directly. Though {{SIGTERM}} is propagated by {{sh -c}} down the process tree, if the task is unresponsive to {{SIGTERM}}, {{sh -c}} terminates reporting success to the {{CommandExecutor}}, rendering the task detached from the parent process and still running. Because the {{CommandExecutor}} thinks the command terminated normally, its OS process exits normally and may not trigger containerizer's escalation which destroys cgroups. Here is the test related to the first part: [https://gist.github.com/rukletsov/68259dfb02421813f9e6]. Here is the test related to the second part: [https://gist.github.com/rukletsov/3f19ecc7389fa51e65c0]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (MESOS-1871) Sending SIGTERM to a task command may render it orphaned
[ https://issues.apache.org/jira/browse/MESOS-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander Rukletsov updated MESOS-1871: --- Description: {{CommandExecutor}} launches tasks wrapping them into {{sh -c}}. That means signals are sent to the top process—that is {{sh -c}}—and not to the task directly. Though {{SIGTERM}} is propagated by {{sh -c}} down the process tree, if the task is unresponsive to {{SIGTERM}}, {{sh -c}} terminates reporting success to the {{CommandExecutor}}, rendering the task detached from the parent process and still running. Because the {{CommandExecutor}} thinks the command terminated normally, its OS process exits normally and may not trigger containerizer's escalation which destroys cgroups. Here is the test related to this issue: [https://gist.github.com/rukletsov/3f19ecc7389fa51e65c0]. was: {{CommandExecutor}} launches tasks wrapping them into {{sh -c}}. That means signals are sent to the top process—that is {{sh -c}}—and not to the task directly. Though {{SIGTERM}} is propagated by {{sh -c}} down the process tree, if the task is unresponsive to {{SIGTERM}}, {{sh -c}} terminates reporting success to the {{CommandExecutor}}, rendering the task detached from the parent process and still running. Because the {{CommandExecutor}} thinks the command terminated normally, its OS process exits normally and may not trigger containerizer's escalation which destroys cgroups. Here is the test related to this issue: [https://gist.github.com/rukletsov/3f19ecc7389fa51e65c0]. As expected, it fails on Linux, but surprisingly, it works on Mac OS 10.9.4. Sending SIGTERM to a task command may render it orphaned Key: MESOS-1871 URL: https://issues.apache.org/jira/browse/MESOS-1871 Project: Mesos Issue Type: Bug Components: slave Reporter: Alexander Rukletsov {{CommandExecutor}} launches tasks wrapping them into {{sh -c}}. That means signals are sent to the top process—that is {{sh -c}}—and not to the task directly. Though {{SIGTERM}} is propagated by {{sh -c}} down the process tree, if the task is unresponsive to {{SIGTERM}}, {{sh -c}} terminates reporting success to the {{CommandExecutor}}, rendering the task detached from the parent process and still running. Because the {{CommandExecutor}} thinks the command terminated normally, its OS process exits normally and may not trigger containerizer's escalation which destroys cgroups. Here is the test related to this issue: [https://gist.github.com/rukletsov/3f19ecc7389fa51e65c0]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (MESOS-1871) Sending SIGTERM to a task command may render it orphaned
[ https://issues.apache.org/jira/browse/MESOS-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander Rukletsov updated MESOS-1871: --- Description: {{CommandExecutor}} launches tasks wrapping them into {{sh -c}}. That means signals are sent to the top process—that is {{sh -c}}—and not to the task directly. Though {{SIGTERM}} is propagated by {{sh -c}} down the process tree, if the task is unresponsive to {{SIGTERM}}, {{sh -c}} terminates reporting success to the {{CommandExecutor}}, rendering the task detached from the parent process and still running. Because the {{CommandExecutor}} thinks the command terminated normally, its OS process exits normally and may not trigger containerizer's escalation which destroys cgroups. Here is the test related to the first part: [https://gist.github.com/rukletsov/68259dfb02421813f9e6]. Here is the test related to the second part: [https://gist.github.com/rukletsov/3f19ecc7389fa51e65c0]. was: {{CommandExecutor}} launches tasks wrapping them into {{sh -c}}. That means signals are sent to the top process—that is {{sh -c}}—and not to the task directly. Though {{SIGTERM}} is propagated by {{sh -c}} down the process tree, if the task is unresponsive to {{SIGTERM}}, {{sh -c}} terminates reporting success to the {{CommandExecutor}}, rendering the task detached from the parent process and still running. Because the {{CommandExecutor}} thinks the command terminated normally, its OS process exits normally and may not trigger containerizer's escalation which destroys cgroups. Here is the test related to this issue: [https://gist.github.com/rukletsov/3f19ecc7389fa51e65c0]. Sending SIGTERM to a task command may render it orphaned Key: MESOS-1871 URL: https://issues.apache.org/jira/browse/MESOS-1871 Project: Mesos Issue Type: Bug Components: slave Reporter: Alexander Rukletsov {{CommandExecutor}} launches tasks wrapping them into {{sh -c}}. That means signals are sent to the top process—that is {{sh -c}}—and not to the task directly. Though {{SIGTERM}} is propagated by {{sh -c}} down the process tree, if the task is unresponsive to {{SIGTERM}}, {{sh -c}} terminates reporting success to the {{CommandExecutor}}, rendering the task detached from the parent process and still running. Because the {{CommandExecutor}} thinks the command terminated normally, its OS process exits normally and may not trigger containerizer's escalation which destroys cgroups. Here is the test related to the first part: [https://gist.github.com/rukletsov/68259dfb02421813f9e6]. Here is the test related to the second part: [https://gist.github.com/rukletsov/3f19ecc7389fa51e65c0]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)