You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Hai Lu (Jira)" <ji...@apache.org> on 2019/11/07 00:06:04 UTC

[jira] [Updated] (SAMZA-2198) Container process always takes task.shutdown.ms to shut down

     [ https://issues.apache.org/jira/browse/SAMZA-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hai Lu updated SAMZA-2198:
--------------------------
    Fix Version/s: 1.3

> Container process always takes task.shutdown.ms to shut down
> ------------------------------------------------------------
>
>                 Key: SAMZA-2198
>                 URL: https://issues.apache.org/jira/browse/SAMZA-2198
>             Project: Samza
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>            Reporter: Cameron Lee
>            Assignee: Abhishek Shivanna
>            Priority: Major
>             Fix For: 1.3
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> https://issues.apache.org/jira/browse/SAMZA-1724 added a System.exit to LocalContainerRunner (now moved to ContainerLaunchUtil) in order to ensure the process exits. However, this seems to cause a partial deadlock when shutting down the container process. SamzaContainer adds a shutdown hook which joins on the run loop thread (which is also the main thread). During the shutdown process, when the main thread reaches the System.exit in ContainerLaunchUtil, it looks like it waits for the shutdown hook to complete. However, the shutdown hook is waiting for the main thread to join. Therefore, the shutdown hook will always wait task.shutdown.ms before giving up on joining the main thread, and then the process exits.
> This issue was not observed in a job on 0.14. The System.exit was only added in 1.0.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)