[Varnish] #237: Varnish crashes on assert error in http_dissect_hdrs(), cache_http.c line 375
Varnish
varnish-bugs at projects.linpro.no
Mon May 5 08:52:45 CEST 2008
#237: Varnish crashes on assert error in http_dissect_hdrs(), cache_http.c line
375
----------------------+-----------------------------------------------------
Reporter: anders | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Keywords: varnishd core dump http_dissect_hdrs
----------------------+-----------------------------------------------------
Running Varnish trunk (up to date to commit 2629) for a good number of
days, finally it crashed:
{{{
Child said (2, 2305): <<Assert error in http_dissect_hdrs(), cache_http.c
line 375:>>
Child said (2, 2305): << Condition(p <= t.e) not true.>>
Child said (2, 2305): << errno = 35 (Resource temporarily unavailable)>>
}}}
Unfortunately I could not generate a backtrace, as the core-dump was too
big and I ran out of diskspace.
I am doing this on FreeBSD 7.0-RELEASE/amd64 with the ULE scheduler. I
have one local patch in
storage_file.c that sets the pagesize to 2048 bytes, and I start Varnish
with these parameters:
-p obj_workspace=4096 -p lru_interval=3600 -h classic,500009 -p
ping_interval=0 -p cli_timeout=30 -p auto_restart=off -p thread_pools=4 -p
thread_pool_max=1000 -p listen_depth=4096 -p srcaddr_hash=20480 -p
default_ttl=604800 -s malloc,100G -P /var/run/varnishd.pid
At the time of the crash, I had:
* 4.71 million objects, 216.29 GB data in the cache.
* 56 GB swap in use.
My VCL:
{{{
backend default {
.host = "192.168.110.1";
.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") {
if (client.ip ~ purge) {
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)$") {
error 404 "Not in cache.";
} else {
fetch;
}
}
sub vcl_hit {
if (req.request == "PURGE") {
set obj.ttl = 0s;
error 200 "Purged.";
} else {
if (!obj.cacheable) {
pass;
} else {
deliver;
}
}
}
sub vcl_fetch {
set obj.grace = 5m;
if (obj.status == 404 || obj.status == 401 || obj.status == 500) {
pass;
}
if (!obj.valid) {
error obj.status;
}
if (!obj.cacheable) {
pass;
}
if (obj.http.Cookie) {
remove obj.http.Cookie;
}
if (obj.http.Set-Cookie) {
remove obj.http.Set-Cookie;
}
insert;
}
}}}
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/237>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list