Bug 1136976 - (6.4.0) mod_cluster can break stickiness for the first request on new child processes
Summary: (6.4.0) mod_cluster can break stickiness for the first request on new child p...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: mod_cluster
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: DR12
: EAP 6.4.0
Assignee: Jean-frederic Clere
QA Contact: Michal Karm Babacek
URL:
Whiteboard:
Depends On:
Blocks: 1139389 1147919
TreeView+ depends on / blocked
 
Reported: 2014-09-03 17:54 UTC by Aaron Ogburn
Modified: 2019-08-19 12:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:38:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker MODCLUSTER-427 0 Major Resolved mod_cluster can break stickiness for the first request on new child processes 2017-12-20 02:28:49 UTC

Description Aaron Ogburn 2014-09-03 17:54:20 UTC
Description of problem:

mod_cluster can break stickiness for the first request on new child processes.  It looks like this occurs specifically when "CreateBalancers 1" is used.  Prefork typically makes this much worse as well.

My debugging showed that the proxy_balancer would exist, but it would essentially be empty in the new child process.  find_session_route/find_route_worker would be called as expected, but the for loop in find_route_worker wasn't even doing anything because balancer->workers->nelts was 0.  The balancer would then finally be populated in the new child when the first request hits internal_find_best_byrequests and calls update_workers_node.


Version-Release number of selected component (if applicable):

mod_cluster 1.2.9.Final


How reproducible:

Very


Steps to Reproduce:

1. To exacerbate the issue, run httpd in prefork with a config forcing new processes every request:

StartServers         1
MaxClients         150
MinSpareServers      1
MaxSpareServers     1 
MaxRequestsPerChild  1

2. Set up mod_cluster with "CreateBalancers 1":

CreateBalancers 1
...
ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://mycluster/

3. Load up httpd with requests (they should all provide a stickied session) and check for breaks in stickiness. You can confirm the bug occurs also with one node by checking for occurrences of "proxy: byrequests balancer DONE" debug messages for what should be stickied requests.


Actual results:

Sticky sessions can break in new processes


Expected results:

Sticky sessions is maintained

Additional info:

Comment 1 Aaron Ogburn 2014-09-08 15:29:51 UTC
Fixed by https://github.com/modcluster/mod_cluster/pull/106.  EAP 6 will need an upgrade to 1.2.10.Final+.

Comment 2 Michal Karm Babacek 2014-11-19 14:43:15 UTC
No httpd, nor native bits delivered with DR10 to date.

Comment 3 Michal Karm Babacek 2014-12-09 14:33:15 UTC
Verified with EAP 6.4.0.DR12, mod_cluster 1.2.10.Final


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