Return-Path: X-Original-To: apmail-hadoop-yarn-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59B8818E74 for ; Fri, 19 Jun 2015 06:04:01 +0000 (UTC) Received: (qmail 85012 invoked by uid 500); 19 Jun 2015 06:04:00 -0000 Delivered-To: apmail-hadoop-yarn-dev-archive@hadoop.apache.org Received: (qmail 84943 invoked by uid 500); 19 Jun 2015 06:04:00 -0000 Mailing-List: contact yarn-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-dev@hadoop.apache.org Delivered-To: mailing list yarn-dev@hadoop.apache.org Received: (qmail 84674 invoked by uid 99); 19 Jun 2015 06:04:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2015 06:04:00 +0000 Date: Fri, 19 Jun 2015 06:04:00 +0000 (UTC) From: "nijel (JIRA)" To: yarn-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (YARN-3830) AbstractYarnScheduler.createReleaseCache may try to clean a null attempt MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 nijel created YARN-3830: --------------------------- Summary: AbstractYarnScheduler.createReleaseCache may try to clean a null attempt Key: YARN-3830 URL: https://issues.apache.org/jira/browse/YARN-3830 Project: Hadoop YARN Issue Type: Bug Reporter: nijel Assignee: nijel org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.createReleaseCache() {code} protected void createReleaseCache() { // Cleanup the cache after nm expire interval. new Timer().schedule(new TimerTask() { @Override public void run() { for (SchedulerApplication app : applications.values()) { T attempt = app.getCurrentAppAttempt(); synchronized (attempt) { for (ContainerId containerId : attempt.getPendingRelease()) { RMAuditLogger.logFailure( {code} Here the attempt can be null since the attempt is created later. So null pointer exception will come {code} 2015-06-19 09:29:16,195 | ERROR | Timer-3 | Thread Thread[Timer-3,5,main] threw an Exception. | YarnUncaughtExceptionHandler.java:68 java.lang.NullPointerException at org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler$1.run(AbstractYarnScheduler.java:457) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) {code} This will skip the other applications in this run. Can add a null check and continue with other applications -- This message was sent by Atlassian JIRA (v6.3.4#6332)