Hi, all

Haproxy of latest snapshot will crash while initializing compression
under such configuration:

global
    ...
    tune.zlib.memlevel 6
    tune.zlib.windowsize 8
frontend
    ...
    compression algo gzip deflate
    ...

The coredump information as below:

Core was generated by `./haproxy -f h.cfg -d'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000360e4066d3 in deflateReset () from /lib64/libz.so.1
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.47.el6.x86_64 keyutils-libs-1.4-4.el6.x86_64
krb5-libs-1.9-33.el6_3.3.x86_64 libcom_err-1.41.12-12.el6.x86_64
libselinux-2.0.94-5.3.el6.x86_64 nss-softokn-freebl-3.12.9-11.el6.x86_64
openssl-1.0.0-25.el6_3.1.x86_64 zlib-1.2.3-27.el6.x86_64
(gdb) bt
#0  0x000000360e4066d3 in deflateReset () from /lib64/libz.so.1
#1  0x000000360e406aa4 in deflateInit_ () from /lib64/libz.so.1
#2  0x0000000000460d63 in deflate_init (comp_ctx=0x7fffe3b7b728,
level=9) at src/compression.c:524
#3  0x000000000041c8d8 in cfg_parse_listen (file=0x7fffe3b7d35d "h.cfg",
linenum=27, args=0x7fffe3b7bfd0, kwm=<value optimized out>)
    at src/cfgparse.c:5560
#4  0x000000000041f418 in readcfgfile (file=0x7fffe3b7d35d "h.cfg") at
src/cfgparse.c:5987
#5  0x0000000000405736 in init (argc=<value optimized out>, argv=<value
optimized out>) at src/haproxy.c:646
#6  0x0000000000406c49 in main (argc=<value optimized out>,
argv=0x7fffe3b7c4b8) at src/haproxy.c:1287
(gdb) quit


Linenum 27 of cofiguration file is the compression algo config:
   compression algo gzip deflate

There will be no crash if I use the following configuration:
   compression algo deflate gzip
The only difference is to change the order of gzip and deflate.

Ther will be no crash either if set tune.zlib.windowsize to default
value 15 just keeping the algo order 'gzip deflate'.

Zlib version is zlib-1.2.3.

Best Regards,
Godbach



Reply via email to