[Varnish] #971: Broken DNS director

Varnish varnish-bugs at varnish-cache.org
Thu Aug 4 16:07:38 CEST 2011


#971: Broken DNS director
-------------------+--------------------------------------------------------
 Reporter:  rdvn   |        Type:  defect  
   Status:  new    |    Priority:  normal  
Milestone:         |   Component:  build   
  Version:  3.0.0  |    Severity:  critical
 Keywords:         |  
-------------------+--------------------------------------------------------

Comment(by rdvn):

 I used this VCL for testing/generating the core dump. But first I found
 this out I was using my production VCL, which was working OK on Varnish
 2.1.3. Of course, after making needed modifications.

 It segfaults right after trying to use VCL. Attaching strace output.

 {{{
 backend default {
   .host = "127.0.0.1";
   .port = "80";
 }

 director test dns {
   .list = {
     .port = "80";
     "192.168.16.128"/25;
   }
   .ttl = 15m;
 }

 sub vcl_recv {
     if (req.restarts == 0) {
         if (req.http.x-forwarded-for) {
             set req.http.X-Forwarded-For =
                 req.http.X-Forwarded-For + ", " + client.ip;
         } else {
             set req.http.X-Forwarded-For = client.ip;
         }
     }

     set req.backend = test;

     if (req.request != "GET" &&
       req.request != "HEAD" &&
       req.request != "PUT" &&
       req.request != "POST" &&
       req.request != "TRACE" &&
       req.request != "OPTIONS" &&
       req.request != "DELETE") {
         /* Non-RFC2616 or CONNECT which is weird. */
         return (pipe);
     }
     if (req.request != "GET" && req.request != "HEAD") {
         /* We only deal with GET and HEAD by default */
         return (pass);
     }
     if (req.http.Authorization || req.http.Cookie) {
         /* Not cacheable by default */
         return (pass);
     }
     return (lookup);
 }
 }}}

 {{{
 [pid  1619] writev(13, [{"200 36      \n", 13}, {"Loaded
 \"./vcl.bDmyBp0R.so\" as \"b"..., 36}, {"\n", 1}], 3 <unfinished ...>
 [pid  1621] set_robust_list(0x7fd42bdf19e0, 0x18) = 0
 [pid  1623] set_robust_list(0x7fd42a7fe9e0, 0x18) = 0
 [pid  1623] nanosleep({180, 0},  <unfinished ...>
 [pid  1622] set_robust_list(0x7fd42b1ff9e0, 0x18) = 0
 [pid  1622] nanosleep({1, 0},  <unfinished ...>
 [pid  1624] set_robust_list(0x7fd429dfd9e0, 0x18) = 0
 [pid  1624] nanosleep({0, 10000000},  <unfinished ...>
 [pid  1596] <... poll resumed> )        = 1 ([{fd=12, revents=POLLIN}])
 [pid  1596] read(12, "200 36      \n", 13) = 13
 [pid  1596] poll([{fd=12, events=POLLIN}], 1, 10000) = 1 ([{fd=12,
 revents=POLLIN}])
 [pid  1596] read(12, "Loaded \"./vcl.bDmyBp0R.so\" as \"b"..., 37) = 37
 [pid  1596] write(11, "vcl.use \"boot\"\n", 15) = 15
 [pid  1596] poll([{fd=12, events=POLLIN}], 1, 10000 <unfinished ...>
 [pid  1619] <... writev resumed> )      = 50
 [pid  1619] poll([{fd=10, events=POLLIN}], 1, -1) = 1 ([{fd=10,
 revents=POLLIN}])
 [pid  1619] read(10, "vcl.use \"boot\"\n", 8191) = 15
 [pid  1619] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
 }}}

-- 
Ticket URL: <http://varnish-cache.org/trac/ticket/971#comment:3>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list