On 07/12/2017 07:41 μμ, Willy Tarreau wrote:
> Hi Pavlos!
> 
> On Thu, Dec 07, 2017 at 07:16:54PM +0100, Pavlos Parissis wrote:
>> Hi,
>>
>> OK, I haven't read the ML for ~2 weeks and a quick scan didn't reveal 
>> anything.
>> So, here I am asking something that may have been addressed already.
>>
>> Today, I decided to switch my dev env to haproxy-1.8 using current master 
>> and I
>> started haproxy in the same way as I have been doing with older releases:
>>
>> sudo ./haproxy -f /etc/haproxy/haproxy-ams4-dc.cfg
>> [WARNING] 340/173007 (3104) : parsing [/etc/haproxy/haproxy-ams4-dc.cfg:103] 
>> : a
>> 'http-request' rule placed after a 'use_backend' rule will still be 
>> processed before.
>>
>> above it didn't return and wasn't printing, expect the warning. I curled 
>> against
>> the IPs and got back connection error, see attached file for process output, 
>> lsof
>> info, build verion and haproxy.cfg.
>>
>> I also started in the way it is mentioned in section 3 of management 
>> document:
>> sudo ./haproxy  -f /etc/haproxy/haproxy-ams4-dc.cfg -D -p 
>> /run/haproxy-ams4.pid
>> -sf $(cat /run/haproxy-ams4.pid)
>> cat: /run/haproxy-ams4.pid: No such file or directory
>> [WARNING] 340/173007 (3104) : parsing [/etc/haproxy/haproxy-ams4-dc.cfg:103] 
>> : a
>> 'http-request' rule placed after a 'use_backend' rule will still be 
>> processed before.
>>
>> but same result, haproxy didn't return and I had to CTRL-C it.
>>
>> I am pretty sure I am doing something stupid but I can't find it.
>>
>> Any ideas?
> 
> It looks like it doesn't finish to startup in fact. Are you seeing it spin
> on the CPU maybe ?

Yes, it does. I am sorry but I didn't notice it

> Otherwise probably that starting it by hand in gdb and
> stopping it to see what it's doing will help.
>


pparissis at poseidonas in ~/repo/haproxy-1.8 on (master u=)
sudo gdb ./haproxy
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./haproxy...done.
(gdb) run -f /etc/haproxy/haproxy-ams4-dc.cfg
Starting program: /home/pparissis/repo/haproxy-1.8/haproxy -f
/etc/haproxy/haproxy-ams4-dc.cfg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[WARNING] 340/221611 (13628) : parsing [/etc/haproxy/haproxy-ams4-dc.cfg:103] : 
a
'http-request' rule placed after a 'use_backend' rule will still be processed 
before.
^C
Program received signal SIGINT, Interrupt.
0x000055555562e302 in register_name (name=0x5555558ee294 "selected_dc_backup",
len=18, scope=scope@entry=0x7fffffffd83c,
    alloc=alloc@entry=1, err=0x7fffffffdb28) at src/vars.c:215
215                     HA_RWLOCK_WRLOCK(VARS_LOCK, &var_names_rwlock);
(gdb) bt full
#0  0x000055555562e302 in register_name (name=0x5555558ee294 
"selected_dc_backup",
len=18, scope=scope@entry=0x7fffffffd83c,
    alloc=alloc@entry=1, err=0x7fffffffdb28) at src/vars.c:215
        i = <optimized out>
        var_names2 = <optimized out>
        tmp = <optimized out>
        res = 0x0
#1  0x000055555562f489 in vars_check_arg (arg=0x5555558ee600, err=<optimized 
out>)
at src/vars.c:502
        name = <optimized out>
        scope = SCOPE_REQ
        err = <optimized out>
        arg = 0x5555558ee600
#2  0x0000555555609b94 in sample_parse_expr (str=str@entry=0x5555558ee598,
idx=idx@entry=0x7fffffffd964,
    file=file@entry=0x5555558df420 "/etc/haproxy/haproxy-ams4-dc.cfg",
line=line@entry=106, err_msg=err_msg@entry=0x7fffffffdb28,
    al=al@entry=0x5555558e85d8) at src/sample.c:901
        begw = <optimized out>
        endw = 0x5555558df4c2 "req.selected_dc_backup)"
        endt = 0x5555558df4d8 ")"
        expr = 0x5555558ee5c0
        fetch = 0x5555558ade30 <sample_fetch_keywords+16>
        conv = <optimized out>
        prev_type = 6
        fkw = 0x5555558ee2f0 "var"
        ckw = 0x0
        err_arg = 1
#3  0x0000555555630144 in parse_acl_expr (args=args@entry=0x5555558ee598,
err=err@entry=0x7fffffffdb28, al=al@entry=0x5555558e85d8,
    file=file@entry=0x5555558df420 "/etc/haproxy/haproxy-ams4-dc.cfg", line=106)
at src/acl.c:351
        expr = <optimized out>
        aclkw = 0x0
        refflags = <optimized out>
        patflags = <optimized out>
        arg = <optimized out>
        smp = 0x0
        idx = 0
        ckw = 0x0
        begw = <optimized out>
        endw = <optimized out>
        endt = <optimized out>
        cur_type = <optimized out>
        nbargs = <optimized out>
        operator = 2
        op = <optimized out>
        contain_colon = <optimized out>
        have_dot = <optimized out>
        dot = <optimized out>
        value = 3
        minor = 40
        buffer = "\000\000\000\000\000\000\000\000\003\000\000\000\060", '\000'
<repeats 19 times>, "[\000\000\000n\000\000\000\000"
        is_loaded = <optimized out>
        unique_id = <optimized out>
        error = 0x50 <error: Cannot access memory at address 0x50>
        ref = <optimized out>
        pattern_expr = <optimized out>
        load_as_map = 0
        acl_conv_found = 0
#4  0x0000555555630e50 in parse_acl (args=args@entry=0x5555558ee590,
known_acl=known_acl@entry=0x5555558e6de8,
    err=err@entry=0x7fffffffdb28, al=al@entry=0x5555558e85d8,
file=file@entry=0x5555558df420 "/etc/haproxy/haproxy-ams4-dc.cfg",
    line=line@entry=106) at src/acl.c:725
        cur_acl = <optimized out>
        acl_expr = <optimized out>
        name = <optimized out>
        pos = <optimized out>
#5  0x0000555555631293 in parse_acl_cond (args=0x7fffffffdc68,
known_acl=0x5555558e6de8, pol=<optimized out>,
    err=err@entry=0x7fffffffdb28, al=al@entry=0x5555558e85d8,
file=file@entry=0x5555558df420 "/etc/haproxy/haproxy-ams4-dc.cfg",
    line=106) at src/acl.c:976
        arg_end = 6
        args_new = 0x5555558ee590
        arg = <optimized out>
        neg = 0
        word = <optimized out>
        cur_acl = <optimized out>
        cur_term = <optimized out>
        cur_suite = 0x5555558ee450
        cond = 0x5555558ee400
        suite_val = 524287
#6  0x0000555555631611 in build_acl_cond (file=file@entry=0x5555558df420
"/etc/haproxy/haproxy-ams4-dc.cfg", line=line@entry=106,
    known_acl=<optimized out>, px=0x5555558e6db0, args=<optimized out>,
args@entry=0x7fffffffdc60, err=err@entry=0x7fffffffdb28)
    at src/acl.c:1079
        pol = <optimized out>
        cond = 0x0
#7  0x00005555555a5351 in cfg_parse_listen (file=0x5555558df420
"/etc/haproxy/haproxy-ams4-dc.cfg", linenum=106,
    args=0x7fffffffdc50, kwm=<optimized out>) at src/cfgparse.c:3969
        rule = <optimized out>
        curproxy = 0x5555558e6db0
        err = <optimized out>
        error = 0x5555558dfc60 "\210$\255\373\377\177"
        rc = 0
        val = 0
        err_code = 0
        cond = 0x0
        tmplogsrv = <optimized out>
        errmsg = 0x0
#8  0x00005555555ad153 in readcfgfile (file=0x5555558df420
"/etc/haproxy/haproxy-ams4-dc.cfg") at src/cfgparse.c:7431
        kwm = <optimized out>
        end = <optimized out>
        line = <optimized out>
        dquote = <optimized out>
        arg = <optimized out>
        args = {0x5555558df454 "use_backend", 0x5555558df460
"www.booking.com_http_lhr4", 0x5555558df47a "if",
          0x5555558df47d "www.booking.com_http_ams4_down", 0x5555558df49c
"!www.booking.com_http_lhr4_down", 0x5555558df4bc "{",
          0x5555558df4be "var(req.selected_dc_backup)", 0x5555558df4da "eq",
0x5555558df4dd "0", 0x5555558df4df "}",
          0x5555558df4e0 "" <repeats 55 times>}
        squote = <optimized out>
        thisline = 0x5555558df450 "    use_backend"
        linesize = 2048
        f = 0x5555558dfc60
        linenum = <optimized out>
        err_code = 1
        cs = 0x5555558d2540
        pcs = 0x5555558d2540
        ics = <optimized out>
        readbytes = <optimized out>
#9  0x00005555555f056d in init (argc=<optimized out>, argv=<optimized out>) at
src/haproxy.c:1503
        ret = <optimized out>
        arg_mode = <optimized out>
        tmp = <optimized out>
        cfg_pidfile = <optimized out>
        err_code = 0
        err_msg = 0x0
        wl = 0x5555558df400
        progname = 0x7fffffffe4e1 "haproxy"
        change_dir = <optimized out>
        px = <optimized out>
        pcf = <optimized out>
#10 0x000055555556ddab in main (argc=<optimized out>, argv=0x7fffffffe278) at
src/haproxy.c:2448
---Type <return> to continue, or q <return> to quit---
        err = <optimized out>
        retry = <optimized out>
        limit = {rlim_cur = 140737488347800, rlim_max = 140737488347768}
        errmsg = 
"\002\000\000\000\000\000\000\000\003\000\000\000\062\000\000\000
\000\000\000\000\000\000\000P", '\000' <repeats 15 times>, 
"\003\000\000\000\060",
'\000' <repeats 19 times>, "[\000\000\000n", '\000' <repeats 19 times>,
"w\000\000\000|\000\000\000p/\000"
        pidfd = -1
(gdb)
(gdb)

I hope it uses useful,
Pavlos

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to