Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1172021 - Cross site state transfer - NPE on consumer site when backup cache is not present
Cross site state transfer - NPE on consumer site when backup cache is not pre...
Status: CLOSED CURRENTRELEASE
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan (Show other bugs)
6.4.0
Unspecified Unspecified
unspecified Severity unspecified
: CR2
: 6.4.0
Assigned To: Pedro Ruivo
Martin Gencur
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-09 04:12 EST by Matej Čimbora
Modified: 2015-02-22 18:59 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously in Red Hat JBoss Data Grid, when the backup cache was not defined in the consumer site (with either the same name as the main cache or specified via the &lt;backup-for&gt; option), the customer site would create a new local cache without the RPC manager. This resulted in a NullPointerException being thrown in the consumer site with the following error message also displayed in the producer site: <screen>Unable to pushState to 'XYZ'. org.infinispan.commons.CacheException: Problems invoking command</screen> This issue is now resolved in JBoss Data Grid 6.4 so that if the cache does not exist, it is created with an RPC manager as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-28 08:25:47 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker ISPN-5061 Major Resolved Cross site state transfer - NPE on consumer site when backup cache is local 2016-09-16 08:10 EDT

  None (edit)
Description Matej Čimbora 2014-12-09 04:12:35 EST
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 08:58:28 EST
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 09:15:32 EST
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 10:44:24 EST
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 10:45:02 EST
Pedro Ruivo <pruivo@redhat.com> 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.