Skip to content

Instantly share code, notes, and snippets.

@jayalane
Last active December 1, 2017 19:31
Show Gist options
  • Save jayalane/c6dbe7918aa9635b62c874d20f57dfec to your computer and use it in GitHub Desktop.
Save jayalane/c6dbe7918aa9635b62c874d20f57dfec to your computer and use it in GitHub Desktop.
haproxy segv
(gdb) bt
#0 0x000000000047d36b in process_chk_conn (t=0x77b390) at include/proto/connection.h:700
#1 process_chk (t=0x77b390) at src/checks.c:2283
#2 0x00000000004c4cef in process_runnable_tasks () at src/task.c:229
#3 0x0000000000482b80 in run_thread_poll_loop (argc=<value optimized out>, argv=0x7fffffffeac8) at src/haproxy.c:2326
#4 main (argc=<value optimized out>, argv=0x7fffffffeac8) at src/haproxy.c:2925
[root@..... haproxy-1.8.0]# ./haproxy -vv
Sharing filter with vars
Sharing email_alert with comp_state
Sharing tcpcheck_rule with vars
Sharing spoe_appctx with spoe_ctx
Sharing sig_handlers with pipe
Sharing task with h2s
Sharing notification with comp_state
Sharing session with spoe_ctx
Sharing conn_stream with comp_state
Sharing pendconn with pipe
HA-Proxy version 1.8.0 2017/11/26
Copyright 2000-2017 Willy Tarreau <[email protected]>
Build options :
TARGET = linux26
CPU = generic
CC = gcc
CFLAGS = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -Wno-unused-label
OPTIONS = USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_CPU_AFFINITY=1 USE_OPENSSL=1 USE_STATIC_PCRE=1
Default settings :
maxconn = 2000, bufsize = 16384, maxrewrite = 1024, maxpollevents = 200
Built with network namespace support.
Built with zlib version : 1.2.3
Running on zlib version : 1.2.3
Compression algorithms supported : identity("identity"), deflate("deflate"), raw-deflate("deflate"), gzip("gzip")
Built with PCRE version : 6.6 06-Feb-2006
Running on PCRE version : 6.6 06-Feb-2006
PCRE library supports JIT : no (USE_PCRE_JIT not set)
Encrypted password support via crypt(3): yes
Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT IP_FREEBIND
Built with OpenSSL version : OpenSSL 1.0.2k 26 Jan 2017
Running on OpenSSL version : OpenSSL 1.0.2k 26 Jan 2017
OpenSSL library supports TLS extensions : yes
OpenSSL library supports SNI : yes
OpenSSL library supports : SSLv3 TLSv1.0 TLSv1.1 TLSv1.2
Available polling systems :
epoll : pref=300, test result OK
poll : pref=200, test result OK
select : pref=150, test result OK
Total: 3 (3 usable), will use epoll.
Available filters :
[TRACE] trace
[COMP] compression
[SPOE] spoe
[root@... haproxy-1.8.0]# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java\
-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)
[root@... haproxy-1.8.0]# uname -
uname: extra operand `-'
Try `uname --help' for more information.
[root@... haproxy-1.8.0]# uname -a
Linux ... 2.6.18-419.0.0.0.2.el5 #1 SMP Wed Jun 28 20:18:51 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@... haproxy-1.8.0]#
# cat haproxy.cfg
global
daemon
user haproxy
group haproxy
maxconn 100000
spread-checks 3
ssl-server-verify none
tune.ssl.default-dh-param 2048
defaults
log global
maxconn 20000
retries 3
timeout connect 1m
timeout client 2m
timeout server 2m
option redispatch
balance roundrobin
option redispatch
option tcpka
option tcplog
balance roundrobin
#option http-server-close
mode tcp
option dontlognull
log 127.0.0.1 local0 notice
log 127.0.0.1 local1 info
log 127.0.0.1 local2 err
listen stats
bind :8888
mode http
stats enable
stats enable
stats auth me:password
############ TCP BINDINGS ############
listen mfpool
mode tcp
option tcpka
option tcplog
bind *:11302
server stage.qa.example.com:11302 stage.qa.example.com check inter 2m fastinter 2s fall 2
setsockopt(4, SOL_TCP, TCP_DEFER_ACCEPT, [0], 4) = 0
bind(4, {sa_family=AF_INET, sin_port=htons(8888), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(4, SOL_SOCKET, SO_ACCEPTCONN, [0], [4]) = 0
listen(4, 20000) = 0
setsockopt(4, SOL_TCP, TCP_QUICKACK, [0], 4) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5
setsockopt(5, SOL_SOCKET, SO_RCVBUF, [0], 4) = 0
shutdown(5, 0 /* receive */) = -1 ENOTCONN (Transport endpoint is not connected)
sendmsg(5, {msg_name(16)={sa_family=AF_INET, sin_port=htons(514), sin_addr=inet_addr("127.0.0.1")}, msg_iov(8)=[{"<133>Dec 1 11:12:23 ", 21}, {"haproxy", 7}, {"[", 1}, {"8384", 4}, {"]: ", 3}, {"", 0\
}, {"Proxy stats started.", 20}, {"\n", 1}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 57
sendmsg(5, {msg_name(16)={sa_family=AF_INET, sin_port=htons(514), sin_addr=inet_addr("127.0.0.1")}, msg_iov(8)=[{"<141>Dec 1 11:12:23 ", 21}, {"haproxy", 7}, {"[", 1}, {"8384", 4}, {"]: ", 3}, {"", 0\
}, {"Proxy stats started.", 20}, {"\n", 1}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 57
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 6
fcntl(6, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
setsockopt(6, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
getsockopt(6, SOL_SOCKET, SO_LINGER, {onoff=0, linger=0}, [8]) = 0
setsockopt(6, SOL_SOCKET, SO_LINGER, {onoff=0, linger=0}, 8) = 0
setsockopt(6, SOL_SOCKET, 0xf /* SO_??? */, [1], 4) = -1 ENOPROTOOPT (Protocol not available)
setsockopt(6, SOL_TCP, TCP_DEFER_ACCEPT, [0], 4) = 0
bind(6, {sa_family=AF_INET, sin_port=htons(11302), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(6, SOL_SOCKET, SO_ACCEPTCONN, [0], [4]) = 0
listen(6, 20000) = 0
setsockopt(6, SOL_TCP, TCP_QUICKACK, [1], 4) = 0
sendmsg(5, {msg_name(16)={sa_family=AF_INET, sin_port=htons(514), sin_addr=inet_addr("127.0.0.1")}, msg_iov(8)=[{"<133>Dec 1 11:12:23 ", 21}, {"haproxy", 7}, {"[", 1}, {"8384", 4}, {"]: ", 3}, {"", 0\
}, {"Proxy mayfly started.", 21}, {"\n", 1}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 58
sendmsg(5, {msg_name(16)={sa_family=AF_INET, sin_port=htons(514), sin_addr=inet_addr("127.0.0.1")}, msg_iov(8)=[{"<141>Dec 1 11:12:23 ", 21}, {"haproxy", 7}, {"[", 1}, {"8384", 4}, {"]: ", 3}, {"", 0\
}, {"Proxy mayfly started.", 21}, {"\n", 1}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 58
rt_sigaction(SIGTTOU, {0x4d5b30, [TTOU], SA_RESTORER|SA_RESTART, 0x2b69fbfe7030}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTTIN, {0x4d5b30, [TTIN], SA_RESTORER|SA_RESTART, 0x2b69fbfe7030}, {SIG_DFL, [], 0}, 8) = 0
getgroups(0, NULL) = 4
setgroups(0, []) = 0
setgid(456) = 0
setuid(105) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=200013, rlim_max=200013}) = 0
gettimeofday({1512155543, 181293}, NULL) = 0
mmap(NULL, 802816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b69fcd00000
gettimeofday({1512155543, 181424}, NULL) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 4, {EPOLLIN|0x2000, {u32=4, u64=4}}) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|0x2000, {u32=6, u64=6}}) = 0
gettimeofday({1512155543, 181516}, NULL) = 0
epoll_wait(3, {}, 200, 0) = 0
gettimeofday({1512155543, 181567}, NULL) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment