[Varnish] #213: Varnish crashes on SES_Delete(), cache_session.c line 340
Varnish
varnish-bugs at projects.linpro.no
Thu Feb 21 21:44:27 CET 2008
#213: Varnish crashes on SES_Delete(), cache_session.c line 340
----------------------+-----------------------------------------------------
Reporter: anders | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
I am running Varnish trunk/2518, in FreeBSD/amd64 7.0-RC1. Now and then
Varnish crashes:
1)
{{{
Feb 21 19:01:19 kartcache1 varnishd: Child (609) said <<Assert error
in SES_Delete(), cache_session.c line 340:>>
Feb 21 19:01:19 kartcache1 varnishd: Child (609) said
<<Condition((sp->vcl) == 0) not true.>>
Feb 21 19:01:19 kartcache1 varnishd: Child (609) said << errno = 32
(Broken pipe)>>
}}}
Backtrace:
{{{
(gdb) bt
#0 0x0000000800d17fec in thr_kill () from /lib/libc.so.7
#1 0x0000000800da1c5b in abort () from /lib/libc.so.7
#2 0x0000000800674f92 in lbv_assert (func=Could not find the frame base
for "lbv_assert".
) at assert.c:65
#3 0x000000000041cd84 in SES_Delete (sp=0x2da2a9d008) at
cache_session.c:340
#4 0x0000000000419eb2 in WRK_QueueSession (sp=0x2da2a9d008)
at cache_pool.c:319
#5 0x000000000041382e in hsh_rush (oh=0x2db1185c90) at cache_hash.c:288
#6 0x0000000000413a88 in HSH_Unbusy (o=0xc98057000) at cache_hash.c:310
#7 0x000000000040cc23 in cnt_fetch (sp=0x2d9bbb0008) at
cache_center.c:376
#8 0x000000000040e611 in CNT_Session (sp=0x2d9bbb0008) at steps.h:41
#9 0x0000000000418edd in wrk_do_one (w=0x7fff82012ae0) at
cache_pool.c:194
#10 0x00000000004196ea in wrk_thread (priv=0x800f130c0) at
cache_pool.c:248
#11 0x0000000800a9fa38 in pthread_getprio () from /lib/libthr.so.3
#12 0x00007fff81e13000 in ?? ()
Cannot access memory at address 0x7fff82013000
(gdb) frame 3
#3 0x000000000041cd84 in SES_Delete (sp=0x2da2a9d008) at
cache_session.c:340
340 AZ(sp->vcl);
(gdb) print *sp
$1 = {magic = 741317722, fd = -1, id = 2981, xid = 1254738649, restarts =
0,
esis = 0, wrk = 0x7ffff81c1ae0, sockaddrlen = 16, mysockaddrlen = 128,
sockaddr = 0x2da2a9d688, mysockaddr = 0x2da2a9d708,
addr = 0x2da2a9d788 "81.167.12.230", port = 0x2da2a9d796 "14398",
srcaddr = 0x2d95c3b7f0, doclose = 0x0, http = 0x2da2a9d1e0,
http0 = 0x2da2a9d428, ws = {{magic = 905626964, id = 0x438c00 "sess",
s = 0x2da2a9d788 "81.167.12.230", f = 0x2da2a9dafb " GMT", r = 0x0,
e = 0x2da2a9f788 ""}}, ws_ses = 0x2da2a9d79c "GET",
ws_req = 0x2da2a9da93 "", htc = {{magic = 1041886673, fd = 2981,
ws = 0x2da2a9d070, rxbuf = {b = 0x2da2a9d79c "GET",
e = 0x2da2a9da93 ""}, pipeline = {b = 0x0, e = 0x0}}},
t_open = 1203620390.6953387, t_req = 1203620428.5261879,
t_resp = nan(0x8000000000000), t_end = 1203620477.8366699, grace = 300,
step = STP_LOOKUP, cur_method = 0, handling = 4, sendbody = 0 '\0',
wantbody = 1 '\001', err_code = 0, err_reason = 0x0, list = {
vtqe_next = 0x0, vtqe_prev = 0x2db1185cc8}, director = 0x800f2b288,
backend = 0x0, bereq = 0x0, obj = 0x0, objhead = 0x2db1185c90,
vcl = 0x2d89c03fa0, mem = 0x2da2a9d000, workreq = {list = {
vtqe_next = 0x2daa501170, vtqe_prev = 0x540df0}, sess =
0x2da2a9d008},
acct = {first = 1203620390.6953387, sess = 1, req = 1, pipe = 0, pass =
0,
fetch = 0, hdrbytes = 0, bodybytes = 0}, nhashptr = 12, ihashptr = 4,
lhashptr = 71, hashptr = 0x2da2a9da98}
}}}
2)
{{{
Feb 21 19:32:09 kartcache1 varnishd: Child (81816) said <<Assert error in
SES_De
lete(), cache_session.c line 340:>>
Feb 21 19:32:09 kartcache1 varnishd: Child (81816) said
<<Condition((sp->vcl)== 0) not true.>>
}}}
Backtrace:
{{{
(gdb) bt
#0 0x0000000800d17fec in thr_kill () from /lib/libc.so.7
#1 0x0000000800da1c5b in abort () from /lib/libc.so.7
#2 0x0000000800674f92 in lbv_assert (func=Could not find the frame base
for "lbv_assert".
) at assert.c:65
#3 0x000000000041df52 in VCL_Get (vcc=0x807301160) at cache_vcl.c:85
#4 0x00000000004100b7 in exp_prefetch (arg=0x0) at cache_expire.c:207
#5 0x0000000800a9fa38 in pthread_getprio () from /lib/libthr.so.3
#6 0x0000000000000000 in ?? ()
Cannot access memory at address 0x7fffff9fe000
(gdb) frame 3
#3 0x000000000041df52 in VCL_Get (vcc=0x807301160) at cache_vcl.c:85
85 AN(vcl_active);
}}}
My VCL:
{{{
backend default {
set backend.host = "192.168.110.1";
set backend.port = "80";
}
acl purge {
"192.168.100.1"/32;
}
sub vcl_recv {
set req.grace = 5m;
if (req.http.host ~ "^(bars.*.foo.no|bazcache.foo.no)$") {
if (req.request == "GET" || req.request == "HEAD") {
lookup;
} elsif (req.request ~ "^(PURGE|REPURGE)$") {
if (client.ip ~ purge) {
if (req.request == "REPURGE") {
purge_url(req.url);
error 200 "Repurged.";
} else {
lookup;
}
} else {
error 405 "Not allowed.";
}
} else {
pipe;
}
} else {
error 403 "Access denied. Contact cacheadmin at foo.no if you
have problems.";
}
}
sub vcl_miss {
if (req.request ~ "^(PURGE|REPURGE)$") {
error 404 "Not in cache.";
} else {
fetch;
}
}
sub vcl_hit {
if (req.request == "PURGE") {
set obj.ttl = 0s;
error 200 "Purged.";
} else {
deliver;
}
}
sub vcl_fetch {
set obj.grace = 5m;
if (obj.status == 404 || obj.status == 503 || obj.status == 500) {
pass;
}
if (!obj.valid) {
error;
}
if (!obj.cacheable) {
pass;
}
if (obj.http.Cookie) {
remove obj.http.Cookie;
}
if (obj.http.Set-Cookie) {
remove obj.http.Set-Cookie;
}
insert;
}
sub vcl_hash {
set req.hash += req.url;
if (req.http.host ~ "^bars.*.foo.no$") {
set req.hash += "bars.foo.no";
} else {
set req.hash += req.http.host;
}
hash;
}
}}}
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/213>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list