Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4CC61200CB5 for ; Wed, 12 Jul 2017 10:44:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CFCDD16846F; Wed, 12 Jul 2017 08:44:15 +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 0455D168452 for ; Wed, 12 Jul 2017 10:44:14 +0200 (CEST) Received: (qmail 80320 invoked by uid 500); 12 Jul 2017 08:44:14 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 80307 invoked by uid 99); 12 Jul 2017 08:44:13 -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; Wed, 12 Jul 2017 08:44:13 +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 5B412196111 for ; Wed, 12 Jul 2017 08:44:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, 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 DW7x4jijDSfj for ; Wed, 12 Jul 2017 08:44:11 +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 EE8C0625FE for ; Wed, 12 Jul 2017 08:36: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 0B687E01D8 for ; Wed, 12 Jul 2017 08:36:01 +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 2D02724702 for ; Wed, 12 Jul 2017 08:36:00 +0000 (UTC) Date: Wed, 12 Jul 2017 08:36:00 +0000 (UTC) From: "Bibin A Chundatt (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (YARN-6803) AM registration could fail if event processing is delayed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 12 Jul 2017 08:44:18 -0000 [ https://issues.apache.org/jira/browse/YARN-6803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16083640#comment-16083640 ] Bibin A Chundatt edited comment on YARN-6803 at 7/12/17 8:35 AM: ----------------------------------------------------------------- {quote} Wondering if we could get a REGISTERED event before we get a LAUNCHED event if the launch processing is particularly slow in getting the event posted. {quote} IIUC as [~sunilg] mentioned response delay from nodemanager could cause REGISTERED event before we get a LAUNCHED. IMHO but the probability would be very rare. As per YARN-1214 if client token is send to client before credentials are saved is problematic. So the fix could be to move the client masterkey setting to {{AttemptStoredTransition}} before launch call and for UnmanagedAM in {{UnmanagedAMAttemptSavedTransition}}. [~jlowe] is it ok to continue discussion in this JIRA or should be continue in YARN-3260? was (Author: bibinchundatt): {quote} Wondering if we could get a REGISTERED event before we get a LAUNCHED event if the launch processing is particularly slow in getting the event posted. {quote} IIUC as [~sunilg] mentioned response delay from nodemanager could cause REGISTERED event before we get a LAUNCHED. IMHO but the probability would be very rare. For client TOKEN from YARN-1214 if client token is send to client before credentials are saved is problematic. So the fix could be to move the client masterkey setting to {{AttemptStoredTransition}} before launch call and for UnmanagedAM in {{UnmanagedAMAttemptSavedTransition}}. [~jlowe] is it ok to continue discussion in this JIRA or should be continue in YARN-3260? > AM registration could fail if event processing is delayed. > ---------------------------------------------------------- > > Key: YARN-6803 > URL: https://issues.apache.org/jira/browse/YARN-6803 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Bibin A Chundatt > Assignee: Bibin A Chundatt > Priority: Critical > Attachments: YARN-6803.001.patch > > > Steps to reproduce > # Submit application > # Delay application attempt AMLauch event processing > # Make AM register before AM Launch event is fired > {{DefaultAMSProcessor#registerApplicationMaster}} client token > {code} > if (UserGroupInformation.isSecurityEnabled()) { > LOG.info("Setting client token master key"); > response.setClientToAMTokenMasterKey(java.nio.ByteBuffer.wrap( > getRmContext().getClientToAMTokenSecretManager() > .getMasterKey(applicationAttemptId).getEncoded())); > } > {code} > {code} > org.apache.hadoop.yarn.exceptions.YarnRuntimeException: java.lang.NullPointerException: java.lang.NullPointerException > at org.apache.hadoop.yarn.server.resourcemanager.DefaultAMSProcessor.registerApplicationMaster(DefaultAMSProcessor.java:130) > at org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService.registerApplicationMaster(ApplicationMasterService.java:217) > at org.apache.hadoop.yarn.api.impl.pb.service.ApplicationMasterProtocolPBServiceImpl.registerApplicationMaster(ApplicationMasterProtocolPBServiceImpl.java:90) > at org.apache.hadoop.yarn.proto.ApplicationMasterProtocol$ApplicationMasterProtocolService$2.callBlockingMethod(ApplicationMasterProtocol.java:95) > at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:522) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:991) > at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:869) > at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:815) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1965) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2675) > at org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator.register(RMCommunicator.java:177) > at org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator.serviceStart(RMCommunicator.java:121) > at org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator.serviceStart(RMContainerAllocator.java:280) > at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$ContainerAllocatorRouter.serviceStart(MRAppMaster.java:978) > at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193) > at org.apache.hadoop.service.CompositeService.serviceStart(CompositeService.java:120) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.serviceStart(MRAppMaster.java:1280) > at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$6.run(MRAppMaster.java:1733) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1965) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.initAndStartAppMaster(MRAppMaster.java:1729) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1660) > {code} > *Root Cause* > {{ClientToAMTokenSecretManagerInRM}} token master key is set only after AMLauch event is fired. > {{AMLaunchedTransition}} > {code} > // register the ClientTokenMasterKey after it is saved in the store, > // otherwise client may hold an invalid ClientToken after RM restarts. > if (UserGroupInformation.isSecurityEnabled()) { > appAttempt.rmContext.getClientToAMTokenSecretManager() > .registerApplication(appAttempt.getAppAttemptId(), > appAttempt.getClientTokenMasterKey()); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org