Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Bugs

#1086: Panic in ban lurker

 

 

Varnish bugs RSS feed   Index | Next | Previous | View Threaded


varnish-bugs at varnish-cache

Jan 19, 2012, 10:24 PM

Post #1 of 2 (87 views)
Permalink
#1086: Panic in ban lurker

#1086: Panic in ban lurker
--------------------+-------------------------------------------------------
Reporter: insyte | Type: defect
Status: new | Priority: normal
Milestone: | Component: build
Version: 3.0.2 | Severity: normal
Keywords: |
--------------------+-------------------------------------------------------
I'm seeing clusters of panics every few days on both of my varnish nodes.
There will be no panics for a couple days, then three in 90 minutes.

{{{
Last panic at: Thu, 19 Jan 2012 22:36:35 GMT
Assert error in oc_getobj(), cache.h line 452:
Condition((oc->flags & (1<<1)) == 0) not true.
thread = (ban-lurker)
ident = Linux,2.6.32-34-server,x86_64,-smalloc,-smalloc,-hcritbit,epoll
Backtrace:
0x42f118: /usr/sbin/varnishd() [0x42f118]
0x415645: /usr/sbin/varnishd() [0x415645]
0x43195b: /usr/sbin/varnishd() [0x43195b]
0x7f02b768e9ca: /lib/libpthread.so.0(+0x69ca) [0x7f02b768e9ca]
0x7f02b73eb70d: /lib/libc.so.6(clone+0x6d) [0x7f02b73eb70d]
}}}

Varnish CLI args:

{{{
/usr/sbin/varnishd \
-P /var/run/varnishd.pid \
-a :80,:443 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-s malloc,7g \
-p http_req_hdr_len 8192 \
-p http_resp_hdr_len 8192
}}}

VCL:

{{{

include "backend.vcl";
include "purge_acl.vcl";
import std;

sub vcl_recv {
if (req.request == "BAN") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
ban("req.http.host == " + req.http.host);
error 200 "Ban added.";
}

if (req.restarts == 0) {
if (req.http.x-forwarded-for) {
set req.http.X-Forwarded-For =
req.http.X-Forwarded-For + ", " + client.ip;
} else {
set req.http.X-Forwarded-For = client.ip;
}
}

if (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} elsif (req.http.Accept-Encoding ~ "deflate") {
set req.http.Accept-Encoding = "deflate";
}

if (req.request != "GET" && req.request != "HEAD") {
return (pass);
}

if (req.http.Authorization) {
return (pass);
}

return(lookup);
}

sub vcl_fetch {
set beresp.ttl = 1h;

if (beresp.status == 403 || beresp.status == 404 ||
beresp.status == 405 || beresp.status == 500 || beresp.status ==
503) {
unset beresp.http.set-cookie;
set beresp.http.X-The-Server-Says = beresp.status;
}

if (beresp.status == 302) {
set beresp.http.X-The-Server-Says = beresp.status;
return(hit_for_pass);
}

if (std.integer(beresp.http.Content-Length,0) > 500000000) {
set beresp.do_stream = true;
set beresp.http.X-Are-We-Streaming = "Yes. Yes we are.";
}

if (req.url ~ "\.(css|js|html|xml)$") {
set beresp.do_gzip = true;
}

# "Vary: *" is just another way of saying "uncacheable"
#
# "X-Dynamic" is a custom header we set anytime the output is
# generated by PHP or any other CGI script.
#
# "Set-Cookie" is a pretty strong indicator that we shouldn't be
# caching.
if (beresp.http.vary == "*" ||
beresp.http.x-dynamic ||
beresp.http.set-cookie) {
set beresp.ttl = 2m;
return (hit_for_pass);
}

return (deliver);
}

sub vcl_deliver {
set resp.http.X-Brought-To-You-By = server.hostname;
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
}

sub vcl_pipe {
# http://www.varnish-cache.org/ticket/451
# This forces every pipe request to be the first one.
set bereq.http.connection = "close";
}

sub vcl_hash {
hash_data(server.port);
}

sub vcl_error {
set obj.http.Content-Type = "text/html; charset=utf-8";
set obj.http.Retry-After = "5";
synthetic {"
<!DOCTYPE html>
<html>
<head>
<title>Please come back later</title>
<style type="text/css">
html, body, div, h1, p, ol, ul, li
{
margin:0;
padding:0;
border:0;
outline:0;
font-weight:inherit;
font-style:inherit;
font-size:100%;
font-family:inherit;
vertical-align:baseline;
}
html, body {
width:100%;
background-color:#fff;
}
#wrapper {
margin:100px auto 0;
padding:25px;
width:630px;
min-height:20px;
background-color:#FFE2E2;
border:1px solid #FFBEC3;
-webkit-border-radius:10px;
-moz-border-radius:10px;
border-radius:10px;
color:#B72A2A;
}
h1 {
font-family:Helvetica,"Helvetica Neue",Arial,Geneva,sans-
serif;
font-size:18px;
margin:0;
padding:0;
letter-spacing:.75px;
}
ul {
margin:10px 0 0 40px;
padding:0;
}
li {
font-family:Helvetica,"Helvetica Neue",Arial,Geneva,sans-
serif;
font-size:14px;
margin:0 0 5px 0;
padding:0;
letter-spacing:.75px;
}
p {
font-family:Helvetica,"Helvetica Neue",Arial,Geneva,sans-
serif;
font-size:10px;
margin:0 0 5px 0;
padding:0;
letter-spacing:.75px;
text-align:right;
}
</style>
</head>
<body>
<div id="wrapper">
<h1>Please come back later&mdash;this website is not available
right now.</h1>
<ul>
<li>Please try back another time. We apologize for any
inconvenience.</li>
<li>The website's administrators are aware of the
situation.
</li>
</ul>
<p>(Varnish503)</p>
</div>
</body>
</html>
"};
return (deliver);
}
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1086>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs


varnish-bugs at varnish-cache

Jan 19, 2012, 10:27 PM

Post #2 of 2 (86 views)
Permalink
Re: #1086: Panic in ban lurker [In reply to]

#1086: Panic in ban lurker
--------------------+-------------------------------------------------------
Reporter: insyte | Type: defect
Status: new | Priority: normal
Milestone: | Component: build
Version: 3.0.2 | Severity: normal
Keywords: |
--------------------+-------------------------------------------------------

Comment(by insyte):

I'm sorry, this clearly is not a "build" failure but "varnishd".
Unfortunately I can't change it.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1086#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs

Varnish bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.