Re: Segfault when parsing a configuration file
❦ 11 juillet 2015 14:20 +0200, Lukas Tribus luky...@hotmail.com : Thanks for the detailed repro. This bug is fixed in release 1.5.10 by commit ed061c0590 (BUG/MEDIUM: config: do not propagate processes between stopped processes) [1]. Quoting from the commit: Immo Goltz reported a case of segfault while parsing the config where we try to propagate processes across stopped frontends (those with a disabled statement). The fix is trivial. The workaround consists in commenting out these frontends, although not always easy. You can get latest haproxy build for debian here [2]. Maybe Vincent could queue this fix for a debian backport? Yes, we'll do that. -- Let me take you a button-hole lower. -- William Shakespeare, Love's Labour's Lost signature.asc Description: PGP signature
Segfault when parsing a configuration file
Hello, we have a server with some config running an old version (1.4.25-1) of haproxy under Debian wheezy. The reason we've not updated it is that any new versions we had access to would crash. Today I was able to pinpoint where the problem lies: # haproxy -c -f /etc/haproxy/haproxy2.cfg Segmentation fault # haproxy -v HA-Proxy version 1.5.8 2014/10/31 Copyright 2000-2014 Willy Tarreau w...@1wt.eu # cat /etc/haproxy/haproxy2.cfg frontend public0 disabled #-varnish bind192.168.1.1:80 option httplog option forwardfor option httpclose default_backend farm0 That config file is derived from the original config file (which worked with older haproxy versions (=1.4.25)) by removing stuff from it and by replacing the IP address. Here's the stack trace: # gdb --args haproxy -c -f /etc/haproxy/haproxy2.cfg GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /tmp/foobar/testing/haproxy...Reading symbols from /usr/lib/debug/.build-id/32/cd7a1f9e2b30828b4186f93499ffe651d7ee20.debug...done. done. (gdb) run Starting program: /usr/sbin/haproxy -c -f /etc/haproxy/haproxy2.cfg Program received signal SIGSEGV, Segmentation fault. 0x004238b8 in propagate_processes (from=from@entry=0x6d68d0, to=0x0) at src/cfgparse.c:6021 6021src/cfgparse.c: No such file or directory. (gdb) backtrace #0 propagate_processes (from=from@entry=0x6e37e0, to=0x0) at src/cfgparse.c:5989 #1 0x004238bd in propagate_processes (from=from@entry=0x6e37e0, to=optimized out) at src/cfgparse.c:6021 #2 0x004238bd in propagate_processes (from=from@entry=0x6e37e0, to=optimized out) at src/cfgparse.c:6021 [...etc...] #262034 0x004238bd in propagate_processes (from=from@entry=0x6e37e0, to=optimized out) at src/cfgparse.c:6021 #262035 0x004238bd in propagate_processes (from=0x6e37e0, from@entry=0x6da0d0, to=optimized out) at src/cfgparse.c:6021 #262036 0x0042388a in propagate_processes (from=from@entry=0x6da0d0, to=to@entry=0x0) at src/cfgparse.c:6014 #262037 0x0042504d in check_config_validity () at src/cfgparse.c:7122 #262038 0x00408e9c in init (argc=optimized out, argv=optimized out, argv@entry=0x7fffe628) at src/haproxy.c:713 #262039 0x0040746c in main (argc=optimized out, argv=0x7fffe628) at src/haproxy.c:1355
RE: Segfault when parsing a configuration file
Hi Tomas, Hello, we have a server with some config running an old version (1.4.25-1) of haproxy under Debian wheezy. The reason we've not updated it is that any new versions we had access to would crash. Today I was able to pinpoint where the problem lies: Thanks for the detailed repro. This bug is fixed in release 1.5.10 by commit ed061c0590 (BUG/MEDIUM: config: do not propagate processes between stopped processes) [1]. Quoting from the commit: Immo Goltz reported a case of segfault while parsing the config where we try to propagate processes across stopped frontends (those with a disabled statement). The fix is trivial. The workaround consists in commenting out these frontends, although not always easy. You can get latest haproxy build for debian here [2]. Maybe Vincent could queue this fix for a debian backport? Regards, Lukas [1] http://git.haproxy.org/?p=haproxy-1.5.git;a=commit;h=ed061c0590109dde6cd77cd963bebc46ba0cd0cc [2] http://haproxy.debian.net/
Re: Segfault when parsing a configuration file
Thanks a lot for the reply, explanations and infos Lukas! I've also reported the bug to the Debian BTS [1], in order for the bug to be findable for others and to follow (useful) process. *t [1] http://bugs.debian.org/792116 Am 11.07.2015 um 14:20 schrieb Lukas Tribus: Hi Tomas, Hello, we have a server with some config running an old version (1.4.25-1) of haproxy under Debian wheezy. The reason we've not updated it is that any new versions we had access to would crash. Today I was able to pinpoint where the problem lies: Thanks for the detailed repro. This bug is fixed in release 1.5.10 by commit ed061c0590 (BUG/MEDIUM: config: do not propagate processes between stopped processes) [1]. Quoting from the commit: Immo Goltz reported a case of segfault while parsing the config where we try to propagate processes across stopped frontends (those with a disabled statement). The fix is trivial. The workaround consists in commenting out these frontends, although not always easy. You can get latest haproxy build for debian here [2]. Maybe Vincent could queue this fix for a debian backport? Regards, Lukas [1] http://git.haproxy.org/?p=haproxy-1.5.git;a=commit;h=ed061c0590109dde6cd77cd963bebc46ba0cd0cc [2] http://haproxy.debian.net/