You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Varun Saxena (JIRA)" <ji...@apache.org> on 2016/10/31 22:43:58 UTC

[jira] [Comment Edited] (YARN-5809) AsyncDispatcher possibly invokes multiple shutdown thread when handling exception

    [ https://issues.apache.org/jira/browse/YARN-5809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15623652#comment-15623652 ] 

Varun Saxena edited comment on YARN-5809 at 10/31/16 10:43 PM:
---------------------------------------------------------------

Thanks [~jianhe] for the patch.
IIUC, even if an unnecessary additional shutdown thread is created, that would be destroyed when JVM exits.  
But it makes sense to set the stopped flag and not let other events process when RM is shutting down and not starting extra shutdown threads.

+1. Will commit it.


was (Author: varun_saxena):
Thanks [~jianhe] for the patch.
IIUC, even if an unnecessary additional shutdown thread is created, that would be destroyed when JVM exits.  
But it makes sense to set the stopped flag and not let other events process when RM is shutting down.

+1. Will commit it.

> AsyncDispatcher possibly invokes multiple shutdown thread when handling exception
> ---------------------------------------------------------------------------------
>
>                 Key: YARN-5809
>                 URL: https://issues.apache.org/jira/browse/YARN-5809
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Jian He
>            Assignee: Jian He
>         Attachments: YARN-5809.1.patch
>
>
> below code when handling exceptions: it is possible to launch multiple shutdown threads if there are events left in the queue that caused to throw exceptions. 
> {code}
>     } catch (Throwable t) {
>       //TODO Maybe log the state of the queue
>       LOG.fatal("Error in dispatcher thread", t);
>       // If serviceStop is called, we should exit this thread gracefully.
>       if (exitOnDispatchException
>           && (ShutdownHookManager.get().isShutdownInProgress()) == false
>           && stopped == false) {
>         Thread shutDownThread = new Thread(createShutDownThread());
>         shutDownThread.setName("AsyncDispatcher ShutDown handler");
>         shutDownThread.start();
>       }
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org