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 160C8200B78 for ; Fri, 2 Sep 2016 19:51:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 148ED160ACE; Fri, 2 Sep 2016 17:51:22 +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 8BE75160AAE for ; Fri, 2 Sep 2016 19:51:21 +0200 (CEST) Received: (qmail 3731 invoked by uid 500); 2 Sep 2016 17:51:20 -0000 Mailing-List: contact dev-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 dev@flink.apache.org Received: (qmail 3642 invoked by uid 99); 2 Sep 2016 17:51:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2016 17:51:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 767612C1B7B for ; Fri, 2 Sep 2016 17:51:20 +0000 (UTC) Date: Fri, 2 Sep 2016 17:51:20 +0000 (UTC) From: "Ted Yu (JIRA)" To: dev@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (FLINK-4573) Potential resource leak due to unclosed RandomAccessFile in TaskManagerLogHandler# MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Sep 2016 17:51:22 -0000 Ted Yu created FLINK-4573: ----------------------------- Summary: Potential resource leak due to unclosed RandomAccessFile in TaskManagerLogHandler# Key: FLINK-4573 URL: https://issues.apache.org/jira/browse/FLINK-4573 Project: Flink Issue Type: Bug Reporter: Ted Yu Priority: Minor {code} try { raf = new RandomAccessFile(file, "r"); } catch (FileNotFoundException e) { display(ctx, request, "Displaying TaskManager log failed."); LOG.error("Displaying TaskManager log failed.", e); return; } long fileLength = raf.length(); final FileChannel fc = raf.getChannel(); {code} If length() throws IOException, raf would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)