Hi,

On 16.05.2014 20:28, Lukas Tribus wrote:
> Hi Thomas,
>
>
>
>> This was somewhat complex. I am using OpenWrt for HAProxy with eglibc.
> I see. Are you using local gdb on this box or are you transferring
> executable and core to another box and backtracing there?
>
Yes, Iam using a local gdb on the box and i backtrace the file on the box.
>
>> So HAProxy crashes as soon as acl tries to use
>> acl ex_de hdr_reg(host) -i www\.example\.de
> Ok, so its probably about the modifications in src/pattern.c.
No it was in
#####
-diff --git a/src/cfgparse.c b/src/cfgparse.c
-index 9ec69a1..eb7ec20 100644
---- a/src/cfgparse.c
-+++ b/src/cfgparse.c
-@@ -1578,8 +1578,6 @@ static int create_cond_regex_rule(const char
*file, int line,
-       if (dir == SMP_OPT_DIR_REQ && warnif_misplaced_reqxxx(px, file,
line, cmd))
-               err_code |= ERR_WARN;
-
--      free(errmsg);
--      return err_code;
-  err:
-       free(errmsg);
-       free(preg);
#####

So it look like free(errmsg); causes my headache.
>
>
>> (gdb) bt full
>> #0 0x00006448acdbfceb in regexec (preg=0x2f737e0, string=0x2fe7b44
>> "Host: www.example.de", nmatch=10, pmatch=0x6a0600, eflags=0) at
>> pcreposix.c:194
>> rc = <value optimized out>
>> so = <value optimized out>
>> eo = <value optimized out>
>> options = Unhandled dwarf expression opcode 0x9f
> Mmmmh, I think there is a problem with gdb here [1].
When you deal with cross compiling errors are common.
>
> Anyway, since you confirmed it works when reverting Dirkjan's 07fcaaa4cd8
> ("MINOR: fix a few memory usage errors"), lets CC him and Willy.
>
> I just hope we didn't uncover some sleeping bugs in eglibc or pcre.
>

> Btw, does it work when you compile without PCRE (using libc's regexp
> implementation instead)?
>
I cant work without PCRE because we use a lot of pcre aware acl's.
>
> Regards,
>
> Lukas
>
>
>
> [1] http://stackoverflow.com/questions/608361/unhandled-dwarf-expression
>
>                                         

Let me add that even upgrading pcre does not change anything and that
this setup is working for about two years
without big issues although iam using a grsec kernel and eglibc.

cheers
thomas

Reply via email to