Bug 920079

Summary: Infinispan divides by zero
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ladislav Thon <lthon>
Component: ClusteringAssignee: Paul Ferraro <paul.ferraro>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: jkudrnac, myarboro, paul.ferraro, rjanik, smumford
Target Milestone: DR0   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 14:36:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1036889    
Bug Blocks:    

Description Ladislav Thon 2013-03-11 10:21:42 UTC
After server shutdown was initiated, Infinispan received new view and then tried to divide by zero:

19:40:50,671 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-2,shared=udp) ISPN000094: Received new cluster view: [perf20/web|13] [perf20/web, perf21/web]
19:40:50,754 ERROR [org.infinispan.topology.ClusterTopologyManagerImpl] (notification-thread-0) ISPN000196: Failed to recover cluster state after the current node became the coordinator: java.lang.ArithmeticException: / by zero
	at org.infinispan.distribution.ch.DefaultConsistentHashFactory.addPrimaryOwners(DefaultConsistentHashFactory.java:130)
	at org.infinispan.distribution.ch.DefaultConsistentHashFactory.rebalanceBuilder(DefaultConsistentHashFactory.java:124)
	at org.infinispan.distribution.ch.DefaultConsistentHashFactory.updateMembers(DefaultConsistentHashFactory.java:86)
	at org.infinispan.distribution.ch.DefaultConsistentHashFactory.updateMembers(DefaultConsistentHashFactory.java:45)
	at org.infinispan.topology.ClusterTopologyManagerImpl.updateCacheStatusAfterMerge(ClusterTopologyManagerImpl.java:306)
	at org.infinispan.topology.ClusterTopologyManagerImpl.handleNewView(ClusterTopologyManagerImpl.java:236)
	at org.infinispan.topology.ClusterTopologyManagerImpl$ClusterViewListener.handleViewChange(ClusterTopologyManagerImpl.java:597)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_38]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_38]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_38]
	at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_38]
	at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:212)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]

Seen in https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-6x-failover-http-session-jvmkill-dist-sync/39/console-perf20/

Comment 1 JBoss JIRA Server 2013-03-27 18:39:34 UTC
Mircea Markus <mmarkus> made a comment on jira ISPN-2910

seems to happen when there are no nodes in the cluster.

Comment 2 JBoss JIRA Server 2013-03-30 18:12:11 UTC
Dan Berindei <dberinde> updated the status of jira ISPN-2910 to Coding In Progress

Comment 3 JBoss JIRA Server 2013-04-01 14:10:28 UTC
Dan Berindei <dberinde> made a comment on jira ISPN-2910

Skip topology update when a new node becomes coordinator and all the
members of a cache leave while the coordinator recovers the state.

Comment 4 Ladislav Thon 2013-05-16 08:40:53 UTC
Update from EAP 6.1.0.ER8 testing cycle: This issue was not seen during this cycle.
This can mean that it was either fixed unintentionally (maybe as a by-product of the Infinispan upgrade to 5.2.6.Final) or this issue just became rarer.
Either way, we decided not to close this issue.

Comment 5 JBoss JIRA Server 2013-05-16 08:45:40 UTC
Radoslav Husar <rhusar> made a comment on jira ISPN-2910

Did the fix make it to 5.2.x? I can't seem to find it (maybe as part of something else?)

Comment 6 Jitka Kozana 2013-05-16 08:57:31 UTC
I looked at the release notes of 5.2.6.Final and this fix was not included. According to the JIRA, fix for this issue went to the 5.3.x.

Comment 7 Paul Ferraro 2014-02-10 16:35:33 UTC
This was fixed in Infinispan 5.2.6.Final.  Please verify.

Comment 8 Richard Janík 2014-02-19 15:57:55 UTC
Verified.

Comment 9 Scott Mumford 2014-04-30 03:09:10 UTC
Paul, does this issue need a release note for the 6.3.0 release?

I'm not able to find a narrative I can follow in this or the linked JIRA.

If a release note is warranted, could you please provide some details in the Doc Text field above to allow ECS to craft one.

Thanks.

Comment 10 Paul Ferraro 2014-05-14 15:32:44 UTC
This does not require a release note.  It was fixed in 6.2, even though it was only verified during this release cycle.