You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hudson (Jira)" <ji...@apache.org> on 2020/12/01 17:10:01 UTC

[jira] [Commented] (HBASE-25307) ThreadLocal pooling leads to NullPointerException

    [ https://issues.apache.org/jira/browse/HBASE-25307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17241698#comment-17241698 ] 

Hudson commented on HBASE-25307:
--------------------------------

Results for branch branch-2.3
	[build #116 on builds.a.o|https://ci-hadoop.apache.org/job/HBase/job/HBase%20Nightly/job/branch-2.3/116/]: (x) *{color:red}-1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general report|https://ci-hadoop.apache.org/job/HBase/job/HBase%20Nightly/job/branch-2.3/116/General_20Nightly_20Build_20Report/]




(/) {color:green}+1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) report|https://ci-hadoop.apache.org/job/HBase/job/HBase%20Nightly/job/branch-2.3/116/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]


(x) {color:red}-1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) report|https://ci-hadoop.apache.org/job/HBase/job/HBase%20Nightly/job/branch-2.3/116/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 report|https://ci-hadoop.apache.org/job/HBase/job/HBase%20Nightly/job/branch-2.3/116/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> ThreadLocal pooling leads to NullPointerException
> -------------------------------------------------
>
>                 Key: HBASE-25307
>                 URL: https://issues.apache.org/jira/browse/HBASE-25307
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 3.0.0-alpha-1
>            Reporter: Balazs Meszaros
>            Assignee: Balazs Meszaros
>            Priority: Major
>             Fix For: 3.0.0-alpha-1, 2.4.0, 2.2.7, 2.3.4
>
>
> We got NPE after setting {{hbase.client.ipc.pool.type}} to {{thread-local}}:
> {noformat}
> 20/11/18 01:53:04 ERROR yarn.ApplicationMaster: User class threw exception: java.lang.NullPointerException
> java.lang.NullPointerException
>         at org.apache.hadoop.hbase.ipc.AbstractRpcClient.close(AbstractRpcClient.java:496)
>         at org.apache.hadoop.hbase.client.ConnectionImplementation.close(ConnectionImplementation.java:1944)
>         at org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.close(TableInputFormatBase.java:660)
> {noformat}
> The root cause of the issue is probably at {{PoolMap.ThreadLocalPool.values()}}:
> {code:java}
> public Collection<R> values() {
>   List<R> values = new ArrayList<>();
>   values.add(get());
>   return values;
> }
> {code}
> It adds {{null}} into the collection if the current thread does not have any resources which leads to NPE later.
> I traced the usages of values() and it should return every resource, not just that one which is attached to the caller thread.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)