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 A97D4963B for ; Fri, 4 May 2012 05:13:20 +0000 (UTC) Received: (qmail 47252 invoked by uid 500); 4 May 2012 05:13:20 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 47070 invoked by uid 500); 4 May 2012 05:13:19 -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 47028 invoked by uid 99); 4 May 2012 05:13:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2012 05:13:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2012 05:13:14 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 44A0142FAAA for ; Fri, 4 May 2012 05:12:54 +0000 (UTC) Date: Fri, 4 May 2012 05:12:54 +0000 (UTC) From: "Todd Johnson (JIRA)" To: issues@hbase.apache.org Message-ID: <619762918.25807.1336108374317.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <724712507.19197.1335998927853.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-5922) HalfStoreFileReader seekBefore causes StackOverflowError MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-5922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268132#comment-13268132 ] Todd Johnson commented on HBASE-5922: ------------------------------------- "This seems correct to me... that we should be returning last key in the bottom (the 'before') rather than a null." I guess this requires a little more testing. My understanding has been that, when 'bottom' is being asked about something that is really in 'top,' there is nothing present (in 'bottom') which could qualify as 'before,' so to move the pointer anywhere would be a waste. If the correct thing to do is end up with a call to delegate.seekBefore(splitKey ...), I don't think the best fix is to change >= to >. I agree that this would have that result, but it creates a single unnecessary (and somewhat confusing) recursive call that is guaranteed to result in delegate.seekBefore(splitKey ...) anyway. So the solution which has the behavior that Adoop expects but is most readable would change the recursive call on line 153 from seekBefore to delegate.seekBefore. This would also make it look more like the analogous code in seekTo(). But I would still prefer to spend a few more minutes with Nate and the code tomorrow. > HalfStoreFileReader seekBefore causes StackOverflowError > -------------------------------------------------------- > > Key: HBASE-5922 > URL: https://issues.apache.org/jira/browse/HBASE-5922 > Project: HBase > Issue Type: Bug > Components: client, io > Affects Versions: 0.90.0 > Environment: HBase 0.90.4 > Reporter: Nate Putnam > Assignee: Nate Putnam > Priority: Critical > Fix For: 0.90.0 > > Attachments: HBASE-5922.patch, HBASE-5922.patch, HBASE-5922.v2.patch > > > Calling HRegionServer.getClosestRowBefore() can cause a stack overflow if the underlying store file is a reference and the row key is in the bottom. > java.io.IOException: java.io.IOException: java.lang.StackOverflowError > at org.apache.hadoop.hbase.regionserver.HRegionServer.convertThrowableToIOE(HRegionServer.java:990) > at org.apache.hadoop.hbase.regionserver.HRegionServer.convertThrowableToIOE(HRegionServer.java:978) > at org.apache.hadoop.hbase.regionserver.HRegionServer.getClosestRowBefore(HRegionServer.java:1651) > at sun.reflect.GeneratedMethodAccessor174.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570) > at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039) > Caused by: java.lang.StackOverflowError > at org.apache.hadoop.hbase.io.HalfStoreFileReader$1.seekBefore(HalfStoreFileReader.java:147) > at org.apache.hadoop.hbase.io.HalfStoreFileReader$1.seekBefore(HalfStoreFileReader.java:149) > at org.apache.hadoop.hbase.io.HalfStoreFileReader$1.seekBefore(HalfStoreFileReader.java:149) > at org.apache.hadoop.hbase.io.HalfStoreFileReader$1.seekBefore(HalfStoreFileReader.java:149) > at org.apache.hadoop.hbase.io.HalfStoreFileReader$1.seekBefore(HalfStoreFileReader.java:149) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira