Hey,

so I have downloaded the haproxy-ss-Latest from the website and applied your patches. I have compiled it with:

make TARGET=freebsd USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1

It ran very good for 2 hours but then 6 out of 12 processes coredumped, this time however in the haproxy code realm and apparently session related:

The GDB Backtrace:

#0  kill_mini_session (s=0x804269c00) at src/session.c:299
299                     if (!conn->err_code && (s->task->state & 
TASK_WOKEN_TIMER)) {
[New Thread 802007400 (LWP 101872/<unknown>)]
[New LWP 101994]
(gdb) bt
#0  kill_mini_session (s=0x804269c00) at src/session.c:299
#1 0x0000000000463928 in conn_session_complete (conn=0x8039f2a80) at src/session.c:355 #2 0x0000000000432769 in conn_fd_handler (fd=<value optimized out>) at src/connection.c:88 #3 0x00000000004127db in fd_process_polled_events (fd=<value optimized out>) at src/fd.c:271 #4 0x000000000046ed85 in _do_poll (p=<value optimized out>, exp=<value optimized out>)
    at src/ev_kqueue.c:141
#5  0x0000000000405c87 in run_poll_loop () at src/haproxy.c:1309
#6 0x0000000000408001 in main (argc=<value optimized out>, argv=0x7fffffffdd00)
    at src/haproxy.c:1633


I'm running with kqueue and nbproc=12,
option http-server-close
and
timeout http-keep-alive 5000

Kind regards,

John

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

Reply via email to