Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32EEE18601 for ; Thu, 25 Jun 2015 14:59:06 +0000 (UTC) Received: (qmail 31690 invoked by uid 500); 25 Jun 2015 14:59:06 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 31645 invoked by uid 500); 25 Jun 2015 14:59:06 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 31627 invoked by uid 99); 25 Jun 2015 14:59:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2015 14:59:06 +0000 Date: Thu, 25 Jun 2015 14:59:05 +0000 (UTC) From: "nijel (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (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 [ https://issues.apache.org/jira/browse/YARN-3830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] nijel updated YARN-3830: ------------------------ Attachment: YARN-3830_3.patch Sorry for the small mistake Line limit is corrected Test fail is not related to this patch. Verified locally. It is passing > 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 > Attachments: YARN-3830_1.patch, YARN-3830_2.patch, YARN-3830_3.patch > > > 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)