https://bz.apache.org/bugzilla/show_bug.cgi?id=59864
Bug ID: 59864
Summary: segfault when using route-redirect pairs and both
servers are disabled/in error mode
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: mod_proxy_balancer
Assignee: [email protected]
Reporter: [email protected]
A little background: I am using the redirect feature for mod_proxy_balancer as
feature to pair two servers together while all servers are still used within an
cluster.
Thats how the configuration looks like:
<Proxy balancer://fe_cluster>
BalancerMember http://fe01:8080 min=0 smax=30 retry=30 max=100
loadfactor=50 route=fe01 redirect=fe02
BalancerMember http://fe02:8080 min=0 smax=30 retry=30 max=100
loadfactor=50 route=fe02 redirect=fe01
BalancerMember http://fe03:8080 min=0 smax=30 retry=30 max=100
loadfactor=50 route=fe03 redirect=fe04
BalancerMember http://fe04:8080 min=0 smax=30 retry=30 max=100
loadfactor=50 route=fe04 redirect=fe03
BalancerMember http://fe05:8080 min=0 smax=30 retry=30 max=100
loadfactor=50 route=fe05 redirect=fe06
BalancerMember http://fe06:8080 min=0 smax=30 retry=30 max=100
loadfactor=50 route=fe06 redirect=fe05
</proxy>
The goal of that configuration is that the app-servers in the back do not need
to replicate their sessions to all servers but only to their redirect partner
(and sessions can become big, so this saves lot of memory).
It might by unusual to use the redirect feature in this way, but a segfault is
a bug regardless how a feature is used.
This setup works really fine if at least one server of each pair is active (not
disabled or in error mode). If both servers of a pair are not available then
the module is hanging in a deadloop doing the redirect which ends in an
segfault.
The problem seems to be that the redirection has no limit/does not check if it
already tried to redirect to a specific memeber already.
The relevant code is located in the file: modules/proxy/mod_proxy_balancer.c:
For httpd-2.4.23 between line 214 to 277.
For httpd-2.2.31 between line 190 to 252.
It looks for me that the problem still exists in 2.5-trunk.
GDB output:
[Thread 0x7fffeff86700 (LWP 52185) exited]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcefcd700 (LWP 52245)]
0x00007ffff3288356 in find_route_worker (balancer=balancer@entry=0x320ad1c8,
route=0x7ffff0bc9ce0 "fe01", r=r@entry=0x7fff94002970)
at /opt/httpd-2.2.31/modules/proxy/mod_proxy_balancer.c:192
What should happen:
If there is a redirect mod_proxy_balancer should keep track of the members it
already tried to redirect to or at least have a limit how often to try to
redirect -> and then return the same error code like it does when all members
of a cluster a down: 503 "Service Temporarily Unavailable".
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]