[Varnish] #242: Segfault on Set Header in vcl_hit Assert error in WS_Reserve(), cache_ws.c line 103:
Varnish
varnish-bugs at projects.linpro.no
Fri Jun 6 23:41:28 CEST 2008
#242: Segfault on Set Header in vcl_hit Assert error in WS_Reserve(), cache_ws.c
line 103:
--------------------+-------------------------------------------------------
Reporter: sky | Owner: des
Type: defect | Status: closed
Priority: normal | Milestone:
Component: build | Version: 1.1.2
Severity: normal | Resolution: worksforme
Keywords: |
--------------------+-------------------------------------------------------
Changes (by phk):
* status: new => closed
* resolution: => worksforme
Old description:
> (gdb) bt
> #0 0x000000373cc30055 in raise () from /lib64/libc.so.6
> #1 0x000000373cc31af0 in abort () from /lib64/libc.so.6
> #2 0x000000373d8024fc in lbv_assert () from /usr/lib64/libvarnish.so.0
> #3 0x0000000000417bb8 in WS_Reserve ()
> #4 0x0000000000415f52 in VRT_l_obj_status ()
> #5 0x0000000000416bc3 in VRT_SetHdr ()
> #6 0x00002aaaeb459f96 in ?? ()
> #7 0x000000004a00cc3f in ?? ()
> #8 0x000000001ac43088 in ?? ()
> #9 0x000000001ac43088 in ?? ()
> #10 0x0000000000413cac in VCL_hit_method ()
> #11 0x000000000040984f in CNT_Session ()
> #12 0x0000000000410a33 in WRK_QueueSession ()
> #13 0x0000000000410c73 in WRK_QueueSession ()
> #14 0x000000373dc062f7 in start_thread () from /lib64/libpthread.so.0
> #15 0x000000373ccce85d in clone () from /lib64/libc.so.6
>
> Changing
>
> sub vcl_hit {
> if (req.request == "PURGE") {
> set obj.ttl = 0s;
> error 200 "Purged.";
> }
>
> if (!obj.cacheable) {
> pass;
> }
> set obj.http.X-Cache = "HIT";
> deliver;
> }
>
> to
>
> sub vcl_hit {
> if (req.request == "PURGE") {
> set obj.ttl = 0s;
> error 200 "Purged.";
> }
>
> if (!obj.cacheable) {
> pass;
> }
> if(obj.http.X-Cache == "MISS") {
> set obj.http.X-Cache = "HIT";
> }
> deliver;
> }
New description:
{{{
(gdb) bt
#0 0x000000373cc30055 in raise () from /lib64/libc.so.6
#1 0x000000373cc31af0 in abort () from /lib64/libc.so.6
#2 0x000000373d8024fc in lbv_assert () from /usr/lib64/libvarnish.so.0
#3 0x0000000000417bb8 in WS_Reserve ()
#4 0x0000000000415f52 in VRT_l_obj_status ()
#5 0x0000000000416bc3 in VRT_SetHdr ()
#6 0x00002aaaeb459f96 in ?? ()
#7 0x000000004a00cc3f in ?? ()
#8 0x000000001ac43088 in ?? ()
#9 0x000000001ac43088 in ?? ()
#10 0x0000000000413cac in VCL_hit_method ()
#11 0x000000000040984f in CNT_Session ()
#12 0x0000000000410a33 in WRK_QueueSession ()
#13 0x0000000000410c73 in WRK_QueueSession ()
#14 0x000000373dc062f7 in start_thread () from /lib64/libpthread.so.0
#15 0x000000373ccce85d in clone () from /lib64/libc.so.6
}}}
Changing
{{{
sub vcl_hit {
if (req.request == "PURGE") {
set obj.ttl = 0s;
error 200 "Purged.";
}
if (!obj.cacheable) {
pass;
}
set obj.http.X-Cache = "HIT";
deliver;
}
}}}
to
{{{
sub vcl_hit {
if (req.request == "PURGE") {
set obj.ttl = 0s;
error 200 "Purged.";
}
if (!obj.cacheable) {
pass;
}
if(obj.http.X-Cache == "MISS") {
set obj.http.X-Cache = "HIT";
}
deliver;
}
}}}
Comment:
This ticket is a bit on the thin side, but in general when you get a panic
that involves WS_Reserve() or WS_Alloc(), then you have likely run out of
workspace, most often session workspace,
but in seldom cases object workspace.
Both of these can be changed with their respective parameters.
Be aware that obj_workspace affects every cached object, and thus scales
with the number of these, whereas sess_workspace only scales with the
number of worker threads.
I will not rule out that the default for sess_workspace is an order of
magnitude too low.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/242#comment:2>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list