Quantcast
Channel: Serverphorums.com - HAProxy
Viewing all articles
Browse latest Browse all 5112

Haproxy 1.6 segfault on FreeBSD (6 replies)

$
0
0
Hi everyone,
It seems that since some times haproxy 1.6 segfault on freebsd

Eg: at commit 80b59eb0d20245b4040f8ee0baae0d36b6c446b5

Program received signal SIGSEGV, Segmentation fault.
0x00000000004d5cf7 in smp_resolve_args (p=0x80144b000) at src/sample.c:1080
1080 list_for_each_entry_safe(cur, bak, &p->conf.args.list, list) {
Current language: auto; currently minimal
(gdb) backtrace
#0 0x00000000004d5cf7 in smp_resolve_args (p=0x80144b000) at src/sample.c:1080
#1 0x0000000000444611 in check_config_validity () at src/cfgparse.c:7614
#2 0x0000000000404229 in init (argc=0, argv=0x7fffffffeae8) at
src/haproxy.c:741
#3 0x0000000000406b3f in main (argc=3, argv=0x7fffffffead0) at
src/haproxy.c:1542
(gdb) n
1080 list_for_each_entry_safe(cur, bak, &p->conf.args.list, list) {
(gdb) print cur
$1 = (struct arg_list *) 0x0
(gdb) print *bak
$2 = {list = {n = 0x18b88148f8458b48, p = 0xf0000000000000c}, arg =
0x7d8b480000002684,
arg_pos = 35383544, ctx = -1924661248,
kw = 0x8b48004f92b2253c <Error reading address 0x8b48004f92b2253c:
Bad address>,
conv = 0xa58918b48f84d <Error reading address 0xa58918b48f84d: Bad address>,
file = 0x7ee800b0c6894800 <Error reading address 0x7ee800b0c6894800:
Bad address>,
line = 1224735602}
(gdb) print p->conf.args.list
$3 = {n = 0x0, p = 0x0}

Don't ask me why (and I'd really like to get why) but a revert of
65d805fdfc5ceead2645d3107cbae7b7696a1f15 fix the issue

diff --git a/include/common/compat.h b/include/common/compat.h
index ecbc3b1..48ea1f7 100644
--- a/include/common/compat.h
+++ b/include/common/compat.h
@@ -27,6 +27,8 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
+#include <common/config.h>
+#include <common/standard.h>

#ifndef BITS_PER_INT
#define BITS_PER_INT (8*sizeof(int))
diff --git a/include/common/config.h b/include/common/config.h
index 27b8f14..5833cfc 100644
--- a/include/common/config.h
+++ b/include/common/config.h
@@ -23,7 +23,6 @@
#define _COMMON_CONFIG_H

#include <common/compiler.h>
-#include <common/compat.h>
#include <common/defaults.h>

/* this reduces the number of calls to select() by choosing appropriate
diff --git a/include/types/global.h b/include/types/global.h
index ec6679d..bdc0654 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -25,7 +25,6 @@
#include <netinet/in.h>

#include <common/config.h>
-#include <common/standard.h>
#include <types/freq_ctr.h>
#include <types/listener.h>
#include <types/proxy.h>

Viewing all articles
Browse latest Browse all 5112

Trending Articles