From mapreduce-issues-return-90899-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed Jan 17 12:36:04 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id BB43418066D for ; Wed, 17 Jan 2018 12:36:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AC7A6160C35; Wed, 17 Jan 2018 11:36:04 +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 F4024160C1B for ; Wed, 17 Jan 2018 12:36:03 +0100 (CET) Received: (qmail 35897 invoked by uid 500); 17 Jan 2018 11:36:03 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 35884 invoked by uid 99); 17 Jan 2018 11:36:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2018 11:36:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 894171A3D49 for ; Wed, 17 Jan 2018 11:36:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.911 X-Spam-Level: X-Spam-Status: No, score=-99.911 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id G-t3umoNUwVj for ; Wed, 17 Jan 2018 11:36:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id EF4C45FB2E for ; Wed, 17 Jan 2018 11:36:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 680C8E0EF6 for ; Wed, 17 Jan 2018 11:36:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 20A0F212F5 for ; Wed, 17 Jan 2018 11:36:00 +0000 (UTC) Date: Wed, 17 Jan 2018 11:36:00 +0000 (UTC) From: "Peter Bacsko (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MAPREDUCE-7015) Possible race condition in JHS if the job is not loaded 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/MAPREDUCE-7015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16328648#comment-16328648 ] Peter Bacsko commented on MAPREDUCE-7015: ----------------------------------------- [~jlowe] modified the patch as you suggested plus added a unit test. > Possible race condition in JHS if the job is not loaded > ------------------------------------------------------- > > Key: MAPREDUCE-7015 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-7015 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: jobhistoryserver > Reporter: Peter Bacsko > Assignee: Peter Bacsko > Priority: Major > Attachments: MAPREDUCE-7015-001.patch, MAPREDUCE-7015-POC01.patch, MAPREDUCE-7015-POC02.patch > > > There could be a race condition inside JHS. In our build environment, {{TestMRJobClient.testJobClient()}} failed with this exception: > {noformat} > ava.io.FileNotFoundException: File does not exist: hdfs://localhost:32836/tmp/hadoop-yarn/staging/history/done_intermediate/jenkins/job_1509975084722_0001_conf.xml > at org.apache.hadoop.hdfs.DistributedFileSystem$20.doCall(DistributedFileSystem.java:1266) > at org.apache.hadoop.hdfs.DistributedFileSystem$20.doCall(DistributedFileSystem.java:1258) > at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81) > at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1258) > at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:340) > at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:292) > at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:2123) > at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:2092) > at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:2068) > at org.apache.hadoop.mapreduce.tools.CLI.run(CLI.java:460) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at org.apache.hadoop.mapreduce.TestMRJobClient.runTool(TestMRJobClient.java:94) > at org.apache.hadoop.mapreduce.TestMRJobClient.testConfig(TestMRJobClient.java:551) > at org.apache.hadoop.mapreduce.TestMRJobClient.testJobClient(TestMRJobClient.java:167) > {noformat} > Root cause: > 1. MapReduce job completes > 2. CLI calls {{cluster.getJob(jobid)}} > 3. The job is finished and the client side gets redirected to JHS > 4. The job data is missing from {{CachedHistoryStorage}} so JHS tries to find the job > 5. First it scans the intermediate directory and finds the job > 6. The call {{moveToDone()}} is scheduled for execution on a separate thread inside {{moveToDoneExecutor}} and it starts to run immediately > 7. RPC invocation returns with the path pointing to {{/tmp/hadoop-yarn/staging/history/done_intermediate}} > 8. The call to {{moveToDone()}} completes which moves the contents of {{done_intermediate}} to {{done}} > 9. Hadoop CLI tries to download the config file from done_intermediate but it's no longer there > Usually step #6 is slow enough to complete after #7, but sometimes it's faster, causing this race condition. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org