Bug 1172021 - Cross site state transfer - NPE on consumer site when backup cache is not present
Summary: Cross site state transfer - NPE on consumer site when backup cache is not pre...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR2
: 6.4.0
Assignee: Pedro Ruivo
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-09 09:12 UTC by Matej Čimbora
Modified: 2015-02-22 23:59 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-01-28 13:25:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-5061 0 Major Resolved Cross site state transfer - NPE on consumer site when backup cache is local 2016-09-16 12:10:06 UTC

Description Matej Čimbora 2014-12-09 09:12:35 UTC
Tested on ER7

NPE detected on consumer site after invoking push operation on producer site. Occurs when corresponding cache does not exist on consumer site (either with the same name as the main cache or specified via <backup-for> option).

Configuration:
2 sites, BRN (main), LON (backup)

Producer site CLI:

Unable to pushState to 'LON'. org.infinispan.commons.CacheException: Problems invoking command.

Consumer site log:

[33m11:50:26,235 WARN  [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (remote-thread-0) ISPN000071: Caught exception when handling command XSiteStateTransferControlCommand{control=START_RECEIVE, siteName='BRN', statusOk=false, cacheName='brnCache'}: java.lang.NullPointerException
	at org.infinispan.xsite.BackupReceiverImpl.invokeRemotelyInLocalSite(BackupReceiverImpl.java:212) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT]
	at org.infinispan.xsite.BackupReceiverImpl.handleStateTransferControl(BackupReceiverImpl.java:89) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT]
	at org.infinispan.xsite.statetransfer.XSiteStateTransferControlCommand.performInLocalSite(XSiteStateTransferControlCommand.java:41) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT]
	at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher$3.run(CommandAwareRpcDispatcher.java:250) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]

[33m11:50:26,821 WARN  [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (remote-thread-0) ISPN000071: Caught exception when handling command XSiteStateTransferControlCommand{control=FINISH_RECEIVE, siteName='BRN', statusOk=false, cacheName='brnCache'}: java.lang.NullPointerException
	at org.infinispan.xsite.BackupReceiverImpl.invokeRemotelyInLocalSite(BackupReceiverImpl.java:212) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT]
	at org.infinispan.xsite.BackupReceiverImpl.handleStateTransferControl(BackupReceiverImpl.java:89) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT]
	at org.infinispan.xsite.statetransfer.XSiteStateTransferControlCommand.performInLocalSite(XSiteStateTransferControlCommand.java:41) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT]
	at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher$3.run(CommandAwareRpcDispatcher.java:250) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]

Comment 2 Martin Gencur 2014-12-09 13:58:28 UTC
Matej, what would you expect in such case when backup cache is not configured and a cache with same name does not exist? A different exception?

Comment 3 Matej Čimbora 2014-12-09 14:15:32 UTC
I'm perfectly fine with warn message being displayed. However I don't think letting NPE be thrown in that case is appropriate. This situation should be handled in the code.

Comment 4 Pedro Ruivo 2014-12-09 15:44:24 UTC
hmm... if the cache does not exists, the backup site will create it. By the line in which the exception is thrown, the cache created is a local cache and it does not have a RpcManager (that's why it is throwing a NPE).

I must check if the cache is local and handle it in the proper way :)

Comment 5 JBoss JIRA Server 2014-12-09 15:45:02 UTC
Pedro Ruivo <pruivo> updated the status of jira ISPN-5061 to Coding In Progress


Note You need to log in before you can comment on or make changes to this bug.