Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21F2618E23 for ; Wed, 14 Oct 2015 17:57:28 +0000 (UTC) Received: (qmail 18662 invoked by uid 500); 14 Oct 2015 17:57:06 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 18611 invoked by uid 500); 14 Oct 2015 17:57:05 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 18598 invoked by uid 99); 14 Oct 2015 17:57:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2015 17:57:05 +0000 Date: Wed, 14 Oct 2015 17:57:05 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-14598) ByteBufferOutputStream grows its HeapByteBuffer beyond JVM limitations 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/HBASE-14598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14957384#comment-14957384 ] stack commented on HBASE-14598: ------------------------------- {code} Printing hanging tests Hanging test : org.apache.hadoop.hbase.regionserver.TestRegionReplicaFailover Hanging test : org.apache.hadoop.hbase.regionserver.TestSplitWalDataLoss Hanging test : org.apache.hadoop.hbase.regionserver.TestCompactionState Hanging test : org.apache.hadoop.hbase.util.TestHBaseFsck {code} A different set. > ByteBufferOutputStream grows its HeapByteBuffer beyond JVM limitations > ---------------------------------------------------------------------- > > Key: HBASE-14598 > URL: https://issues.apache.org/jira/browse/HBASE-14598 > Project: HBase > Issue Type: Bug > Affects Versions: 0.98.12 > Reporter: Ian Friedman > Assignee: Ian Friedman > Attachments: 14598.txt, hbase-14598-v1 (1).patch, hbase-14598-v1.patch, hbase-14598-v1.patch, hbase-14598-v1.patch > > > We noticed that in returning a Scan against a region containing particularly large (wide) rows that it is possible during ByteBufferOutputStream.checkSizeAndGrow() to attempt to create a new ByteBuffer larger than the JVM allows which then throws a OutOfMemoryError. The code currently caps it at Integer.MAX_VALUE which is actually larger than the JVM allows. This lead to us dealing with cascading region server death as the RegionServer hosting the region died, opened on a new server, the client retried the scan, and the new RS died as well. > I believe ByteBufferOutputStream should not try to create ByteBuffers that large and instead throw an exception back up if it needs to grow any bigger. The limit should probably be something like Integer.MAX_VALUE-8, as that is what ArrayList uses. ref: http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/java/util/ArrayList.java#221 -- This message was sent by Atlassian JIRA (v6.3.4#6332)