[Varnish] #1477: Varnish cra

Varnish varnish-bugs at varnish-cache.org
Fri Apr 11 14:50:48 CEST 2014


#1477: Varnish cra
-------------------------------------------------+-------------------------
 Reporter:  citrus                               |       Type:  defect
   Status:  new                                  |   Priority:  normal
Milestone:  Varnish 4.0 release                  |  Component:  varnishd
  Version:  4.0.0                                |   Severity:  normal
 Keywords:  hash_ignore_busy streaming panic     |
  ttl do_stream                                  |
-------------------------------------------------+-------------------------
 Varnish crashes if multiple users are downloading a streamed file and
 another request is made after its TTL expires.

 - A big (~1GB), cacheable file from a server is requested by user 1.
 - While varnish is streaming the file to user 1, user 2 also starts
 downloading it, within TTL.
 - User 3 starts downloading the file after its TTL has expired.
 - Varnish crashes

 {{{
 set req.hash_ignore_busy         = true;
 set beresp.do_stream             = true;
 }}}
 {{{
 vcl: set beresp.ttl = 10s;
 OR
 .htaccess: Header set Cache-Control "max-age=10"
 }}}

 {{{
 ~# curl 0/1GB_file -H'Host: example.com' -is -o /dev/null &
 ~# sleep 3
 ~# curl 0/1GB_file -H'Host: example.com' -is -o /dev/null &
 ~# sleep 10
 ~# curl 0/1GB_file -H'Host: example.com' -is -o /dev/null &
 }}}

 {{{
 Child (24178) Panic message: Assert error in HSH_Lookup(),
 cache/cache_hash.c line 461:
   Condition((req->hash_ignore_busy) == 0) not true.
 thread = (cache-worker)
 ident = Linux,3.10.23-std-ipv6-64,x86_64
 Backtrace:
   0x43bd4f: pan_backtrace+0x19
   0x43c059: pan_ic+0x1e9
   0x42c699: HSH_Lookup+0xa47
   0x43fd1f: cnt_lookup+0x242
   0x4423b6: CNT_Request+0x441
   0x434ed7: HTTP1_Session+0x427
   0x44538e: ses_req_pool_task+0x166
   0x445659: ses_sess_pool_task+0x23b
   0x445c01: SES_pool_accept_task+0x201
   0x43dbca: Pool_Work_Thread+0x442
 req = 0x8e1d70 {
   sp = 0x7f0e2c0065d0, vxid = 1073807362,  step = R_STP_LOOKUP,
   req_body = R_BODY_NONE,
   restarts = 0, esi_level = 0
   sp = 0x7f0e2c0065d0 {
     fd = 25, vxid = 65537,
     client = xx.xx.xx.xx 50957,
     step = S_STP_WORKING,
   },
   worker = 0x7f0cc8e01c50 {
     ws = 0x7f0cc8e01e60 {
       id = "wrk",
       {s,f,r,e} = {0x7f0cc8e01430,0x7f0cc8e01430,(nil),+2048},
     },
   VCL::method = 0x0,
   VCL::return = lookup,
   },
   ws = 0x8e1f00 {
     id = "req",
     {s,f,r,e} = {0x8e3d40,+168,+57392,+57392},
   },
   http[req] = {
     ws = 0x8e1f00[req]
       "GET",
       "/bigfile_cache",
       "HTTP/1.1",
       "User-Agent: Wget/1.13.4 (linux-gnu)",
       "Accept: */*",
       "Host: example.com",
       "Connection: Keep-Alive",
       "X-Forwarded-For: xx.xx.xx.xx",
   },
   vcl = {
     srcname = {
       "input",
       "Builtin",
     },
   },
 },
 }}}

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




More information about the varnish-bugs mailing list