mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomasz Janiszewski (JIRA)" <>
Subject [jira] [Commented] (MESOS-6933) Executor does not respect grace period
Date Mon, 17 Jul 2017 09:35:00 GMT


Tomasz Janiszewski commented on MESOS-6933:

I can reproduce it on latest master

> Executor does not respect grace period
> --------------------------------------
>                 Key: MESOS-6933
>                 URL:
>             Project: Mesos
>          Issue Type: Bug
>          Components: executor
>            Reporter: Tomasz Janiszewski
>         Attachments: 屏幕快照 2017-07-17 下午2.19.03.png
> Mesos Command Executor try to support grace period with escalate but unfortunately it
does not work. It launches {{command}} by wrapping it in {{sh -c}} this cause process tree
to look like this
> {code}
> Received killTask
> Shutting down
> Sending SIGTERM to process tree at pid 18
> Sent SIGTERM to the following process trees:
> [ 
> -+- 18 sh -c cd offer-i18n-0.1.24 && LD_PRELOAD=../ ./bin/offer-i18n
-e prod -p $PORT0 
>  \--- 19 command...
> ]
> Command terminated with signal Terminated (pid: 18)
> {code}
> This cause {{sh}} to immediately close and so executor, while wrapped {{command}} might
need some more time to finish. Finally, executor thinks command executed gracefully so it
won't [escalate|]
> This cause leaks when POSIX containerizer is used because if command ignores SIGTERM
it will be attached to initialize and never get killed. Using pid/namespace only masks the
problem because hanging process is captured before it can gracefully shutdown.
> Fix for this is to sent SIGTERM only to {{sh}} children. {{sh}} will exit when all children
processes finish. If not they will be killed by escalation to SIGKILL.
> All versions from 0.20 are affected.
> This test should pass [src/tests/command_executor_tests.cpp:342|]
> [Mailing list thread|]

This message was sent by Atlassian JIRA

View raw message