Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3791

Diagnostics can crash in PCRE JIT when there's a bad config

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 7.1.0
    • Core

    Description

      Somewhat strange setup, but basically with a bad parent.config entry, e.g.

      dest_domain=. parent="foo.example.com"
      

      (notice the missing :port), and I run traffic_server with a -T option, e.g.

      ./bin/traffic_server -T parent
      

      I get a crash with a core of

      (gdb) bt
      #0  0x00007ffff52019c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
      #1  0x00007ffff520365a in __GI_abort () at abort.c:89
      #2  0x00007ffff7bc3fb8 in ink_die_die_die () at ../../../../lib/ts/ink_error.cc:43
      #3  ink_fatal_va (fmt=0x7ffff7bd0820 "ats_malloc: couldn't allocate %zu bytes", ap=ap@entry=0x7ffff3994808) at ../../../../lib/ts/ink_error.cc:65
      #4  0x00007ffff7bc404c in ink_fatal (message_format=message_format@entry=0x7ffff7bd0820 "ats_malloc: couldn't allocate %zu bytes") at ../../../../lib/ts/ink_error.cc:73
      #5  0x00007ffff7bc6f16 in ats_malloc (size=32) at ../../../../lib/ts/ink_memory.cc:56
      #6  0x00007ffff6911694 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=<optimized out>, maxsize@entry=1048576) at pcre_jit_compile.c:10571
      #8  0x00007ffff7bbc656 in get_jit_stack (data=<optimized out>) at ../../../../lib/ts/Regex.cc:44
      #9  0x00007ffff6911358 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=0x7ffff3994be0, offset_count=2) at pcre_jit_compile.c:10420
      #10 0x00007ffff68e9e7e in pcre_exec (argument_re=0x10aa270, extra_data=<optimized out>, subject=subject@entry=0x80ac67 "pmgmt", length=length@entry=5, start_offset=start_offset@entry=0, options=options@entry=0, offsets=0x7ffff3994be0, offsetcount=30) at pcre_exec.c:6483
      #11 0x00007ffff7bbc79e in Regex::exec (this=<optimized out>, str=str@entry=0x80ac67 "pmgmt", length=length@entry=5, ovector=ovector@entry=0x7ffff3994be0, ovecsize=ovecsize@entry=30) at ../../../../lib/ts/Regex.cc:120
      #12 0x00007ffff7bbc7c5 in Regex::exec (this=<optimized out>, str=str@entry=0x80ac67 "pmgmt", length=length@entry=5) at ../../../../lib/ts/Regex.cc:112
      #13 0x00007ffff7bbca1f in DFA::match (this=<optimized out>, str=str@entry=0x80ac67 "pmgmt", length=5) at ../../../../lib/ts/Regex.cc:235
      #14 0x00007ffff7bbca67 in DFA::match (this=<optimized out>, str=str@entry=0x80ac67 "pmgmt") at ../../../../lib/ts/Regex.cc:225
      #15 0x00007ffff7bb0a32 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 0x00007ffff7bb1429 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 <ProcessManager::processSignalQueue()::__FUNCTION__> "processSignalQueue", line=line@entry=148, format_string=0x80a8f8 "[ProcessManager] ==> Signalling local manager '%d'\n") at ../../../../lib/ts/Diags.cc:513
      #18 0x00000000006979f5 in ProcessManager::processSignalQueue (this=0x10eab30) at ../../../mgmt/ProcessManager.cc:148
      #19 0x0000000000697ffd in startProcessManager (arg=<optimized out>) at ../../../mgmt/ProcessManager.cc:63
      #20 0x00007ffff6039555 in start_thread (arg=0x7ffff3995700) at pthread_create.c:333
      #21 0x00007ffff52cfb9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
      

      Attachments

        Activity

          People

            psudaemon Phil Sorber
            zwoop Leif Hedstrom
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: