Return-Path: Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: (qmail 405 invoked from network); 12 Aug 2010 17:20:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Aug 2010 17:20:41 -0000 Received: (qmail 96429 invoked by uid 500); 12 Aug 2010 17:20:41 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 96381 invoked by uid 500); 12 Aug 2010 17:20:40 -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 96373 invoked by uid 99); 12 Aug 2010 17:20:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Aug 2010 17:20:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Aug 2010 17:20:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7CHKGbs029535 for ; Thu, 12 Aug 2010 17:20:16 GMT Message-ID: <13609978.308931281633616324.JavaMail.jira@thor> Date: Thu, 12 Aug 2010 13:20:16 -0400 (EDT) From: "stack (JIRA)" To: issues@hbase.apache.org Subject: [jira] Commented: (HBASE-2909) SoftValueSortedMap is broken, can generate NPEs In-Reply-To: <3236573.288401281560838311.JavaMail.jira@thor> 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-2909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897846#action_12897846 ] stack commented on HBASE-2909: ------------------------------ +1 > SoftValueSortedMap is broken, can generate NPEs > ----------------------------------------------- > > Key: HBASE-2909 > URL: https://issues.apache.org/jira/browse/HBASE-2909 > Project: HBase > Issue Type: Bug > Components: client > Affects Versions: 0.20.6, 0.89.20100621 > Reporter: Jean-Daniel Cryans > Priority: Blocker > Fix For: 0.20.7, 0.90.0 > > Attachments: hbase-2909.patch > > > The way SoftValueSortedMap is using SoftValues, it looks like that it's able to get it's keys garbage collected along with the values themselves. We got this issue in production but I was also able to randomly generate it using YCSB with 300 threads. Here's an example on 0.20 with jdk 1.6u14: > {noformat} > java.lang.NullPointerException > at org.apache.hadoop.hbase.util.Bytes.compareTo(Bytes.java:1036) > at org.apache.hadoop.hbase.util.Bytes$ByteArrayComparator.compare(Bytes.java:104) > at org.apache.hadoop.hbase.util.Bytes$ByteArrayComparator.compare(Bytes.java:96) > at java.util.TreeMap.cmp(TreeMap.java:1911) > at java.util.TreeMap.get(TreeMap.java:1835) > at org.apache.hadoop.hbase.util.SoftValueSortedMap.get(SoftValueSortedMap.java:91) > at org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getCachedLocation(HConnectionManager.java:788) > at org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:651) > at org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:634) > at org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:601) > at org.apache.hadoop.hbase.client.HTable.(HTable.java:128) > at org.apache.hadoop.hbase.thrift.ThriftServer$HBaseHandler.getTable(ThriftServer.java:262) > at org.apache.hadoop.hbase.thrift.ThriftServer$HBaseHandler.mutateRowTs(ThriftServer.java:585) > at org.apache.hadoop.hbase.thrift.ThriftServer$HBaseHandler.mutateRow(ThriftServer.java:578) > at org.apache.hadoop.hbase.thrift.generated.Hbase$Processor$mutateRow.process(Hbase.java:2345) > at org.apache.hadoop.hbase.thrift.generated.Hbase$Processor.process(Hbase.java:1988) > at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:259) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:619) > {noformat} > In this specific case, the null cannot be the passed key because it's coming from HTable which uses HConstants.EMPTY_START_ROW. It cannot be a null key that was inserted previously because we would have got the NPE at insert time. This can only mean that some key *became* null. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.