[Varnish] #1576: default pcre_match_limit_recursion and thread_pool_stack dont match - varnishd child process crashes with segfault error 6 in libpcre.so.3.13.1
Varnish
varnish-bugs at varnish-cache.org
Mon Sep 29 12:54:53 CEST 2014
#1576: default pcre_match_limit_recursion and thread_pool_stack dont match -
varnishd child process crashes with segfault error 6 in libpcre.so.3.13.1
----------------------+--------------------
Reporter: abdi | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 4.0.1
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------
Comment (by slink):
summary of irc discussion:
On estimating stack per pcre recursion:
* we could dynamically determine the stack space required per pcre
recursion: implement a bin search on the pcre recursion limit to determine
the minimal recursion depth for some RE and pattern and take the actual
stack size used on this. add a safety margin and take this as our
stack_bytes / pcre_recursion measure.
* but we consider this an overdesign for now
* we could run `pcretest` from autocrap and get our stacksize estimate
{{{
pcretest -m -C
[...]
Match recursion uses stack: approximate frame size = 176 bytes
}}}
* trouble is that `pcretest` does not get installed with -dev packages
on some distros (read: at least not on debian)
* so we probably just start with 600 bytes
The implementation should check the remaining stack space and set the pcre
recursion limit accordingly
On JIT: We'd want JIT as a per-RE flag only, not as a global flag
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1576#comment:17>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list