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

ASF GitHub Bot commented on FLINK-5232:
---------------------------------------

tillrohrmann commented on issue #6334: [FLINK-5232] Add a Thread default 
uncaught exception handler on the JobManager
URL: https://github.com/apache/flink/pull/6334#issuecomment-412116926
 
 
   Hi @yanghua, I think your approach goes in the right direction. Extending 
`ActorSystemImpl` allows us to set a custom uncaught exception handler. It is a 
bit tricky since we have to put our own `RobustActorSystem` in the same package 
as `ActorSystemImpl`. But I think this is ok since it only affects a single 
class. I've taken your work and extended it a bit in #6539 (second commit). 
What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Add a Thread default uncaught exception handler on the JobManager
> -----------------------------------------------------------------
>
>                 Key: FLINK-5232
>                 URL: https://issues.apache.org/jira/browse/FLINK-5232
>             Project: Flink
>          Issue Type: Sub-task
>          Components: JobManager
>            Reporter: Stephan Ewen
>            Assignee: vinoyang
>            Priority: Major
>              Labels: pull-request-available
>
> When some JobManager threads die because of uncaught exceptions, we should 
> bring down the JobManager. If a thread dies from an uncaught exception, there 
> is a high chance that the JobManager becomes dysfunctional.
> The only sfae thing is to rely on the JobManager being restarted by YARN / 
> Mesos / Kubernetes / etc.
> I suggest to add this code to the JobManager launch:
> {code}
> Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
>     @Override
>     public void uncaughtException(Thread t, Throwable e) {
>         try {
>             LOG.error("Thread {} died due to an uncaught exception. Killing 
> process.", t.getName());
>         } finally {
>             Runtime.getRuntime().halt(-1);
>         }
>     }
> });
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to