Hi all,
Le 22/09/2014 19:43, Lukas Tribus a écrit :
Hi Seri,
This configuration works well in 1.5.4 release version and b53934e.
but, in 5436afc commit, haproxy crashes frequently.
Thanks for this, this will help pinpointing the issues, however, I am still
unable to reproduce the crash.
Can you send a more complete configuration to reproduce the crash,
including default and global sections?
I could reproduce segfaults with the latest 1.5 snapshot.
It only happens with a dynamic "use_backend".
The issue happens because during the configuration parsing, a dynamic
use_backend can't resolve the backend and leaves the union structure as
a string (which is also freed), not a pointer to a proxy.
Before the commits pointed by Seri, bind_proc were not updated when a
dynamic rule is recognized.
Maybe a quick workaround could be the patch attached, but it means that
we still can't propagate processes for proxies used by dynamic rules.
--
Cyril Bonté
diff --git a/src/cfgparse.c b/src/cfgparse.c
index f723a3a..f226b66 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -6015,6 +6015,8 @@ void propagate_processes(struct proxy *from, struct proxy *to)
/* use_backend */
list_for_each_entry(rule, &from->switching_rules, list) {
+ if (rule->dynamic)
+ continue;
to = rule->be.backend;
propagate_processes(from, to);
}