Return-Path: X-Original-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-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 D53D97C54 for ; Sat, 13 Aug 2011 08:21:08 +0000 (UTC) Received: (qmail 30810 invoked by uid 500); 13 Aug 2011 08:21:08 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 30671 invoked by uid 500); 13 Aug 2011 08:21:02 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 29704 invoked by uid 99); 13 Aug 2011 08:20:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Aug 2011 08:20:51 +0000 X-ASF-Spam-Status: No, hits=-2000.8 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Aug 2011 08:20:49 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DB426BA68C for ; Sat, 13 Aug 2011 08:20:27 +0000 (UTC) Date: Sat, 13 Aug 2011 08:20:27 +0000 (UTC) From: "Arun C Murthy (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: <869790711.35725.1313223627895.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <652193130.51045.1306604207417.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (MAPREDUCE-2541) Race Condition in IndexCache(readIndexFileToCache,removeMap) causes value of totalMemoryUsed corrupt, which may cause TaskTracker continue throw Exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MAPREDUCE-2541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arun C Murthy updated MAPREDUCE-2541: ------------------------------------- Resolution: Fixed Fix Version/s: 0.23.0 Status: Resolved (was: Patch Available) I just committed this. Thanks Binglin! > Race Condition in IndexCache(readIndexFileToCache,removeMap) causes value of totalMemoryUsed corrupt, which may cause TaskTracker continue throw Exception > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: MAPREDUCE-2541 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-2541 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: tasktracker > Affects Versions: 0.20.1, 0.21.0, 0.22.0, 0.23.0 > Environment: all > Reporter: Binglin Chang > Assignee: Binglin Chang > Priority: Critical > Fix For: 0.23.0 > > Attachments: MAPREDUCE-2541.patch, MAPREDUCE-2541.v2.patch > > > The race condition goes like this: > Thread1: readIndexFileToCache() totalMemoryUsed.addAndGet(newInd.getSize()) > Thread2: removeMap() totalMemoryUsed.addAndGet(-info.getSize()); > When SpillRecord is being read from fileSystem, client kills the job, info.getSize() equals 0, so in fact totalMemoryUsed is not reduced, but after thread1 finished reading SpillRecord, it adds the real index size to totalMemoryUsed, which makes the value of totalMemoryUsed wrong(larger). > When this value(totalMemoryUsed) exceeds totalMemoryAllowed (this usually happens when a vary large job with vary large reduce number is killed by the user, probably because the user sets a wrong reduce number by mistake), and actually indexCache has not cache anything, freeIndexInformation() will throw exception constantly. > A quick fix for this issue is to make removeMap() do nothing, let freeIndexInformation() do this job only. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira