[Varnish] #172: Varnish 1.1.1 segmentation violation
Varnish
varnish-bugs at projects.linpro.no
Mon Oct 29 11:05:22 CET 2007
#172: 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: varnishd core dump
----------------------+-----------------------------------------------------
Occasionally, Varnish 1.1.1 core-dumps on my production servers:
Oct 29 08:27:22 aicache6 kernel: pid 98681 (varnishd), uid 0: exited on
signal 11 (core dumped)
I am running FreeBSD/amd64 6.2-RELEASE-p7, on Intel hardware/processors.
The backtrace:
{{{
(gdb) bt
#0 0x0000000800c47b26 in getnameinfo () from /lib/libc.so.6
#1 0x000000000042689d in TCP_name (addr=0xffffffff, l=50698312,
abuf=0x7fffe190b870 "", alen=64, pbuf=0x7fffe190b850 "", plen=16)
at tcp.c:58
#2 0x0000000000408ce7 in vbe_connect (sp=0x33fb008, bp=0xaf1e80)
at cache_backend.c:229
#3 0x0000000000409093 in vbe_nextfd (sp=0x33fb008) at cache_backend.c:295
#4 0x00000000004092d2 in VBE_GetFd (sp=0x33fb008) at cache_backend.c:332
#5 0x000000000040ca50 in Fetch (sp=0x33fb008) at cache_fetch.c:278
#6 0x000000000040a094 in cnt_fetch (sp=0x33fb008) at cache_center.c:300
#7 0x000000000040b0fd in CNT_Session (sp=0x33fb008) at steps.h:40
#8 0x0000000000412aa8 in wrk_do_one (w=0x7fffe190bad0) at
cache_pool.c:194
#9 0x0000000000412fa3 in wrk_thread (priv=0x8562e0) at cache_pool.c:248
#10 0x000000080098755b in pthread_create () from /usr/lib/libthr.so.2
#11 0x00007fffe170e000 in ?? ()
Cannot access memory at address 0x7fffe190e000
}}}
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/172>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list