Re: Core dump when trying to reload haproxy

From: Anders Nordby <>
Date: Tue, 11 Nov 2008 16:26:25 +0100


On Tue, Nov 11, 2008 at 12:11:14PM +0100, Willy Tarreau wrote:

>>> If you can confirm your version, I can work on a patch which I will ask
>>> you to try.
>> Cool, I'll check it out when you have something.
> Fine, let's try the attached patch.

I tried it on FreeBSD 6.2. It does not help, I get a core-dump still. Backtrace from haproxy.core with your patch applied:

(gdb) bt
#0 0x28152ecb in kill () from /lib/
#1 0x28152e68 in raise () from /lib/
#2 0x28151b78 in abort () from /lib/
#3 0x280eefdb in _UTF8_init () from /lib/
#4 0xbf7feda8 in ?? ()
#5 0x28158dd3 in sys_nsig () from /lib/
#6 0x28158cd3 in sys_nsig () from /lib/
#7 0x28158d30 in sys_nsig () from /lib/
#8 0x00000000 in ?? ()
#9 0x28163d80 in ?? () from /lib/
#10 0xbf7feb08 in ?? ()
#11 0x280ef009 in _UTF8_init () from /lib/
#12 0x28163d80 in ?? () from /lib/
#13 0x28179a24 in _nsyyin () from /lib/
#14 0xbf7febb8 in ?? ()
#15 0x280efd69 in _UTF8_init () from /lib/
#16 0x00000000 in ?? ()
#17 0x00000007 in ?? ()
#18 0xbf7fecd8 in ?? ()
#19 0x0804ad5b in fd_delete (fd=672546176) at haproxy.c:1798
Previous frame inner to this frame (corrupt stack?)

If I try to attach gdb to the running process (it is the process that ran before the -sf command was run that core-dumps), the backtrace is completely different:

# gdb /usr/local/sbin/haproxy 49746

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"... Attaching to program: /usr/local/sbin/haproxy, process 49746 Reading symbols from /lib/ Loaded symbols for /lib/
Reading symbols from /libexec/ Loaded symbols for /libexec/
0x2810cde3 in poll () from /lib/ (gdb) cont

Program received signal SIGUSR1, User defined signal 1. 0x2810cde3 in poll () from /lib/ (gdb) bt
#0 0x2810cde3 in poll () from /lib/
#1 0x0805723a in poll_loop (action=1) at haproxy.c:7319
#2 0x0805f7c4 in main (argc=7, argv=0xbf7feca4) at haproxy.c:10521

The -sf command does indeed restart haproxy OK. It's just that the process that should exit, instead core-dumps..


Received on 2008/11/11 16:26

This archive was generated by hypermail 2.2.0 : 2008/11/11 16:31 CET