[jira] [Commented] (TS-3791) Diagnostics can crash in PCRE JIT when there's a bad config

2016-08-16 Thread Leif Hedstrom (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-3791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15423583#comment-15423583
 ] 

Leif Hedstrom commented on TS-3791:
---

The parent.config is also likely just a red-herring.

> Diagnostics can crash in PCRE JIT when there's a bad config 
> 
>
> Key: TS-3791
> URL: https://issues.apache.org/jira/browse/TS-3791
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Leif Hedstrom
>Assignee: Phil Sorber
>  Labels: crash
> Fix For: 7.1.0
>
>
> Somewhat strange setup, but basically with a bad parent.config entry, e.g.
> {code}
> dest_domain=. parent="foo.example.com"
> {code}
> (notice the missing :port), and I run traffic_server with a -T option, e.g.
> {code}
> ./bin/traffic_server -T parent
> {code}
> I get a crash with a core of
> {code}
> (gdb) bt
> #0  0x752019c8 in __GI_raise (sig=sig@entry=6) at 
> ../sysdeps/unix/sysv/linux/raise.c:55
> #1  0x7520365a in __GI_abort () at abort.c:89
> #2  0x77bc3fb8 in ink_die_die_die () at 
> ../../../../lib/ts/ink_error.cc:43
> #3  ink_fatal_va (fmt=0x77bd0820 "ats_malloc: couldn't allocate %zu 
> bytes", ap=ap@entry=0x73994808) at ../../../../lib/ts/ink_error.cc:65
> #4  0x77bc404c in ink_fatal 
> (message_format=message_format@entry=0x77bd0820 "ats_malloc: couldn't 
> allocate %zu bytes") at ../../../../lib/ts/ink_error.cc:73
> #5  0x77bc6f16 in ats_malloc (size=32) at 
> ../../../../lib/ts/ink_memory.cc:56
> #6  0x76911694 in sljit_allocate_stack (allocator_data=0x0, 
> max_limit=1048576, limit=8192) at sljit/sljitUtils.c:236
> #7  pcre_jit_stack_alloc (startsize=8192, maxsize=, 
> maxsize@entry=1048576) at pcre_jit_compile.c:10571
> #8  0x77bbc656 in get_jit_stack (data=) at 
> ../../../../lib/ts/Regex.cc:44
> #9  0x76911358 in _pcre_jit_exec 
> (extra_data=extra_data@entry=0x10aa2d0, subject=subject@entry=0x80ac67 
> "pmgmt", length=length@entry=5, start_offset=start_offset@entry=0, 
> options=options@entry=0, offsets=offsets@entry=0x73994be0, 
> offset_count=2) at pcre_jit_compile.c:10420
> #10 0x768e9e7e in pcre_exec (argument_re=0x10aa270, 
> extra_data=, subject=subject@entry=0x80ac67 "pmgmt", 
> length=length@entry=5, start_offset=start_offset@entry=0, 
> options=options@entry=0, offsets=0x73994be0, offsetcount=30) at 
> pcre_exec.c:6483
> #11 0x77bbc79e in Regex::exec (this=, 
> str=str@entry=0x80ac67 "pmgmt", length=length@entry=5, 
> ovector=ovector@entry=0x73994be0, ovecsize=ovecsize@entry=30) at 
> ../../../../lib/ts/Regex.cc:120
> #12 0x77bbc7c5 in Regex::exec (this=, 
> str=str@entry=0x80ac67 "pmgmt", length=length@entry=5) at 
> ../../../../lib/ts/Regex.cc:112
> #13 0x77bbca1f in DFA::match (this=, 
> str=str@entry=0x80ac67 "pmgmt", length=5) at ../../../../lib/ts/Regex.cc:235
> #14 0x77bbca67 in DFA::match (this=, 
> str=str@entry=0x80ac67 "pmgmt") at ../../../../lib/ts/Regex.cc:225
> #15 0x77bb0a32 in Diags::tag_activated (this=this@entry=0x10aa140, 
> tag=tag@entry=0x80ac67 "pmgmt", mode=mode@entry=DiagsTagType_Debug) at 
> ../../../../lib/ts/Diags.cc:394
> #16 0x77bb1429 in on (mode=DiagsTagType_Debug, tag=0x80ac67 "pmgmt", 
> this=0x10aa140) at ../../../../lib/ts/Diags.h:171
> #17 Diags::log (this=0x10aa140, tag=tag@entry=0x80ac67 "pmgmt", 
> level=level@entry=DL_Debug, file=file@entry=0x80a850 
> "../../../mgmt/ProcessManager.cc", func=func@entry=0x80acf0 
>  "processSignalQueue", 
> line=line@entry=148, format_string=0x80a8f8 "[ProcessManager] ==> Signalling 
> local manager '%d'\n") at ../../../../lib/ts/Diags.cc:513
> #18 0x006979f5 in ProcessManager::processSignalQueue (this=0x10eab30) 
> at ../../../mgmt/ProcessManager.cc:148
> #19 0x00697ffd in startProcessManager (arg=) at 
> ../../../mgmt/ProcessManager.cc:63
> #20 0x76039555 in start_thread (arg=0x73995700) at 
> pthread_create.c:333
> #21 0x752cfb9d in clone () at 
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-3791) Diagnostics can crash in PCRE JIT when there's a bad config

2016-07-21 Thread Leif Hedstrom (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-3791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15388336#comment-15388336
 ] 

Leif Hedstrom commented on TS-3791:
---

I think I have tracked this down some more. This happens reliably for me when I 
set this setting:

{code}
CONFIG proxy.config.mlock_enabled INT 2
{code}

After enabling this, I trigger a crasher reliably by simply doing e.g.

{code}
sudo traffic_server -T http_hdrs
{code}


> Diagnostics can crash in PCRE JIT when there's a bad config 
> 
>
> Key: TS-3791
> URL: https://issues.apache.org/jira/browse/TS-3791
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Leif Hedstrom
>Assignee: Phil Sorber
>  Labels: crash
> Fix For: 7.0.0
>
>
> Somewhat strange setup, but basically with a bad parent.config entry, e.g.
> {code}
> dest_domain=. parent="foo.example.com"
> {code}
> (notice the missing :port), and I run traffic_server with a -T option, e.g.
> {code}
> ./bin/traffic_server -T parent
> {code}
> I get a crash with a core of
> {code}
> (gdb) bt
> #0  0x752019c8 in __GI_raise (sig=sig@entry=6) at 
> ../sysdeps/unix/sysv/linux/raise.c:55
> #1  0x7520365a in __GI_abort () at abort.c:89
> #2  0x77bc3fb8 in ink_die_die_die () at 
> ../../../../lib/ts/ink_error.cc:43
> #3  ink_fatal_va (fmt=0x77bd0820 "ats_malloc: couldn't allocate %zu 
> bytes", ap=ap@entry=0x73994808) at ../../../../lib/ts/ink_error.cc:65
> #4  0x77bc404c in ink_fatal 
> (message_format=message_format@entry=0x77bd0820 "ats_malloc: couldn't 
> allocate %zu bytes") at ../../../../lib/ts/ink_error.cc:73
> #5  0x77bc6f16 in ats_malloc (size=32) at 
> ../../../../lib/ts/ink_memory.cc:56
> #6  0x76911694 in sljit_allocate_stack (allocator_data=0x0, 
> max_limit=1048576, limit=8192) at sljit/sljitUtils.c:236
> #7  pcre_jit_stack_alloc (startsize=8192, maxsize=, 
> maxsize@entry=1048576) at pcre_jit_compile.c:10571
> #8  0x77bbc656 in get_jit_stack (data=) at 
> ../../../../lib/ts/Regex.cc:44
> #9  0x76911358 in _pcre_jit_exec 
> (extra_data=extra_data@entry=0x10aa2d0, subject=subject@entry=0x80ac67 
> "pmgmt", length=length@entry=5, start_offset=start_offset@entry=0, 
> options=options@entry=0, offsets=offsets@entry=0x73994be0, 
> offset_count=2) at pcre_jit_compile.c:10420
> #10 0x768e9e7e in pcre_exec (argument_re=0x10aa270, 
> extra_data=, subject=subject@entry=0x80ac67 "pmgmt", 
> length=length@entry=5, start_offset=start_offset@entry=0, 
> options=options@entry=0, offsets=0x73994be0, offsetcount=30) at 
> pcre_exec.c:6483
> #11 0x77bbc79e in Regex::exec (this=, 
> str=str@entry=0x80ac67 "pmgmt", length=length@entry=5, 
> ovector=ovector@entry=0x73994be0, ovecsize=ovecsize@entry=30) at 
> ../../../../lib/ts/Regex.cc:120
> #12 0x77bbc7c5 in Regex::exec (this=, 
> str=str@entry=0x80ac67 "pmgmt", length=length@entry=5) at 
> ../../../../lib/ts/Regex.cc:112
> #13 0x77bbca1f in DFA::match (this=, 
> str=str@entry=0x80ac67 "pmgmt", length=5) at ../../../../lib/ts/Regex.cc:235
> #14 0x77bbca67 in DFA::match (this=, 
> str=str@entry=0x80ac67 "pmgmt") at ../../../../lib/ts/Regex.cc:225
> #15 0x77bb0a32 in Diags::tag_activated (this=this@entry=0x10aa140, 
> tag=tag@entry=0x80ac67 "pmgmt", mode=mode@entry=DiagsTagType_Debug) at 
> ../../../../lib/ts/Diags.cc:394
> #16 0x77bb1429 in on (mode=DiagsTagType_Debug, tag=0x80ac67 "pmgmt", 
> this=0x10aa140) at ../../../../lib/ts/Diags.h:171
> #17 Diags::log (this=0x10aa140, tag=tag@entry=0x80ac67 "pmgmt", 
> level=level@entry=DL_Debug, file=file@entry=0x80a850 
> "../../../mgmt/ProcessManager.cc", func=func@entry=0x80acf0 
>  "processSignalQueue", 
> line=line@entry=148, format_string=0x80a8f8 "[ProcessManager] ==> Signalling 
> local manager '%d'\n") at ../../../../lib/ts/Diags.cc:513
> #18 0x006979f5 in ProcessManager::processSignalQueue (this=0x10eab30) 
> at ../../../mgmt/ProcessManager.cc:148
> #19 0x00697ffd in startProcessManager (arg=) at 
> ../../../mgmt/ProcessManager.cc:63
> #20 0x76039555 in start_thread (arg=0x73995700) at 
> pthread_create.c:333
> #21 0x752cfb9d in clone () at 
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)