[Varnish] #175: Varnish 1.1.1 segmentation violation
Varnish
varnish-bugs at projects.linpro.no
Mon Oct 29 18:24:31 CET 2007
#175: Varnish 1.1.1 segmentation violation
----------------------+-----------------------------------------------------
Reporter: anders | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 1.1.1
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
Occasionally, Varnish 1.1.1 core-dumps on my production servers:
Oct 29 18:05:20 aicache5 kernel: pid 13464 (varnishd), uid 0: exited on
signal 11 (core dumped)
I am running FreeBSD/amd64 6.2-RELEASE-p7, on Intel hardware/processors.
Backtrace:
{{{
(gdb) bt
#0 0x0805b4b5 in ses_sum_acct (sum=0xa5de0e0, inc=0x240)
at cache_session.c:215
#1 0x0805b594 in SES_Charge (sp=0xa5de004) at cache_session.c:230
#2 0x08050d36 in cnt_lookup (sp=0xa5de004) at cache_center.c:497
#3 0x08051770 in CNT_Session (sp=0xa5de004) at steps.h:37
#4 0x08058ea6 in wrk_do_one (w=0xb3033cf0) at cache_pool.c:194
#5 0x08059414 in wrk_thread (priv=0x807e1f0) at cache_pool.c:248
#6 0x280c95cf in pthread_create () from /usr/lib/libthr.so.2
#7 0xa9fa5fec in ?? ()
}}}
My VCL:
{{{
backend foo {
set backend.host = "192.168.0.230";
set backend.port = "80";
}
backend crux {
set backend.host = "192.168.0.10";
set backend.port = "80";
}
backend services {
set backend.host = "192.168.0.4";
set backend.port = "80";
}
backend crux2 {
set backend.host = "192.168.0.12";
set backend.port = "80";
}
backend crux3 {
set backend.host = "192.168.0.13";
set backend.port = "80";
}
acl aipurge {
"192.168.0.211"/32; /* cache1 */
"192.168.0.17"/32; /* cacheadmin1 */
"192.168.0.18"/32; /* cacheadmin1 */
}
sub vcl_recv {
if (req.http.host ~
"^(cache.+.foo.no|cache.foo.no|www.foo.no|foo.no|bar.no|www.bar.no|baz.no|www.baz.no|foobar.no|www.foobar.no|bazbar.no|www.bazbar.no|www.foobaz.no|foobaz.no|www.foofoo.no|foofoo.no)$")
{
set req.backend = foo;
} elsif (req.http.host ~ "^(cruxcache.foo.no)$") {
set req.backend = crux;
} elsif (req.http.host ~ "^(servicescache.foo.no)$") {
set req.backend = services;
} elsif (req.http.host ~
"^(www.fooguiden.no|fooguiden.no|www.foobarguiden.no|foobarguiden.no)$") {
set req.backend = crux2;
} elsif (req.http.host ~
"^(www.bazguiden.no|bazguiden.no|www.bazbarguiden.no|bazbarguiden.no|www.bazfoo.no|bazfoo.no|www.bazbazguiden.no|bazbazguiden.no)$")
{
set req.backend = crux3;
} else {
error 403 "Access denied. Contact cacheadmin at foo.no if you
have problems. Please indicate which OS, browser, browser version and URL
you are using.";
}
if (req.request == "GET" || req.request == "HEAD") {
if (req.http.Expect) {
pipe;
}
if (req.http.Authenticate) {
pass;
}
lookup;
} elsif (req.request == "PURGE") {
if (client.ip ~ aipurge) {
lookup;
} else {
error 405 "Not allowed.";
}
} else {
pipe;
}
}
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 {
deliver;
}
}
sub vcl_fetch {
if (obj.status == 404 || obj.status == 503) {
pass;
}
if (obj.http.host ~
"^(cache.+.foo.no|cache.foo.no|www.foo.no|foo.no|bar.no|www.bar.no|baz.no|www.baz.no|foobar.no|www.foobar.no|bazbar.no|www.bazbar.no|www.foobaz.no|foobaz.no|www.foofoo.no|foofoo.no)$")
{
if (obj.http.Set-Cookie) {
remove obj.http.Set-Cookie;
}
}
if (!obj.valid) {
error;
}
if (!obj.cacheable) {
pass;
}
if (obj.ttl < 120s) {
set obj.ttl = 120s;
}
insert;
}
sub vcl_hash {
set req.hash += req.url;
if (req.http.host ~ "^cache.*.foo.no$") {
set req.hash += "www.foo.no";
} else {
set req.hash += req.http.host;
}
hash;
}
}}}
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/175>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list