[Varnish] #1027: signal 6 on calling error in vcl_deliver
Varnish
varnish-bugs at varnish-cache.org
Wed Oct 5 23:11:25 CEST 2011
#1027: signal 6 on calling error in vcl_deliver
-------------------+--------------------------------------------------------
Reporter: kwy | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: trunk | Severity: normal
Keywords: |
-------------------+--------------------------------------------------------
Hi.
The following VCL will core varnish on accessing the /fail url, as will
any other use of error in deliver.
I have specific use cases for doing this, in particular to force a
synthetic response on conditions detected in vcl_deliver.
https://github.com/comotion/security.vcl/blob/master/vcl/modules/cloak.vcl
As it is I've worked around the issue by using restarts, but I 'spect you
want to avoid a segfault anyways.
---
sub vcl_recv {
if (req.url ~ "^/fail"){
set req.http.fail = "fail";
return (lookup);
}
}
sub vcl_deliver {
if(req.http.fail){
error 200 "ok";
}
}
Child (23949) died signal=6 (core dumped)
Child (23949) Panic message: Assert error in VCL_deliver_method(),
../../include/vcl_returns.h line 62:
Condition((1U << sp->handling) & ((1U << 9) | (1U << 0) )) not true.
thread = (cache-worker)
ident = Linux,2.6.32-33-server,x86_64,-sfile,-smalloc,-hcritbit,epoll
Backtrace:
0x43665e: pan_backtrace+19
0x436933: pan_ic+1ad
0x43f8b8: VCL_deliver_method+10a
0x416f53: cnt_prepresp+52c
0x41bec2: CNT_Session+7c3
0x437d89: Pool_Work_Thread+8b3
0x44ab46: wrk_thread_real+3e7
0x44ad0f: WRK_thread+b4
0x7ffbcfefd9ca: _end+7ffbcf867752
0x7ffbcfc5a70d: _end+7ffbcf5c4495
sp = 0x7ffbc87b5040 {
fd = 14, id = 14, xid = 1363644113,
client = 87.238.35.17 59639,
step = STP_PREPRESP,
handling = error,
err_code = 200, err_reason = ok,
restarts = 0, esi_level = 0
flags =
bodystatus = 0
ws = 0x7ffbc87b51a8 {
id = "sess",
{s,f,r,e} = {0x7ffbc87b5c48,+456,(nil),+65536},
},
http[req] = {
ws = 0x7ffbc87b51a8[sess]
"GET",
"/fail",
"HTTP/1.1",
"Host: u.delta9.pl",
"User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101
Firefox/4.0.1",
"Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language: en-us,en;q=0.5",
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7",
"Keep-Alive: 115",
"DNT: 1",
"Connection: keep-alive",
"fail: fail",
"Accept-Encoding: gzip",
},
worker = 0x7ffb40ce69d0 {
ws = 0x7ffb40ce6ca0 {
id = "wrk",
{s,f,r,e} = {0x7ffb40cd4920,+144,(nil),+65536},
},
http[resp] = {
ws = 0x7ffb40ce6ca0[wrk]
"HTTP/1.1",
"Service Unavailable",
"Server: Varnish",
"Content-Type: text/html; charset=utf-8",
"Retry-After: 5",
"Content-Length: 419",
"Accept-Ranges: bytes",
"Date: Wed, 05 Oct 2011 20:27:16 GMT",
"X-Varnish: 1363644113",
"Age: 0",
"Via: 1.1 varnish",
"Connection: close",
},
},
vcl = {
srcname = {
"input",
"Default",
},
},
obj = 0x7ffba6eff000 {
xid = 1363644113,
ws = 0x7ffba6eff018 {
id = "obj",
{s,f,r,e} = {0x7ffba6eff540,+176,(nil),+1024},
},
http[obj] = {
ws = 0x7ffba6eff018[obj]
"HTTP/1.1",
"Service Unavailable",
"Date: Wed, 05 Oct 2011 20:27:16 GMT",
"Server: Varnish",
"Content-Type: text/html; charset=utf-8",
"Retry-After: 5",
"Content-Length: 419",
},
len = 419,
store = {
419 {
0a 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 |.<?xml version="|
31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 75 |1.0" encoding="u|
74 66 2d 38 22 3f 3e 0a 3c 21 44 4f 43 54 59 50 |tf-8"?>.<!DOCTYP|
45 20 68 74 6d 6c 20 50 55 42 4c 49 43 20 22 2d |E html PUBLIC "-|
[355 more]
},
},
},
},
Child cleanup complete
child (23985) Started
Child (23985) said Child starts
Child (23985) said SMF.s0 mmap'ed 2147483648 bytes of 2147483648
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1027>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list