[Varnish] #1398: Assert error in VRT_r_beresp_backend_name(), cache/cache_vrt_var.c

Varnish varnish-bugs at varnish-cache.org
Fri Dec 27 15:24:20 CET 2013


#1398: Assert error in VRT_r_beresp_backend_name(), cache/cache_vrt_var.c
-------------------------------------------------+-------------------------
 Reporter:  varnish@…                            |       Type:  defect
   Status:  new                                  |   Priority:  normal
Milestone:  Varnish 4.0-TP1                      |  Component:  varnishd
  Version:  trunk                                |   Severity:  normal
 Keywords:  assert assertion                     |
  VRT_r_beresp_backend_name                      |
-------------------------------------------------+-------------------------
 Hi,

 a assertion is thrown, if you're using a the following VCL code inside
 vcl_backend_response (this code snippet is for debugging purposes) and a
 backend fetch error occures:
 {{{
  # save some information for later use
  set beresp.http.X-BE-Name = beresp.backend.name;
 }}}

 The assertion is the following:
 {{{
 Panic message: Assert error in VRT_r_beresp_backend_name(),
 cache/cache_vrt_var.c line 253:
   Condition((ctx->bo->vbc) != NULL) not true.
 thread = (cache-worker)
 ident =
 Linux,2.6.32-431.el6.x86_64,x86_64,-smalloc,-smalloc,-hcritbit,epoll
 Backtrace:
   0x437b83: pan_backtrace+0x19
   0x437e93: pan_ic+0x1e8
   0x44d7c8: VRT_r_beresp_backend_name+0x134
   0x7fdc6c6ebed5:
 ./vcl._JEAaMEX.so(VGC_function_vcl_backend_response+0x25) [0x7fdc6c6ebed5]
   0x445c1f: vcl_call_method+0x402
   0x446bca: VCL_backend_response_method+0x128
   0x422823: vbf_stp_fetchhdr+0x530
   0x4242c6: vbf_fetch_thread+0x2c3
   0x439607: Pool_Work_Thread+0x416
   0x4520e4: wrk_thread_real+0x143
   busyobj = 0x7fdc44090a90 {
     ws = 0x7fdc44090b30 {
       id = "bo",
       {s,f,r,e} = {0x7fdc44092a58,+96,(nil),+57400},
     },
     do_stream
     should_close
     bodystatus = 0 (none),
     },
     http[bereq] = {
       ws = 0x7fdc44090b30[bo]
         "GET",
         "",
         "HTTP/1.1",
         "",
         "",
         "",
         "",
         "",
         "",
         "",
         "Accept-Encoding: gzip",
         "If-Modified-Since: Mon, 30 May 2011 10:02:31 GMT",
         "X-Varnish: 6",
         "Host: 192.168.0.45",
     },
     http[beresp] = {
       ws = 0x7fdc44090b30[bo]
         "HTTP/1.1",
         "Backend fetch failed",
         "Content-Length: 0",
         "Connection: close",
     },
     ws = 0x7fdc44090cd8 {
       id = "(null)",
       {s,f,r,e} = {(nil),(nil),(nil),(nil)},
     },
   }
 }}}

 It seems that the backend error isn't handled gracefully inside
 vbf_stp_fetchhdr() - cache/cache_fetch.c, thus the normal request flow is
 continued, till the assertion occures.

 Best regards,
 Martin

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




More information about the varnish-bugs mailing list