[Varnish] #1224: Long backend name asserts the varnishd child

Varnish varnish-bugs at varnish-cache.org
Fri Oct 26 12:39:20 CEST 2012


#1224: Long backend name asserts the varnishd child
----------------------+--------------------
 Reporter:  lkarsten  |       Owner:
     Type:  defect    |      Status:  new
 Priority:  normal    |   Milestone:
Component:  build     |     Version:  3.0.3
 Severity:  normal    |  Resolution:
 Keywords:            |
----------------------+--------------------
Description changed by lkarsten:

Old description:

> If a user creates a VCL with a backend name which is really long, the VCL
> compiler happily compiles the VCL but the Varnish child process asserts.
>
> According to the source the limit is 44 characters. (untested)
>
> {{{
> lkarsten at immer:~$ cat longname.vcl
>
> backend abcdefghijklmnopqrstuvwxyz__abcdefghijklmnopqrstuvwxyz {
> .host="127.0.0.1"; .port="8080"; }
>
> sub vcl_recv {
>     error 200 "OK";
> }
> }}}
>
> When running varnishd:
> {{{
> lkarsten at immer:~$ /opt/varnish/sbin/varnishd -n fo -F -a :1400 -f
> longname.vcl
>
> Message from dlopen:
> Not running as root, no priv-sep
> child (2384) Started
> Pushing vcls failed:
> CLI communication error (hdr)
> Stopping Child
> Child (2384) died signal=6
> Child (2384) Panic message: Assert error in VSM__Alloc(), vsm.c line 185:
>   Condition(snprintf(sha->ident, sizeof sha->ident, "%s", ident) < sizeof
> sha->ident) not true.
> thread = (cache-main)
> ident = Linux,3.2.0-3-amd64,x86_64,-sfile,-smalloc,-hcritbit,no_waiter
> Backtrace:
>   0x43ce88: pan_backtrace+28
>   0x43d17a: pan_ic+1bd
>   0x46b557: VSM__Alloc+2d6
>   0x4443c2: VSM_Alloc+78
>   0x4134b9: VBE_AddBackend+433
>   0x41284b: VRT_init_dir_simple+1b6
>   0x4139b6: VRT_init_dir+95
>   0x7fa1a87fc843: _end+7fa1a815cad3
>   0x4456d3: VCL_Load+244
>   0x445cd5: ccf_config_load+87
>

> Child (-1) said Not running as root, no priv-sep
> Child (-1) said Child starts
> Child (-1) said SMF.s0 mmap'ed 104857600 bytes of 104857600
> Child cleanup complete
> manager dies
> }}
>
> Discovered by Abhishek Kumar.

New description:

 If a user creates a VCL with a backend name which is really long, the VCL
 compiler happily compiles the VCL but the Varnish child process asserts.

 According to the source the limit is 44 characters. (untested)

 {{{
 lkarsten at immer:~$ cat longname.vcl

 backend abcdefghijklmnopqrstuvwxyz__abcdefghijklmnopqrstuvwxyz {
 .host="127.0.0.1"; .port="8080"; }

 sub vcl_recv {
     error 200 "OK";
 }
 }}}

 When running varnishd:
 {{{
 lkarsten at immer:~$ /opt/varnish/sbin/varnishd -n fo -F -a :1400 -f
 longname.vcl

 Message from dlopen:
 Not running as root, no priv-sep
 child (2384) Started
 Pushing vcls failed:
 CLI communication error (hdr)
 Stopping Child
 Child (2384) died signal=6
 Child (2384) Panic message: Assert error in VSM__Alloc(), vsm.c line 185:
   Condition(snprintf(sha->ident, sizeof sha->ident, "%s", ident) < sizeof
 sha->ident) not true.
 thread = (cache-main)
 ident = Linux,3.2.0-3-amd64,x86_64,-sfile,-smalloc,-hcritbit,no_waiter
 Backtrace:
   0x43ce88: pan_backtrace+28
   0x43d17a: pan_ic+1bd
   0x46b557: VSM__Alloc+2d6
   0x4443c2: VSM_Alloc+78
   0x4134b9: VBE_AddBackend+433
   0x41284b: VRT_init_dir_simple+1b6
   0x4139b6: VRT_init_dir+95
   0x7fa1a87fc843: _end+7fa1a815cad3
   0x4456d3: VCL_Load+244
   0x445cd5: ccf_config_load+87


 Child (-1) said Not running as root, no priv-sep
 Child (-1) said Child starts
 Child (-1) said SMF.s0 mmap'ed 104857600 bytes of 104857600
 Child cleanup complete
 manager dies
 }}}

 Discovered by Abhishek Kumar.

--

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




More information about the varnish-bugs mailing list