NPE in HBaseClient$Connection.receiveResponse
---------------------------------------------
Key: HBASE-5013
URL: https://issues.apache.org/jira/browse/HBASE-5013
Project: HBase
Issue Type: Bug
Reporter: Prakash Khemani
Assignee: Prakash Khemani
We have the following NPE
java.io.IOException: Call to hbasedev003.snc3.facebook.com/10.26.1.198:60020
failed on local exception: java.io.IOException: Unexpected exception receiving
call responses
at
org.apache.hadoop.hbase.ipc.HBaseClient.wrapException(HBaseClient.java:916)
at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:885)
at
org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:149)
at $Proxy6.getProtocolVersion(Unknown Source)
at
org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.java:182)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:295)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:272)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:324)
at org.apache.hadoop.hbase.ipc.HBaseRPC.waitForProxy(HBaseRPC.java:228)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1197)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1154)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1141)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:872)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:768)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.relocateRegion(HConnectionManager.java:742)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:978)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:772)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:736)
at org.apache.hadoop.hbase.client.HTable.(HTable.java:207)
at org.apache.hadoop.hbase.client.HTable.(HTable.java:177)
at com.facebook.BulkImporter.VerifyAssocs.(VerifyAssocs.java:248)
at
com.facebook.BulkImporter.VerifyAssocs$AssocVerifierMapper.setup(VerifyAssocs.java:138)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:142)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:624)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
at org.apache.hadoop.mapred.Child.main(Child.java:159)
Caused by: java.io.IOException: Unexpected exception receiving call responses
at
org.apache.hadoop.hbase.ipc.HBaseClient$Connection.run(HBaseClient.java:494)
Caused by: java.lang.NullPointerException
at
org.apache.hadoop.hbase.ipc.HBaseClient$Connection.receiveResponse(HBaseClient.java:571)
at
org.apache.hadoop.hbase.ipc.HBaseClient$Connection.run(HBaseClient.java:490)
===
Just by looking at code the NPE shouldn't have happened
HBaseClient$Connection.setUpIOstreams() sets up in and out.
Then it starts the Connection thread.
The Connection in its run method calls receiveResponse()
In receiveResponse() NPE happens in
int id = in.readInt();
As per java.util.concurrent docs the the initialization of in should have been
visible in the Connection thread's run() method. So I don't know how in ended
up being NULL.
===
While looking into this issue I noticed a small problem in the
closeConnection() method. I will soon upload a diff.
--
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