Le 13/05/2016 22:14, Cyril Bonté a écrit :
Hi all,

Le 13/05/2016 21:24, Willy Tarreau a écrit :
On Fri, May 13, 2016 at 10:09:04PM +0300, Arthur ??i??eic?? wrote:
I will attach 2 traces, for 1.6.4 and for 1.6.5.

So indeed in your traces, we see that 1.6.5 does bind(port=443,
addr=0.0.0.0)
while 1.6.4 has the correct address. At this point your kernel is
innocent.
I don't see what could cause this in haproxy and I can't reproduce it.
Thus
I'd really favor the switch to gcc 6 as a primary cause. I fear that
we'll
discover something not fun...

I've just installed gcc 6 and compiled haproxy with it and can confirm I
observe the same issue. Now, I'll try to investigate why.

At this point, I have an issue in the function str2listener() [cfgparse.c]

In the port loop :
  for (; port <= end; port++) {
    [...]
    if (l->addr.ss_family == AF_INET) {
      [...]
Here, if I print the content of :
  ((struct sockaddr_in *)(&l->addr))->sin_addr.s_addr [1]
I obtain 0 while I specified a "bind 127.0.0.1:10001".

But if first, I print the content of :
  ((struct sockaddr_in *)(&ss))->sin_addr.s_addr [2]
Both [1] and [2] will have the right value.

Once I compile with -O0, the issue disappears.
I also don't have the issue if I replace :
  ss = *ss2;
with :
  memcpy(&ss, ss2, sizeof(struct sockaddr_storage));


--
Cyril Bonté

Reply via email to