[Varnish] #1213: varnishtop leaks file descriptors and deleted files

Varnish varnish-bugs at varnish-cache.org
Mon Oct 15 13:32:31 CEST 2012

#1213: varnishtop leaks file descriptors and deleted files
 Reporter:  mha    |       Type:  defect
   Status:  new    |   Priority:  normal
Milestone:         |  Component:  varnishtop
  Version:  3.0.3  |   Severity:  normal
 Keywords:         |
 varnishtop leaks an open file descriptor to the shmlog, which makes it not
 go away when varnishd is restarted while varnishtop runs. This is a
 problem e.g. when running with the shmlog on tmpfs with a limited size.

 1. start varnish
 2. start varnishtop
 3. `service varnish restart`
 4. <wait a while>
 5. `lsof /var/lib/varnish` shows varnishtop still has an open fd against
 the old shm-log, and thus it leaks the space

 If you change varnishtop for varnishlog, the problem does not appear - so
 varnishlog deals with it properly. As does varnishtstat. Both close the
 file after a few seconds.

 In my case, it happened on CentOS 6.3 with the Varnish RPMs installed from

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

More information about the varnish-bugs mailing list