Just for information, If someone is working on this bug, I think
that I found the origin of the crash. I check impact and the
validity of the patch, and them I submit a patch

Thierry

> On 25 Jun 2018, at 11:07, Thierry Fournier <[email protected]> 
> wrote:
> 
> Hi,
> 
> I freshly compile haproxy-1.9.10, and after the start, I display a lot of 
> segfaults.
> 
> #0  stktable_release (t=t@entry=0x274a5a8, ts=0x0) at src/stick_table.c:419
> #1  0x000000000049a0d6 in sample_conv_in_table (arg_p=<optimized out>, 
> smp=0x7fffc6ed0d70, private=<optimized out>)
>    at src/stick_table.c:876
> #2  0x00000000004d1554 in sample_process (px=px@entry=0x32cbae0, 
> sess=sess@entry=0x36e13b0,
>    strm=strm@entry=0x365d0d0, opt=opt@entry=6, expr=0x3294540, 
> p=p@entry=0x7fffc6ed0d70) at src/sample.c:1082
> #3  0x00000000004f99fc in acl_exec_cond (cond=0x3707690, px=0x32cbae0, 
> sess=sess@entry=0x36e13b0,
>    strm=strm@entry=0x365d0d0, opt=6, opt@entry=2) at src/acl.c:1148
> #4  0x00000000004e6c7d in tcp_inspect_request (s=s@entry=0x365d0d0, 
> req=req@entry=0x365d0e0, an_bit=an_bit@entry=2)
>    at src/tcp_rules.c:148
> #5  0x0000000000487deb in process_stream (t=t@entry=0x8163d80) at 
> src/stream.c:1902
> #6  0x0000000000508b1b in process_runnable_tasks () at src/task.c:229
> #7  0x00000000004ba44b in run_poll_loop () at src/haproxy.c:2403
> #8  run_thread_poll_loop (data=data@entry=0x27d97e0) at src/haproxy.c:2470
> #9  0x000000000041b5a5 in main (argc=<optimized out>, argv=0x7fffc6ed1498) at 
> src/haproxy.c:3074
> 
> src/stick_table.c:419
> 
> 415 /* Just decrease the ref_cnt of the current session */
> 416 void stktable_release(struct stktable *t, struct stksess *ts)
> 417 {
> 418         HA_SPIN_LOCK(STK_TABLE_LOCK, &t->lock);
> 419         ts->ref_cnt--;
> 420         HA_SPIN_UNLOCK(STK_TABLE_LOCK, &t->lock);
> 421 }
> 
> (gdb) p ts
> $1 = (struct stksess *) 0x0
> 
> There is basic haproxy 1.8.10 (ec17d7a98f30326918219ba876fcfc56f6ad6823) 
> compiled with these options:
> 
> make -j 2 -C haproxy-1.8 \
>        DEBUG="-DDEBUG_EXPR" \
>        TARGET=linux2628 \
>        USE_THREAD=1 \
>        USE_REGPARM=1 \
>        USE_SYSTEMD=1 \
>        USE_LINUX_TPROXY=1 \
>        USE_OPENSSL=yes \
>        USE_PCRE=yes \
>        USE_ZLIB=yes \
>        USE_LUA=1 \
>        USE_51DEGREES=1 \
>        51DEGREES_SRC=/opt/Device-Detection/src/pattern
> 
> Tell me if you want the core & binary file.
> 
> Thierry


Reply via email to