[Varnish] #164: Varnishd core dumps because of segmentation violation

Varnish varnish-bugs at projects.linpro.no
Mon Oct 1 09:08:44 CEST 2007


#164: Varnishd core dumps because of segmentation violation
----------------------+-----------------------------------------------------
 Reporter:  anders    |       Owner:  phk               
     Type:  defect    |      Status:  new               
 Priority:  normal    |   Milestone:                    
Component:  varnishd  |     Version:  trunk             
 Severity:  normal    |    Keywords:  varnishd core dump
----------------------+-----------------------------------------------------
 I am running Varnish trunk (up to date to commit 2030) in FreeBSD
 6.2-RELEASE-p7/amd64, on Intel hardware (OS and Varnish built with -g and
 no stripping).

 After running for five hours, with high load and 1 million objects in the
 cache, child died:

 Sep 30 19:27:26 cache12 kernel: pid 925 (varnishd), uid 0: exited on
 signal 11 (core dumped)

 On the console I got:

 {{{
 Cache child died pid=925 status=0x8b
 Clean child
 Child cleaned
 }}}

 My VCL:

 {{{
 backend default {
              set backend.host = "192.168.0.3";
              set backend.port = "80";
         }
 acl purge {
         "192.168.0.4"/32;
 }
 sub vcl_recv {
         if ((req.http.host ~ "^(cache.finn.no|finn.no|www.finn.no)$") ||
 (req.http.host == "banner.finn.no" && req.url ~
 "^/(jsp2|finn/gojsp|daily|board|auximg/papirfly|finn/cacheable|crossdomain.xml)"))
 {
                 if (req.request == "GET" || req.request == "HEAD") {
                         lookup;
                 } elsif (req.request == "PURGE") {
                         if (!client.ip ~ purge) {
                                 error 405 "Not allowed.";
                         }
                         lookup;
                 } else {
                         pipe;
                 }
         } else {
                 error 403 "Access denied. Contact cacheadmin at finn.no if
 you have problems.";
         }
 }
 sub vcl_miss {
         if (req.request == "PURGE") {
                 error 404 "Not in cache.";
         } else {
                 fetch;
         }
 }
 sub vcl_hit {
         if (req.request == "PURGE") {
                 set obj.ttl = 0s;
                 error 200 "Purged.";
         } else {
                 deliver;
         }
 }
 sub vcl_fetch {
         if (obj.ttl < 86400s) {
                 set obj.ttl = 604800s;
         }
         if (obj.http.Cookie) {
                 remove obj.http.Cookie;
         }
         if (obj.http.Set-Cookie) {
                 remove obj.http.Set-Cookie;
         }
         insert;
 }
 }}}

 Backtracing the core dump, I get:

 {{{
 root at cache12:/usr/local/var/varnish/cache12.finn.no# 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 11, Segmentation fault.
 #0  CNT_Session (sp=0xa2e03008) at cache_center.c:388
 388             sp->wrk->acct.sess++;
 (gdb) bt
 #0  CNT_Session (sp=0xa2e03008) at cache_center.c:388
 #1  0x00000000004153f9 in wrk_thread (priv=0xa2e03008) at cache_pool.c:192
 #2  0x0000000800991c71 in ?? ()
 #3  0x0000000000000000 in ?? ()
 #4  0x00007fffd84c3fd8 in ?? ()
 #5  0x0000000800aa0b40 in ?? ()
 #6  0x00000000915f7200 in ?? ()
 #7  0x0000000000000000 in ?? ()
 #8  0x00007ffffb5dd000 in ?? ()
 Cannot access memory at address 0x7ffffb7dd000
 (gdb)
 }}}

 This ticket may be the same problem as #142.

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


More information about the varnish-bugs mailing list