Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EF5E4200BCE for ; Fri, 2 Dec 2016 15:19:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EE92B160B29; Fri, 2 Dec 2016 14:19:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 68581160B24 for ; Fri, 2 Dec 2016 15:19:59 +0100 (CET) Received: (qmail 90372 invoked by uid 500); 2 Dec 2016 14:19:58 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 90336 invoked by uid 99); 2 Dec 2016 14:19:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2016 14:19:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6B1BB2C1F54 for ; Fri, 2 Dec 2016 14:19:58 +0000 (UTC) Date: Fri, 2 Dec 2016 14:19:58 +0000 (UTC) From: "Stephan Ewen (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (FLINK-5232) Add a Thread default uncaught exception handler on the JobManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Dec 2016 14:20:00 -0000 Stephan Ewen created FLINK-5232: ----------------------------------- Summary: 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 Fix For: 1.1.3 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 (v6.3.4#6332)