Bug 1233968 - [GSS](6.4.z) KeyAffinityService race condition on view change
Summary: [GSS](6.4.z) KeyAffinityService race condition on view change
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Clustering
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.4
Assignee: baranowb
QA Contact: Jitka Kozana
URL:
Whiteboard:
Depends On:
Blocks: 1202355 1235526 1235744 1246934
TreeView+ depends on / blocked
 
Reported: 2015-06-19 21:07 UTC by dereed
Modified: 2020-09-10 09:23 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-17 10:53:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test case (4.74 KB, application/octet-stream)
2015-07-27 04:03 UTC, dereed
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-5568 0 Major Resolved KeyAffinityService race condition on view change 2018-11-09 07:59:35 UTC
Red Hat Issue Tracker WFLY-4942 0 Major Closed KeyAffinityService race condition on view change 2018-11-09 07:59:35 UTC
Red Hat Knowledge Base (Solution) 2288831 0 None None None 2016-04-28 20:53:37 UTC

Description dereed 2015-06-19 21:07:42 UTC
KeyAffinityService#getKeyForAddress runs in a tight loop looking for keys:

    queue = address2key.get(address)

    while (result == null)

        result = queue.poll()

KeyAffinityService#handleViewChange clears and resets the queue list on membership change:

    address2key.clear()

    for each address

        map.put(address, new queue)

If a view change comes in after getKeyForAddress gets the queue, and the queue is empty, it will get stuck in a tight loop looking at the wrong queue forever while new keys are added to the new queue.

This affects EAP 6 session clustering with <distributed-cache>.

Comment 6 dereed 2015-07-27 04:03:25 UTC
Created attachment 1056437 [details]
Test case

Comment 7 Ivan Straka 2015-09-24 11:25:59 UTC
The test case run for about 10minutes and did not stop counting in contrast to old version: test case failed almost immediately with EAP version 6.2.0

Comment 8 JBoss JIRA Server 2015-11-05 13:32:16 UTC
Paul Ferraro <paul.ferraro> updated the status of jira WFLY-4942 to Closed

Comment 9 Richard Achmatowicz 2015-12-15 16:34:29 UTC
Here is the PR for 6.4.4: https://github.com/jbossas/jboss-eap/pull/2661

Comment 10 Richard Achmatowicz 2015-12-15 16:38:34 UTC
Forget the comment above. Wrong issue. If BZ was an real issue management system and not a toy, I could delete the comment - but I can't . Sorry.

Comment 11 Petr Penicka 2017-01-17 10:53:46 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Comment 12 Petr Penicka 2017-01-17 10:55:28 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.


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