Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 91A3F174F5 for ; Fri, 31 Oct 2014 04:16:35 +0000 (UTC) Received: (qmail 70157 invoked by uid 500); 31 Oct 2014 04:16:34 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 70061 invoked by uid 500); 31 Oct 2014 04:16:34 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 70042 invoked by uid 99); 31 Oct 2014 04:16:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Oct 2014 04:16:34 +0000 Date: Fri, 31 Oct 2014 04:16:34 +0000 (UTC) From: "Lars Hofhansl (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (HBASE-12274) Race between RegionScannerImpl#nextInternal() and RegionScannerImpl#close() may produce null pointer exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-12274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl reopened HBASE-12274: ----------------------------------- Just seeing this now. Adding synchronized to nextRaw is *not* OK. I added nextRaw specifically for callers who know what they are doing (like Phoenix). This needs to reverted and we need to find another solution. -1 > Race between RegionScannerImpl#nextInternal() and RegionScannerImpl#close() may produce null pointer exception > -------------------------------------------------------------------------------------------------------------- > > Key: HBASE-12274 > URL: https://issues.apache.org/jira/browse/HBASE-12274 > Project: HBase > Issue Type: Bug > Affects Versions: 0.98.6.1 > Reporter: Ted Yu > Assignee: Ted Yu > Fix For: 2.0.0, 0.98.8, 0.99.2 > > Attachments: 12274-region-server.log, 12274-v2.txt, 12274-v2.txt, 12274-v3.txt > > > I saw the following in region server log: > {code} > 2014-10-15 03:28:36,976 ERROR [B.DefaultRpcServer.handler=0,queue=0,port=60020] ipc.RpcServer: Unexpected throwable object > java.lang.NullPointerException > at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextInternal(HRegion.java:5023) > at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(HRegion.java:4932) > at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(HRegion.java:4923) > at org.apache.hadoop.hbase.regionserver.HRegionServer.scan(HRegionServer.java:3245) > at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:29994) > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2078) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:108) > at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:114) > at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:94) > at java.lang.Thread.run(Thread.java:745) > {code} > This is where the NPE happened: > {code} > // Let's see what we have in the storeHeap. > KeyValue current = this.storeHeap.peek(); > {code} > The cause was race between nextInternal(called through nextRaw) and close methods. > nextRaw() is not synchronized. -- This message was sent by Atlassian JIRA (v6.3.4#6332)