Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8744917714 for ; Fri, 21 Nov 2014 21:16:34 +0000 (UTC) Received: (qmail 26355 invoked by uid 500); 21 Nov 2014 21:16:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 26277 invoked by uid 500); 21 Nov 2014 21:16:34 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 26263 invoked by uid 500); 21 Nov 2014 21:16:34 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 26260 invoked by uid 99); 21 Nov 2014 21:16:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2014 21:16:34 +0000 Date: Fri, 21 Nov 2014 21:16:33 +0000 (UTC) From: "Sergey Shelukhin (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-8829) Upgrade to Thrift 0.9.2 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/HIVE-8829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14221442#comment-14221442 ] Sergey Shelukhin commented on HIVE-8829: ---------------------------------------- Actually, I do have that by default... is it no longer supported? > Upgrade to Thrift 0.9.2 > ----------------------- > > Key: HIVE-8829 > URL: https://issues.apache.org/jira/browse/HIVE-8829 > Project: Hive > Issue Type: Improvement > Affects Versions: 0.15.0 > Reporter: Vaibhav Gumashta > Assignee: Prasad Mujumdar > Labels: HiveServer2, metastore > Fix For: 0.15.0 > > Attachments: HIVE-8829.1.patch, HIVE-8829.1.patch > > > Apache Thrift 0.9.2 was released recently (https://thrift.apache.org/download). It has a fix for THRIFT-2660 which can cause HS2 (tcp mode) and Metastore processes to go OOM on getting a non-thrift request when they use SASL transport. The reason ([thrift code|https://github.com/apache/thrift/blob/0.9.x/lib/java/src/org/apache/thrift/transport/TSaslTransport.java#L177]): > {code} > protected SaslResponse receiveSaslMessage() throws TTransportException { > underlyingTransport.readAll(messageHeader, 0, messageHeader.length); > byte statusByte = messageHeader[0]; > byte[] payload = new byte[EncodingUtils.decodeBigEndian(messageHeader, STATUS_BYTES)]; > underlyingTransport.readAll(payload, 0, payload.length); > NegotiationStatus status = NegotiationStatus.byValue(statusByte); > if (status == null) { > sendAndThrowMessage(NegotiationStatus.ERROR, "Invalid status " + statusByte); > } else if (status == NegotiationStatus.BAD || status == NegotiationStatus.ERROR) { > try { > String remoteMessage = new String(payload, "UTF-8"); > throw new TTransportException("Peer indicated failure: " + remoteMessage); > } catch (UnsupportedEncodingException e) { > throw new TTransportException(e); > } > } > {code} > Basically since there are no message format checks / size checks before creating the byte array, on getting a non-SASL message this creates a huge > byte array from some garbage size. > For HS2, an attempt was made to fix it here: HIVE-6468, which never went in. I think for 0.15.0 it's best to upgarde to Thrift 0.9.2. -- This message was sent by Atlassian JIRA (v6.3.4#6332)