From issues-return-39551-archive-asf-public=cust-asf.ponee.io@tez.apache.org Mon Aug 6 18:09:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 79E55180627 for ; Mon, 6 Aug 2018 18:09:04 +0200 (CEST) Received: (qmail 41769 invoked by uid 500); 6 Aug 2018 16:09:03 -0000 Mailing-List: contact issues-help@tez.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tez.apache.org Delivered-To: mailing list issues@tez.apache.org Received: (qmail 41760 invoked by uid 99); 6 Aug 2018 16:09:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2018 16:09:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 219EB1811B5 for ; Mon, 6 Aug 2018 16:09:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.801 X-Spam-Level: X-Spam-Status: No, score=-109.801 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id eyTv0U5qAwmj for ; Mon, 6 Aug 2018 16:09:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 8E09B5F434 for ; Mon, 6 Aug 2018 16:09:01 +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 D6AFEE04AD for ; Mon, 6 Aug 2018 16:09: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 3D03A23F99 for ; Mon, 6 Aug 2018 16:09:00 +0000 (UTC) Date: Mon, 6 Aug 2018 16:09:00 +0000 (UTC) From: "Jonathan Eagles (JIRA)" To: issues@tez.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TEZ-3974) Tez: Correctness regression of TEZ-955 in TEZ-2937 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/TEZ-3974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16570411#comment-16570411 ] Jonathan Eagles commented on TEZ-3974: -------------------------------------- [~jmarhuen], can a test be added that ensures future correctness? If a code change silently breaks this fix, it will be hard to find. > Tez: Correctness regression of TEZ-955 in TEZ-2937 > -------------------------------------------------- > > Key: TEZ-3974 > URL: https://issues.apache.org/jira/browse/TEZ-3974 > Project: Apache Tez > Issue Type: Bug > Reporter: Gopal V > Assignee: Jaume M > Priority: Critical > Attachments: TEZ-3974.1.patch > > > TEZ-2937 might have introduced a race condition for Tez output events, along with TEZ-2237 > {code} > // Close the Outputs. > for (OutputSpec outputSpec : outputSpecs) { > String destVertexName = outputSpec.getDestinationVertexName(); > initializedOutputs.remove(destVertexName); > List closeOutputEvents = ((LogicalOutputFrameworkInterface)outputsMap.get(destVertexName)).close(); > sendTaskGeneratedEvents(closeOutputEvents, > EventProducerConsumerType.OUTPUT, taskSpec.getVertexName(), > destVertexName, taskSpec.getTaskAttemptID()); > } > // Close the Processor. > processorClosed = true; > processor.close(); > {code} > As part of TEZ-2237, the outputs send empty events when the output is closed without being started (which happens in task init failures). > These events are obsoleted when a task fails and this happens in the AM, but not before the dispatcher looks at them. > Depending on the timing, the empty events can escape obsoletion & be sent to a downstream task. > This gets marked as a SKIPPED event in the downstream task, which means that further obsoletion events sent to the downstream task is ignored (because a zero byte fetch is not repeated on node failure). > So the downstream task can exit without actually waiting for the retry of the failed task and cause silent dataloss in case where the retry succeeds in another attempt. > So if processor.close() throws an exception, this introduce a race condition and if the AM is too fast, we end up with correctness issues. > This was originally reported in TEZ-955 -- This message was sent by Atlassian JIRA (v7.6.3#76005)