I found a way that causes the 1.4.10 (and probably 1.4.11) releases to
crash with a segfault.  The message in /var/log/messages is

Mar  3 12:44:34 host kernel: haproxy[16392]: segfault at
0000000000000000 rip 0000000000000000 rsp 00007fff7402a9d8 error 14



host:~$ /usr/sbin/haproxy -vv
HA-Proxy version 1.4.10 2010/11/28
Copyright 2000-2010 Willy Tarreau <[email protected]>

Build options :
  TARGET  = linux26
  CPU     = generic
  CC      = gcc
  CFLAGS  = -O2 -g -fno-strict-aliasing
  OPTIONS = USE_LINUX_TPROXY=1 USE_REGPARM=1 USE_PCRE=1

Default settings :
  maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200

Encrypted password support via crypt(3): yes

Available polling systems :
     sepoll : pref=400,  test result OK
      epoll : pref=300,  test result OK
       poll : pref=200,  test result OK
     select : pref=150,  test result OK
Total: 4 (4 usable), will use sepoll.



The segfault occurs if a server in disabled backend is put into
maintenance mode using the socket.

For example:

backend foo
        disabled
        server 1.2.3.4 1.2.3.4
        server 1.2.3.5 1.2.3.5


$> echo "disable server foo/1.2.3.4" | socat stdio /var/lib/haproxy/stats


Unfortunately I had a script that would disable a particular server
for all backends the server was in.  The script didn't check that a
backend wasn't already disabled and so crashed a production server.
I've been able to reproduce this on other instances so I don't think
it was a one-time coincidence.


-Bryan

Reply via email to