RE: HAPROXY in zLinux is presenting Segmentation fault

From: alexandre oliveira <alexandresumare#hotmail.com>
Date: Tue, 27 Oct 2009 15:41:55 +0000

Willy, I have gdb but I dont know how to use it. Could you say me how to invoke haproxy command using it?  

I have used the SIGQUIT signal. The result is as follow:

holb001:~/haproxy-1.3.22 # haproxy -f /etc/haproxy/haproxy.cfg -db 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.
Using sepoll() as the polling mechanism. Dumping pools usage.

I hope the information above helps you to identify whats going on.



Alexandre  

> Date: Sat, 24 Oct 2009 09:53:00 +0200
> From: w#1wt.eu
> To: alexandresumare#hotmail.com
> CC: haproxy#formilux.org
> Subject: Re: HAPROXY in zLinux is presenting Segmentation fault
>
> Hi alexandre,
>
> On Thu, Oct 22, 2009 at 01:52:05PM +0000, alexandre oliveira wrote:
> >
> > Willy, I did what you have suggested.
>
> thanks.
>
> (...)
> > holb001:~/haproxy-1.3.22 # haproxy -vv
> > HA-Proxy version 1.3.22 2009/10/14
> > Copyright 2000-2009 Willy Tarreau <w#1wt.eu>
> >
> > Build options :
> > TARGET = linux26
> > CPU = generic
> > CC = gcc
> > CFLAGS = -O2 -g
> > OPTIONS =
> >
> > Default settings :
> > maxconn = 2000, maxpollevents = 200
> >
> > 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.
>
> OK pretty much common.
>
> > holb001:~ # uname -a
> > Linux holb001 2.6.16.60-0.37_f594963d-default #1 SMP Mon Mar 23 13:39:48 UTC 2009 s390x s390x s390x GNU/Linux
>
> Less common ;-)
>
> (...)
> > # Ive started haproxy and did a test. The result is as follow:
> > holb001:~/haproxy-1.3.22 # haproxy -f /etc/haproxy/haproxy.cfg -db
> > 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.
> > Using sepoll() as the polling mechanism.
> > 00000000:uat.accept(0005)=0007 from [192.168.0.10:4047]
> > 00000001:uat.accept(0005)=0009 from [192.168.0.10:4048]
> > 00000002:uat.accept(0005)=000b from [192.168.0.10:4049]
> > 00000003:uat.accept(0005)=000d from [192.168.0.10:4050]
> > 00000004:uat.accept(0005)=000f from [192.168.0.10:4051]
> > 00000001:uat.srvcls[0009:000a]
> > 00000001:uat.clicls[0009:000a]
> > 00000001:uat.closed[0009:000a]
> > 00000000:uat.srvcls[0007:0008]
> > 00000000:uat.clicls[0007:0008]
> > 00000000:uat.closed[0007:0008]
> > Segmentation fault
>
> Pretty fast to die... I really don't like that at all, that makes
> me think about some uninitialized which has a visible effect on
> your arch only.
>
> > Remeber that this server is a zLinux, I mean, it runs under a mainframe.
>
> yes, but that's not an excuse for crashing. Do you have gdb on this
> machine ? Would it be possible then to run haproxy inside gdb and
> check where it dies, and with what variables, pointers, etc... ?
>
> > Suggestions?
>
> Oh yes I'm thinking about something. Could you send your process
> a SIGQUIT while it's waiting for a connection ? This will dump all
> the memory pools, and we'll see if some of them are merged. It is
> possible that some pointers are initialized and never overwritten
> on other archs, but reused on yours due to different structure sizes.
> This happened once already. So just do "killall -QUIT haproxy" and
> send the output. It should look like this :
>
> Dumping pools usage.
> - Pool pipe (16 bytes) : 0 allocated (0 bytes), 0 used, 2 users [SHARED]
> - Pool capture (64 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]
> - Pool task (80 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]
> - Pool hdr_idx (416 bytes) : 0 allocated (0 bytes), 0 used, 2 users [SHARED]
> - Pool session (816 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]
> - Pool requri (1024 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]
> - Pool buffer (32864 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]
> Total: 7 pools, 0 bytes allocated, 0 used.
>
> Thanks !
> Willy
>
>
                                               



Windows 7: It helps you do more. Explore Windows 7. http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen3:102009 --_27575b32-3f5c-4e26-b0aa-7033123ecd54_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
<html>
<head>
<style><!--

.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Willy, I have&nbsp;gdb but I dont know how to use it. Could you say me how to invoke haproxy command using it?<BR> &nbsp;<BR>
I have used the SIGQUIT signal. The result is as follow:<BR> holb001:~/haproxy-1.3.22 # haproxy -f /etc/haproxy/haproxy.cfg -db<BR>Available polling systems :<BR>&nbsp;&nbsp;&nbsp;&nbsp; sepoll : pref=400,&nbsp; test result OK<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; epoll : pref=300,&nbsp; test result OK<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; poll : pref=200,&nbsp; test result OK<BR>&nbsp;&nbsp;&nbsp;&nbsp; select : pref=150,&nbsp; test result OK<BR>Total: 4 (4 usable), will use sepoll.<BR>Using sepoll() as the polling mechanism.<BR>Dumping pools usage.<BR>&nbsp; - Pool pipe (32 bytes) : 0 allocated (0 bytes), 0 used, 2 users [SHARED]<BR>&nbsp; - Pool capture (64 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>&nbsp; - Pool task (144 bytes) : 2 allocated (288 bytes), 2 used, 1 users [SHARED]<BR>&nbsp; - Pool hdr_idx (832 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>&nbsp; - Pool requri (1024 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>&nbsp; - Pool session (1040 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>&nbsp; - Pool buffer (16512 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>Total: 7 pools, 288 bytes allocated, 288 used.<BR><BR> &nbsp;<BR>
I hope the information above helps you to identify whats going on.<BR>
<BR><BR>_______________________<BR>Alexandre<BR><BR><BR>&nbsp;<BR>&gt; Date: Sat, 24 Oct 2009 09:53:00 +0200<BR>&gt; From: w@1wt.eu<BR>&gt; To: alexandresumare@hotmail.com<BR>&gt; CC: haproxy@formilux.org<BR>&gt; Subject: Re: HAPROXY in zLinux is presenting Segmentation fault<BR>&gt; <BR>&gt; Hi alexandre,<BR>&gt; <BR>&gt; On Thu, Oct 22, 2009 at 01:52:05PM +0000, alexandre oliveira wrote:<BR>&gt; &gt; <BR>&gt; &gt; Willy, I did what you have suggested.<BR>&gt; <BR>&gt; thanks.<BR>&gt; <BR>&gt; (...)<BR>&gt; &gt; holb001:~/haproxy-1.3.22 # haproxy -vv<BR>&gt; &gt; HA-Proxy version 1.3.22 2009/10/14<BR>&gt; &gt; Copyright 2000-2009 Willy Tarreau &lt;w@1wt.eu&gt;<BR>&gt; &gt; <BR>&gt; &gt; Build options :<BR>&gt; &gt; TARGET = linux26<BR>&gt; &gt; CPU = generic<BR>&gt; &gt; CC = gcc<BR>&gt; &gt; CFLAGS = -O2 -g<BR>&gt; &gt; OPTIONS =<BR>&gt; &gt; <BR>&gt; &gt; Default settings :<BR>&gt; &gt; maxconn = 2000, maxpollevents = 200<BR>&gt; &gt; <BR>&gt; &gt; Available polling systems :<BR>&gt; &gt; sepoll : pref=400, test result OK<BR>&gt; &gt; epoll : pref=300, test result OK<BR>&gt; &gt; poll : pref=200, test result OK<BR>&gt; &gt; select : pref=150, test result OK<BR>&gt; &gt; Total: 4 (4 usable), will use sepoll.<BR>&gt; <BR>&gt; OK pretty much common.<BR>&gt; <BR>&gt; &gt; holb001:~ # uname -a<BR>&gt; &gt; Linux holb001 2.6.16.60-0.37_f594963d-default #1 SMP Mon Mar 23 13:39:48 UTC 2009 s390x s390x s390x GNU/Linux<BR>&gt; <BR>&gt; Less common ;-)<BR>&gt; <BR>&gt; (...)<BR>&gt; &gt; # Ive started haproxy and did a test. The result is as follow:<BR>&gt; &gt; holb001:~/haproxy-1.3.22 # haproxy -f /etc/haproxy/haproxy.cfg -db<BR>&gt; &gt; Available polling systems :<BR>&gt; &gt; sepoll : pref=400, test result OK<BR>&gt; &gt; epoll : pref=300, test result OK<BR>&gt; &gt; poll : pref=200, test result OK<BR>&gt; &gt; select : pref=150, test result OK<BR>&gt; &gt; Total: 4 (4 usable), will use sepoll.<BR>&gt; &gt; Using sepoll() as the polling mechanism.<BR>&gt; &gt; 00000000:uat.accept(0005)=0007 from [192.168.0.10:4047]<BR>&gt; &gt; 00000001:uat.accept(0005)=0009 from [192.168.0.10:4048]<BR>&gt; &gt; 00000002:uat.accept(0005)=000b from [192.168.0.10:4049]<BR>&gt; &gt; 00000003:uat.accept(0005)=000d from [192.168.0.10:4050]<BR>&gt; &gt; 00000004:uat.accept(0005)=000f from [192.168.0.10:4051]<BR>&gt; &gt; 00000001:uat.srvcls[0009:000a]<BR>&gt; &gt; 00000001:uat.clicls[0009:000a]<BR>&gt; &gt; 00000001:uat.closed[0009:000a]<BR>&gt; &gt; 00000000:uat.srvcls[0007:0008]<BR>&gt; &gt; 00000000:uat.clicls[0007:0008]<BR>&gt; &gt; 00000000:uat.closed[0007:0008]<BR>&gt; &gt; Segmentation fault<BR>&gt; <BR>&gt; Pretty fast to die... I really don't like that at all, that makes<BR>&gt; me think about some uninitialized which has a visible effect on<BR>&gt; your arch only.<BR>&gt; <BR>&gt; &gt; Remeber that this server is a zLinux, I mean, it runs under a mainframe.<BR>&gt; <BR>&gt; yes, but that's not an excuse for crashing. Do you have gdb on this<BR>&gt; machine ? Would it be possible then to run haproxy inside gdb and<BR>&gt; check where it dies, and with what variables, pointers, etc... ?<BR>&gt; <BR>&gt; &gt; Suggestions?<BR>&gt; <BR>&gt; Oh yes I'm thinking about something. Could you send your process<BR>&gt; a SIGQUIT while it's waiting for a connection ? This will dump all<BR>&gt; the memory pools, and we'll see if some of them are merged. It is<BR>&gt; possible that some pointers are initialized and never overwritten<BR>&gt; on other archs, but reused on yours due to different structure sizes.<BR>&gt; This happened once already. So just do "killall -QUIT haproxy" and<BR>&gt; send the output. It should look like this :<BR>&gt; <BR>&gt; Dumping pools usage.<BR>&gt; - Pool pipe (16 bytes) : 0 allocated (0 bytes), 0 used, 2 users [SHARED]<BR>&gt; - Pool capture (64 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>&gt; - Pool task (80 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>&gt; - Pool hdr_idx (416 bytes) : 0 allocated (0 bytes), 0 used, 2 users [SHARED]<BR>&gt; - Pool session (816 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>&gt; - Pool requri (1024 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>&gt; - Pool buffer (32864 bytes) : 0 allocated (0 bytes), 0 used, 1 users [SHARED]<BR>&gt; Total: 7 pools, 0 bytes allocated, 0 used.<BR>&gt; <BR>&gt; Thanks !<BR>&gt; Willy<BR>&gt; <BR>&gt; <BR> 		 	   		  <br /><hr />Windows 7: It helps you do more. <a href='http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen3:102009' target='_new'>Explore Windows 7.</a></body>
</html>
--_27575b32-3f5c-4e26-b0aa-7033123ecd54_-- Received on 2009/10/27 16:41

This archive was generated by hypermail 2.2.0 : 2009/10/27 16:45 CET