Bug 1136976

Summary: (6.4.0) mod_cluster can break stickiness for the first request on new child processes
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Aaron Ogburn <aogburn>
Component: mod_clusterAssignee: Jean-frederic Clere <jclere>
Status: CLOSED CURRENTRELEASE QA Contact: Michal Karm Babacek <mbabacek>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bperkins, istudens, jlee, kkhan
Target Milestone: DR12   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:38:25 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:    
Bug Blocks: 1139389, 1147919    

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