[Varnish] #1511: panic when attempt to retry after backend returns 500

Varnish varnish-bugs at varnish-cache.org
Sat May 24 00:38:49 CEST 2014


#1511: panic when attempt to retry after backend returns 500
---------------------------------+----------------------
 Reporter:  bytemask             |       Type:  defect
   Status:  new                  |   Priority:  normal
Milestone:  Varnish 4.0 release  |  Component:  varnishd
  Version:  4.0.0                |   Severity:  normal
 Keywords:  panic                |
---------------------------------+----------------------
 varnishd child panics when I put logic in my vcl to retry when my backend
 returns an error 500.

 the vcl logic i'm using to trigger this is roughly:

 {{{
 sub vcl_backend_response {
 <...>
     if ( beresp.status >= 500 && bereq.retries < 5 ) {
         return(retry);
     }
 <...>
 }
 }}}

 After hitting any route that returns a 500 error, the child crashes.
 panic.show output is:

 {{{
 200
 Last panic at: Fri, 23 May 2014 22:34:08 GMT
 Assert error in vbf_stp_startfetch(), cache/cache_fetch.c line 258:
   Condition((bo->should_close) == 0) not true.
 thread = (cache-worker)
 ident = Linux,3.2.0-57-virtual,x86_64,-smalloc,-smalloc,-hcritbit,epoll
 Backtrace:
   0x4325b5: /usr/sbin/varnishd() [0x4325b5]
   0x421596: /usr/sbin/varnishd() [0x421596]
   0x434ab4: /usr/sbin/varnishd(Pool_Work_Thread+0xb4) [0x434ab4]
   0x4477e8: /usr/sbin/varnishd() [0x4477e8]
   0x7f9458b0fe9a: /lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)
 [0x7f9458b0fe9a]
   0x7f945883c3fd: /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)
 [0x7f945883c3fd]
   busyobj = 0x7f9418030970 {
     ws = 0x7f9418030a38 {
       id = "bo",
       {s,f,r,e} = {0x7f9418032940,+1016,(nil),+57392},
     },
   refcnt = 2
   retries = 1
   failed = 0
   state = 1
     is_do_stream
     is_should_close
     bodystatus = 3 (length),
     },
     http[bereq] = {
       ws = 0x7f9418030a38[bo]
         "GET",
         "/topics.mobile.html",
         "HTTP/1.1",
         "Host: qa05.ourwebsite.com",
         "Referer: http://www.google.com",
         "User-Agent: scrapy",
         "X-Forwarded-For: 216.112.253.12",
         "X-UA-Device: pc",
         "Accept-Encoding: gzip",
         "X-Varnish: 196611",
     },
     http[beresp] = {
       ws = 0x7f9418030a38[bo]
         "HTTP/1.1",
         "500",
         "Internal Server Error",
         "Date: Fri, 23 May 2014 22:34:06 GMT",
         "Content-Length: 538",
         "Connection: close",
         "Content-Type: text/html; charset=iso-8859-1",
         "Server: Apache",
     },
     ws = 0x7f9418030bc0 { BAD_MAGIC(0x00000000) },
     },
   objcore (FETCH) = 0x7f93f4000930 {
     refcnt = 2
     flags = 0x2
     objhead = 0x7f93f40009c0
   }
   }
 }}}

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



More information about the varnish-bugs mailing list