Hi Kevin,

On Fri, Oct 11, 2013 at 07:39:32PM -0500, Kevin wrote:
> My initial builds were done using HomeBrew for both 1.4.24 and 1.5dev19. 
> 
> It is configured with the following arguments to make:
> TARGET=generic USE_KQUEUE=1 USE_POLL=1 USE_PCRE=1
> 
> The 1.5dev19 settings add to those:
> USE_OPENSSL=1 USE_ZLIB=1 ADDLIB=-lcrypto
> 
> When I did my test compiles I duplicated those parameters. I read that
> somewhere that the OSX makefile didn?t work so I didn?t spend any time trying
> it since it seemed the homebrew options worked fine with 1.4.24 in my
> testing.

OK.

> Here is the -vv output from the currently working version.
> 
> HA-Proxy version 1.5-dev19 2013/06/17
> Copyright 2000-2013 Willy Tarreau <[email protected]>
> 
> Build options :
>   TARGET  = generic
>   CPU     = generic
>   CC      = gcc
>   CFLAGS  = -O2 -g -fno-strict-aliasing
>   OPTIONS = USE_ZLIB=1 USE_POLL=1 USE_KQUEUE=1 USE_OPENSSL=1
> 
> Default settings :
>   maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200
> 
> Encrypted password support via crypt(3): no
> Built with zlib version : 1.2.5
> Compression algorithms supported : identity, deflate, gzip
> Built with OpenSSL version : OpenSSL 0.9.8y 5 Feb 2013
> Running on OpenSSL version : OpenSSL 0.9.8y 5 Feb 2013
> OpenSSL library supports TLS extensions : yes
> OpenSSL library supports SNI : yes
> OpenSSL library supports prefer-server-ciphers : yes
> Built without PCRE support (using libc's regex instead)
> 
> Available polling systems :
>      kqueue : pref=300,  test result OK
>        poll : pref=200,  test result OK
>      select : pref=150,  test result OK
> Total: 3 (3 usable), will use queue.
> 
> 
> Here is the -vv from the originally compiled version that exhibits the bug.
> 
> HA-Proxy version 1.5-dev19 2013/06/17
> Copyright 2000-2013 Willy Tarreau <[email protected]>
> 
> Build options :
>   TARGET  = generic
>   CPU     = generic
>   CC      = cc
>   CFLAGS  = 
>   OPTIONS = USE_ZLIB=1 USE_POLL=1 USE_KQUEUE=1 USE_OPENSSL=1 USE_PCRE=1
> 
> Default settings :
>   maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200
> 
> Encrypted password support via crypt(3): no
> Built with zlib version : 1.2.5
> Compression algorithms supported : identity, deflate, gzip
> Built with OpenSSL version : OpenSSL 0.9.8r 8 Feb 2011
> Running on OpenSSL version : OpenSSL 0.9.8y 5 Feb 2013
> OpenSSL library supports TLS extensions : yes
> OpenSSL library supports SNI : yes
> OpenSSL library supports prefer-server-ciphers : yes
> Built with PCRE version : 8.33 2013-05-28
> PCRE library supports JIT : no (USE_PCRE_JIT not set)
> 
> Available polling systems :
>      kqueue : pref=300,  test result OK
>        poll : pref=200,  test result OK
>      select : pref=150,  test result OK
> Total: 3 (3 usable), will use kqueue.

So everything is normal but it crashes. At this time, I'm inclined to
believe the following causes in order of most to least likely :

  - bug in libpcre 8.33

  - bug in how haproxy uses libpcre which is revealed by 8.33

  - general bug in haproxy that is revealed on your platform when pcre
    is used

For last point, you could attempt something, run haproxy with the -dM
argument. It enables memory poisonning which consists in filling all
structures with a byte before using them. This immediately catches
pointers that are dereferenced before being initialized. You may want
to test with and without libpcre. Maybe it will crash from the very
first request when using libpcre now, proving there is something wrong
in our code.

Thanks,
Willy


Reply via email to