[Varnish] #1792: If few free space and file-storage on xfs, Varnish does not restart.

Varnish varnish-bugs at varnish-cache.org
Mon Sep 14 17:24:24 CEST 2015


#1792: If few free space and file-storage on xfs, Varnish does not restart.
----------------------+--------------------------
 Reporter:  xcir      |       Owner:
     Type:  defect    |      Status:  new
 Priority:  normal    |   Milestone:
Component:  varnishd  |     Version:  4.1.0-beta1
 Severity:  normal    |  Resolution:
 Keywords:            |
----------------------+--------------------------

Comment (by xcir):

 --Test code
 {{{
 root at varnish-trunk:~/varnish-4.1.0-beta1- diff -up
 lib/libvarnish/vfil.c.org lib/libvarnish/vfil.c
 --- lib/libvarnish/vfil.c.org   2015-09-14 23:59:00.228175000 +0900
 +++ lib/libvarnish/vfil.c       2015-09-15 00:09:22.568175000 +0900
 @@ -56,6 +56,7 @@
  -include "vdef.h"
  -include "vfil.h"

 +-include <syslog.h>
  char *
  VFIL_readfd(int fd, ssize_t *sz)
  {
 @@ -182,9 +183,14 @@ VFIL_allocate(int fd, off_t size, int in
                 errno = ENOSPC;
                 return (-1);
         }
 +syslog(6,"VFIL:A:st_blocks*512:%ld st_size:%ld free-space:%ld require-
 size:%ld errno:%d",st.st_blocks * 512, st.st_size, fsspace ,size,errno);
 +//     if(st.st_blocks * 512 >= st.st_size)
 +//             return (0);
  -ifdef HAVE_FALLOCATE
         if (!fallocate(fd, 0, 0, size))
                 return (0);
 +syslog(6,"VFIL:B:st_blocks*512:%ld st_size:%ld free-space:%ld require-
 size:%ld errno:%d",st.st_blocks * 512, st.st_size, fsspace ,size,errno);
 +
         if (errno == ENOSPC)
                 return (-1);
  -endif
 }}}

 -xfs[[BR]]
 --Start(1st)
 {{{
 Sep 15 00:04:00 varnish-trunk varnishd: VFIL:A:st_blocks*512:0
 st_size:10737418240 free-space:16061923328 require-size:10737418240
 errno:0
 Sep 15 00:04:00 varnish-trunk varnishd[9463]: Platform:
 Linux,3.13.0-49-generic,x86_64,-junix,-smalloc,-sfile,-smalloc,-hcritbit
 Sep 15 00:04:00 varnish-trunk varnishd[9463]: VFIL:A:st_blocks*512:0
 st_size:84934656 free-space:95130189824 require-size:84934656 errno:0
 Sep 15 00:04:00 varnish-trunk varnishd[9463]: child (9465) Started
 Sep 15 00:04:00 varnish-trunk varnishd[9463]: Child (9465) said Child
 starts
 Sep 15 00:04:00 varnish-trunk varnishd[9463]: Child (9465) said SMF.xfs
 mmap'ed 10737418240 bytes of 10737418240
 }}}

 --Restart(Fail)
 {{{
 Sep 15 00:04:17 varnish-trunk varnishd: VFIL:A:st_blocks*512:10737418240
 st_size:10737418240 free-space:5324505088 require-size:10737418240
 errno:17
 Sep 15 00:04:17 varnish-trunk varnishd: VFIL:B:st_blocks*512:10737418240
 st_size:10737418240 free-space:5324505088 require-size:10737418240
 errno:28
 }}}

 --Stop and Start(Fail)[[BR]]
 ---Stop
 {{{
 Sep 15 00:04:36 varnish-trunk varnishd[9463]: Manager got SIGINT
 Sep 15 00:04:36 varnish-trunk varnishd[9463]: Stopping Child
 Sep 15 00:04:37 varnish-trunk varnishd[9463]: Child (9465) ended
 Sep 15 00:04:37 varnish-trunk varnishd[9463]: VFIL:A:st_blocks*512:0
 st_size:84934656 free-space:95130189824 require-size:84934656 errno:0
 Sep 15 00:04:37 varnish-trunk varnishd[9463]: Child (9465) said Child dies
 Sep 15 00:04:37 varnish-trunk varnishd[9463]: Child cleanup complete
 }}}
 ---Start(Fail)
 {{{
 Sep 15 00:04:40 varnish-trunk varnishd: VFIL:A:st_blocks*512:10737418240
 st_size:10737418240 free-space:5324505088 require-size:10737418240
 errno:17
 Sep 15 00:04:40 varnish-trunk varnishd: VFIL:B:st_blocks*512:10737418240
 st_size:10737418240 free-space:5324505088 require-size:10737418240
 errno:28
 }}}

 -ext4[[BR]]
 --Start(1st)
 {{{
 Sep 15 00:12:35 varnish-trunk varnishd: VFIL:A:st_blocks*512:0
 st_size:10737418240 free-space:14857797632 require-size:10737418240
 errno:0
 Sep 15 00:12:35 varnish-trunk varnishd[10056]: Platform:
 Linux,3.13.0-49-generic,x86_64,-junix,-smalloc,-sfile,-smalloc,-hcritbit
 Sep 15 00:12:35 varnish-trunk varnishd[10056]: VFIL:A:st_blocks*512:0
 st_size:84934656 free-space:95130181632 require-size:84934656 errno:0
 Sep 15 00:12:35 varnish-trunk varnishd[10056]: child (10058) Started
 Sep 15 00:12:35 varnish-trunk varnishd[10056]: Child (10058) said Child
 starts
 Sep 15 00:12:35 varnish-trunk varnishd[10056]: Child (10058) said SMF.ext4
 mmap'ed 10737418240 bytes of 10737418240
 }}}

 --Restart(Success)
 {{{
 Sep 15 00:12:51 varnish-trunk varnishd: VFIL:A:st_blocks*512:10737422336
 st_size:10737418240 free-space:4120375296 require-size:10737418240
 errno:17
 Sep 15 00:12:51 varnish-trunk varnishd[10056]: Manager got SIGINT
 Sep 15 00:12:51 varnish-trunk varnishd[10056]: Stopping Child
 Sep 15 00:12:52 varnish-trunk varnishd[10056]: Child (10058) ended
 Sep 15 00:12:52 varnish-trunk varnishd[10056]: VFIL:A:st_blocks*512:0
 st_size:84934656 free-space:95130173440 require-size:84934656 errno:0
 Sep 15 00:12:52 varnish-trunk varnishd[10056]: Child (10058) said Child
 dies
 Sep 15 00:12:52 varnish-trunk varnishd[10056]: Child cleanup complete
 Sep 15 00:12:52 varnish-trunk varnishd: VFIL:A:st_blocks*512:10737422336
 st_size:10737418240 free-space:4120375296 require-size:10737418240
 errno:17
 Sep 15 00:12:52 varnish-trunk varnishd[10350]: Platform:
 Linux,3.13.0-49-generic,x86_64,-junix,-smalloc,-sfile,-smalloc,-hcritbit
 Sep 15 00:12:52 varnish-trunk varnishd[10350]: VFIL:A:st_blocks*512:0
 st_size:84934656 free-space:95130173440 require-size:84934656 errno:0
 Sep 15 00:12:52 varnish-trunk varnishd[10350]: child (10352) Started
 Sep 15 00:12:52 varnish-trunk varnishd[10350]: Child (10352) said Child
 starts
 Sep 15 00:12:52 varnish-trunk varnishd[10350]: Child (10352) said SMF.ext4
 mmap'ed 10737418240 bytes of 10737418240
 }}}
 --Stop and Start(Success)[[BR]]
 ---Stop
 {{{
 Sep 15 00:14:38 varnish-trunk varnishd[10350]: Manager got SIGINT
 Sep 15 00:14:38 varnish-trunk varnishd[10350]: Stopping Child
 Sep 15 00:14:39 varnish-trunk varnishd[10350]: Child (10352) ended
 Sep 15 00:14:39 varnish-trunk varnishd[10350]: VFIL:A:st_blocks*512:0
 st_size:84934656 free-space:95130181632 require-size:84934656 errno:0
 Sep 15 00:14:39 varnish-trunk varnishd[10350]: Child (10352) said Child
 dies
 Sep 15 00:14:39 varnish-trunk varnishd[10350]: Child cleanup complete
 }}}
 ---Start(Success)
 {{{
 Sep 15 00:14:52 varnish-trunk varnishd: VFIL:A:st_blocks*512:10737422336
 st_size:10737418240 free-space:4120375296 require-size:10737418240
 errno:17
 Sep 15 00:14:52 varnish-trunk varnishd[10662]: Platform:
 Linux,3.13.0-49-generic,x86_64,-junix,-smalloc,-sfile,-smalloc,-hcritbit
 Sep 15 00:14:52 varnish-trunk varnishd[10662]: VFIL:A:st_blocks*512:0
 st_size:84934656 free-space:95130181632 require-size:84934656 errno:0
 Sep 15 00:14:52 varnish-trunk varnishd[10662]: child (10664) Started
 Sep 15 00:14:52 varnish-trunk varnishd[10662]: Child (10664) said Child
 starts
 Sep 15 00:14:52 varnish-trunk varnishd[10662]: Child (10664) said SMF.ext4
 mmap'ed 10737418240 bytes of 10737418240
 }}}

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



More information about the varnish-bugs mailing list