[Varnish] #158: include statement makes varnishd crash

Varnish varnish-bugs at projects.linpro.no
Thu Sep 6 17:23:33 CEST 2007


#158: include statement makes varnishd crash
----------------------+-----------------------------------------------------
 Reporter:  anders    |       Owner:  phk                       
     Type:  defect    |      Status:  new                       
 Priority:  normal    |   Milestone:                            
Component:  varnishd  |     Version:  1.1.1                     
 Severity:  normal    |    Keywords:  varnishd include core dump
----------------------+-----------------------------------------------------
 I am running Varnish 1.1.1 (+commit 1913, from ports) on FreeBSD/amd64
 6.2-RELEASE, Intel hardware.

 Using this VCL:

 {{{
 include "/usr/local/etc/varnish/common-backend.vcl";

 acl mypurge {
         "192.168.0.200"/32; /* cache1 */
         "192.168.0.10"/32; /* cacheadmin1 */
         "192.168.0.11"/32; /* cacheadmin2 */
 }

 sub vcl_recv {
         set req.backend = mybe;

         if (req.request == "GET" || req.request == "HEAD") {
                 if (req.http.Expect) {
                         pipe;
                 }
                 if (req.http.Authenticate) {
                         pass;
                 }
                 lookup;
         } elsif (req.request == "PURGE") {
                 if (client.ip ~ mypurge) {
                         lookup;
                 } else {
                         error 405 "Not allowed.";
                 }
         } else {
                 pipe;
         }
 }

 sub vcl_hit {
         if (req.request == "PURGE") {
                 set obj.ttl = 0s;
                 error 200 "Purged.";
         } else {
                 deliver;
         }
 }
 }}}

 In the included file , I have:

 {{{
 backend mybe {
         set backend.host = "192.168.0.30";
         set backend.port = "80";
 }
 }}}

 I am running varnishd with -u root -g wheel, so there should not be any
 problem reading the included file. However, when I try to start Varnish,
 it core dumps:

 root at cache6:~# /usr/local/etc/rc.d/varnishd start
 Starting varnishd.
 varnishd in free(): error: chunk is already free
 Abort trap (core dumped)

 The backtrace gives me:

 {{{
 # gdb -c varnishd.core -s /usr/local/sbin/varnishd
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you
 are
 welcome to change it and/or distribute copies of it under certain
 conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for
 details.
 This GDB was configured as "amd64-marcel-freebsd"...
 Core was generated by `varnishd'.
 Program terminated with signal 6, Aborted.
 #0  0x0000000800c802dc in ?? ()
 (gdb) bt
 #0  0x0000000800c802dc in ?? ()
 #1  0x000000080098502e in ?? ()
 #2  0x00007fffffffe35c in ?? ()
 #3  0x0000000800c7f16d in ?? ()
 #4  0x0000000800c81f0c in ?? ()
 #5  0xffffffdf00000016 in ?? ()
 #6  0xffffffffffffffff in ?? ()
 #7  0x00000000ffffffff in ?? ()
 #8  0x000000000053a1c0 in ?? ()
 #9  0x0000000800c85810 in ?? ()
 #10 0x000000000053a1c0 in ?? ()
 #11 0x0000000800c18b45 in ?? ()
 #12 0x0000000800c8589d in ?? ()
 #13 0x0000000800c18b7c in ?? ()
 #14 0x000000000053a1c0 in ?? ()
 #15 0x0000000800c8589d in ?? ()
 #16 0x0000000800dbd528 in ?? ()
 #17 0x0000000800c19b1d in ?? ()
 #18 0x0000000000000000 in ?? ()
 #19 0x0000000000004ea0 in ?? ()
 #20 0x0000000000000000 in ?? ()
 #21 0x0000000800c19dd2 in ?? ()
 #22 0x0000000800557200 in ?? ()
 #23 0x0000000800877bb0 in ?? ()
 #24 0x000000010097c910 in ?? ()
 #25 0x000000000053c160 in ?? ()
 #26 0xfffffff7ffcdf405 in ?? ()
 #27 0x00000000ffffffff in ?? ()
 #28 0x0000000800666660 in ?? ()
 #29 0x000000000053c160 in ?? ()
 #30 0x000000000053c160 in ?? ()
 #31 0x0000000000000017 in ?? ()
 #32 0x00007fffffffe480 in ?? ()
 #33 0x00007fffffffead8 in ?? ()
 #34 0x0000000000000000 in ?? ()
 #35 0x0000000000000017 in ?? ()
 #36 0x00007fffffffe4b0 in ?? ()
 #37 0x00007fffffffead8 in ?? ()
 #38 0x0000000000000000 in ?? ()
 #39 0x0000000000000000 in ?? ()
 #40 0x0000000000000000 in ?? ()
 #41 0x00000008008706ef in ?? ()
 #42 0x0000000000000000 in ?? ()
 #43 0x0000000000000000 in ?? ()
 #44 0x0000000000000000 in ?? ()
 #45 0x000000000053c320 in ?? ()
 #46 0x0000000000558000 in ?? ()
 #47 0x000000000053b600 in ?? ()
 #48 0x00007fffffffe4f0 in ?? ()
 ---Type <return> to continue, or q <return> to quit---
 #49 0x0000000800870cd8 in ?? ()
 #50 0x00007fffffffead8 in ?? ()
 #51 0x0000000a005373dd in ?? ()
 #52 0x0000000000558000 in ?? ()
 #53 0x000000000053b600 in ?? ()
 #54 0x0000000000543f00 in ?? ()
 #55 0x000000000053c140 in ?? ()
 #56 0x00007fffffffe530 in ?? ()
 #57 0x0000000800870d95 in ?? ()
 #58 0x0000000000000003 in ?? ()
 #59 0x0000000000000003 in ?? ()
 #60 0x000000000053a0c0 in ?? ()
 #61 0x0000000300000202 in ?? ()
 #62 0x00007fffffffedae in ?? ()
 #63 0x000000000053c140 in ?? ()
 #64 0x00007fffffffe570 in ?? ()
 #65 0x0000000000421c9e in mgt_VccCompileFile (sb=Cannot access memory at
 address 0x800c85808
 ) at mgt_vcc.c:268
 Previous frame inner to this frame (corrupt stack?)
 (gdb)
 }}}

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/158>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list