#551: Varnish Crash: Missing errorhandling code in HSH_Prepare(), cache_hash.c line 188
Ken Brownfield
kb+varnish at slide.com
Wed Sep 16 18:54:25 CEST 2009
Ah, I stand corrected. But I was definitely having random crashes
when I enabled the vcl_fetch() section below:
sub vcl_recv {
...
set req.http.Unmodified-Host = req.http.Host;
set req.http.Unmodified-URL = req.url;
...
}
sub vcl_fetch {
...
set obj.http.X-Token-URL = req.url;
set obj.http.X-Original-URL = req.http.Unmodified-URL;
set obj.http.X-Token-Host = req.http.Host;
set obj.http.X-Original-Host = req.http.Unmodified-Host;
set obj.http.X-Set-Cookie = obj.http.Set-Cookie;
...
}
I'm a bit loathe to reenable this to get a full stacktrace and gdb
output, but if there's really nothing wrong with this I might consider
it.
Also, using trunk (a couple weeks ago) I can't reference obj in
vcl_fetch() at all, which I assumed was an intentional side-step of
the #310 bug.
Thx,
--
Ken
On Sep 16, 2009, at 9:30 AM, Varnish wrote:
> #551: Varnish Crash: Missing errorhandling code in HSH_Prepare(),
> cache_hash.c
> line 188
> ----------------------
> +-----------------------------------------------------
> Reporter: cheerios | Owner: phk
> Type: defect | Status: closed
> Priority: normal | Milestone:
> Component: varnishd | Version: 2.0
> Severity: normal | Resolution: invalid
> Keywords: |
> ----------------------
> +-----------------------------------------------------
> Changes (by kristian):
>
> * status: new => closed
> * resolution: => invalid
>
> Comment:
>
> Cheerios: I'm going to close this for now, since this sounds exactly
> like
> a sess_workspace issue. Feel free to re-open this if you can confirm
> that
> this is unaffected by sess_workspace. Further discussion should go
> on the
> mail list though.
>
> ... and:
>
> Replying to [comment:4 kb]:
>> Possibly unrelated, but modifying obj in vcl_fetch() will cause
>> crashes
> (see #310); I found out the hard way.
>
> You mean vcl_hit. The object is safely locked in vcl_fetch, and can be
> modified.
>
>> Odd though that setting obj.ttl specifically seems to be safe.
>
> Nah, not really that odd. Setting a ttl fairly atomic, while
> manipulating
> strings usually means copying and replacing. But this discussion
> doesn't
> belong here.
>
> --
> Ticket URL: <http://varnish.projects.linpro.no/ticket/551#comment:5>
> Varnish <http://varnish.projects.linpro.no/>
> The Varnish HTTP Accelerator
> _______________________________________________
> varnish-bugs mailing list
> varnish-bugs at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-bugs
More information about the varnish-misc
mailing list