You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org> on 2010/08/12 00:16:16 UTC
[jira] Updated: (HBASE-2909) SoftValueSortedMap is broken, can
generate NPEs
[ https://issues.apache.org/jira/browse/HBASE-2909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Daniel Cryans updated HBASE-2909:
--------------------------------------
Attachment: hbase-2909.patch
Here's a more "normal" way of doing a soft references structure, with the SoftValue now inside SoftValueSortedMap. I also got rid of the implementation of Map.Entry (which was suspicious) and disabled entrySet because 1) it wasn't used and 2) it used the Map.Entry which wasn't really one. Ran a few tests and it works, need more at-scale testing.
> 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.<init>(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.