Re: Core dump when trying to reload haproxy

From: Anders Nordby <anders#FreeBSD.org>
Date: Tue, 11 Nov 2008 16:26:25 +0100


Hi,

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/libc.so.6
#1 0x28152e68 in raise () from /lib/libc.so.6
#2 0x28151b78 in abort () from /lib/libc.so.6
#3 0x280eefdb in _UTF8_init () from /lib/libc.so.6
#4 0xbf7feda8 in ?? ()
#5 0x28158dd3 in sys_nsig () from /lib/libc.so.6
#6 0x28158cd3 in sys_nsig () from /lib/libc.so.6
#7 0x28158d30 in sys_nsig () from /lib/libc.so.6
#8 0x00000000 in ?? ()
#9 0x28163d80 in ?? () from /lib/libc.so.6
#10 0xbf7feb08 in ?? ()
#11 0x280ef009 in _UTF8_init () from /lib/libc.so.6
#12 0x28163d80 in ?? () from /lib/libc.so.6
#13 0x28179a24 in _nsyyin () from /lib/libc.so.6
#14 0xbf7febb8 in ?? ()
#15 0x280efd69 in _UTF8_init () from /lib/libc.so.6
#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/libc.so.6...done. Loaded symbols for /lib/libc.so.6
Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1
0x2810cde3 in poll () from /lib/libc.so.6 (gdb) cont
Continuing.

Program received signal SIGUSR1, User defined signal 1. 0x2810cde3 in poll () from /lib/libc.so.6 (gdb) bt
#0 0x2810cde3 in poll () from /lib/libc.so.6
#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..

Cheers,

-- 
Anders.
Received on 2008/11/11 16:26

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