Sidharta Seethana created HADOOP-12748:
------------------------------------------

             Summary: Uncaught exceptions are not caught/logged when 
ExecutorService is used
                 Key: HADOOP-12748
                 URL: https://issues.apache.org/jira/browse/HADOOP-12748
             Project: Hadoop Common
          Issue Type: Bug
            Reporter: Sidharta Seethana
            Assignee: Sidharta Seethana


{{ThreadPoolExecutor}} catches (otherwise uncaught) exceptions/errors thrown by 
the tasks running in the corresponding thread pool. These are passed to an 
{{afterExecute}} method which seems to do nothing by default unless overridden. 
 Even though we register {{UncaughtExceptionHandler}}s in various places (e.g 
{{YarnUncaughtExceptionHandler}}), these handlers are not invoked because the 
uncaught exceptions/errors are not propagated all the way. 

To fix this, one mechanism would be to override {{ThreadPoolExecutor}} with an 
{{afterExecute}} method that would log these exceptions/errors. Logging these 
exceptions/errors would be useful in debug issues that are otherwise difficult 
to trace (e.g YARN-4643) because there is nothing in the logs indicating an 
uncaught exception/error 




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

Reply via email to