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 95B35180630 for ; Tue, 2 Jan 2018 12:50:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 85C0A160C38; Tue, 2 Jan 2018 11:50: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 D47BE160C1B for ; Tue, 2 Jan 2018 12:50:03 +0100 (CET) Received: (qmail 37069 invoked by uid 500); 2 Jan 2018 11:50:02 -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 37048 invoked by uid 99); 2 Jan 2018 11:50:02 -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; Tue, 02 Jan 2018 11:50:02 +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 549D01A0BA4 for ; Tue, 2 Jan 2018 11:50:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.211 X-Spam-Level: X-Spam-Status: No, score=-99.211 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, 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 8MajRjcs2gWY for ; Tue, 2 Jan 2018 11:50: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 E4BCA5F3B5 for ; Tue, 2 Jan 2018 11:50: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 5E329E002F for ; Tue, 2 Jan 2018 11:50: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 15AE5240DE for ; Tue, 2 Jan 2018 11:50:00 +0000 (UTC) Date: Tue, 2 Jan 2018 11:50: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 archived-at: Tue, 02 Jan 2018 11:50:04 -0000 [ https://issues.apache.org/jira/browse/MAPREDUCE-7015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307925#comment-16307925 ] Peter Bacsko commented on MAPREDUCE-7015: ----------------------------------------- [~jlowe], [~haibochen] what do you think about the solution? There's an even simpler one: just remove {{moveToDoneExecutor}} completely, is that acceptable? > 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 > Attachments: MAPREDUCE-7015-POC01.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}} but does not get the chance 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 fast enough to complete before step #7, but sometimes it can get behind, causing this race condition. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org