[Varnish] #1053: Persistent storage: space leakage

Varnish varnish-bugs at varnish-cache.org
Tue Nov 8 16:39:30 CET 2011

#1053: Persistent storage: space leakage
 Reporter:  dumbbell  |        Type:  defect  
   Status:  new       |    Priority:  normal  
Milestone:            |   Component:  varnishd
  Version:  trunk     |    Severity:  major   
 Keywords:            |  

Comment(by dumbbell):

 I forgot to mention how I tested the patch...

 In smp_open_segs(), I added the following printf, to know where new
 segments will be stored after the silo is reloaded:
 printf("Free offset: %lu\n", sc->free_offset);
 (after line 180 in source:bin/varnishd/storage/storage_persistent.c).

 I then started with a freshly created silo of 5Mb and used curl(1) to fill
 the cache.

  * With an unpatched Varnish, the maximum free offset decreases after each
 complete "rewrite" of the silo. This continues until this maximum free
 offset is too low and the process pan_ic() (caused by "`assert (l >=
 sc->free_reserve);`"): there's not `free_reserve` bytes between "`se`" and
 the element closest to the end of the silo AND not `free_reserve` bytes
 between the first offset (sc->ident->stuff[SMP_SPC_STUFF]) and "se".
  * With a patched Varnish, the maximum free offset stays around

 I confirmed this with a bigger silo (1Gb) and more clients/requests.

Ticket URL: <https://www.varnish-cache.org/trac/ticket/1053#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list