Maybe the full backtrace is more helpful:
(gdb) bt full
#0 kill_mini_session (s=0x804269c00) at src/session.c:299
level = 6
conn = (struct connection *) 0x0
err_msg = <value optimized out>
#1 0x0000000000463928 in conn_session_complete (conn=0x8039f2a80) at
src/session.c:355
s = (struct session *) 0x804269c00
#2 0x0000000000432769 in conn_fd_handler (fd=<value optimized out>) at
src/connection.c:88
conn = <value optimized out>
flags = 41997063
#3 0x00000000004127db in fd_process_polled_events (fd=<value optimized
out>) at src/fd.c:271
new_updt = <value optimized out>
old_updt = 1
#4 0x000000000046ed85 in _do_poll (p=<value optimized out>, exp=<value
optimized out>)
at src/ev_kqueue.c:141
status = 1
count = 0
fd = <value optimized out>
delta_ms = <value optimized out>
timeout = {tv_sec = 0, tv_nsec = 27000000}
updt_idx = <value optimized out>
en = <value optimized out>
eo = <value optimized out>
changes = <value optimized out>
#5 0x0000000000405c87 in run_poll_loop () at src/haproxy.c:1309
next = -626888972
#6 0x0000000000408001 in main (argc=<value optimized out>,
argv=0x7fffffffdd00)
at src/haproxy.c:1633
px = (struct proxy *) 0x0
ret = <value optimized out>
proc = 3
err = <value optimized out>
retry = <value optimized out>
limit = {rlim_cur = 40017, rlim_max = 40017}
errmsg =
"\000\000\000\000\000\000\000\000?w\201\001\b\000\000\000\026\000\000\000\000\000\000\000?\001j\000\000\000\000\000\020+A\000\000\000\000\000\006\002\000\000\000\000\000\000?\001j\000\000\000\000\000
", '\0' <repeats 15 times>,
"h\205F\000\000\000\000\000p????????????\177\000\0008???"
pidfd = 0
Willy Tarreau wrote:
Hi John,
On Wed, May 07, 2014 at 10:54:33PM +0200, John-Paul Bader wrote:
Hmm yeah I noticed from what you wrote in the mail and by reading
through the patch - but still it confirmed that the shared pthread thing
was not available on FreeBSD right?
Yes that's it. Old freebsd code did not return an error for this, and
haproxy did not check this error. Newer freebsd code now does return
an error, but haproxy still didn't check. Emeric's patch introduced
the test for the feature. Note that older freebsd versions will still
pretend to work well but be broken, hence the proposal to remove
pthread by default since there's no reliable way of detecting its
support at runtime.
Would I also need to compile with USE_PRIVATE_CACHE=1 or would you patch
take care of that?
No you don't need it anymore.
When it uses the private cache, I would also have to change the
configuration to allow ssl sessions over multiple http requests right?
No you don't need to change anymore, what Emeric's patch does is to
reimplement a hand-crafted spinlock mechanism. I just ran a few tests
here and at 4.5k conn/s spread over 4 processes I see that the lock is
already held about 1% of the time, which is very low and does not justify
using a syscall to sleep.
I'm appending the two patches for you to test. They're to be applied on
top of latest master, but I think it will be OK on yours (provided you
don't already have previous patches from Emeric).
You don't need to pass any specific options to the Makefile, it defaults
to using this implementation.
Once you confirm that these ones fix your issue, I'll merge them.
Thanks!
Willy
--
John-Paul Bader | Software Development
www.wooga.com
wooga GmbH | Saarbruecker Str. 38 | D-10405 Berlin
Sitz der Gesellschaft: Berlin; HRB 117846 B
Registergericht Berlin-Charlottenburg
Geschaeftsfuehrung: Jens Begemann, Philipp Moeser