[Varnish] #1006: varnishncsa stops with no apparent reason

Varnish varnish-bugs at varnish-cache.org
Fri Sep 2 15:44:20 CEST 2011


#1006: varnishncsa stops with no apparent reason
-------------------------------+--------------------------------------------
 Reporter:  tmagnien           |        Type:  defect     
   Status:  new                |    Priority:  normal     
Milestone:                     |   Component:  varnishncsa
  Version:  3.0.1              |    Severity:  normal     
 Keywords:  varnishncsa stops  |  
-------------------------------+--------------------------------------------

Comment(by tmagnien):

 Well, finally got it to crash while attached to a gdb :


 {{{
 Program received signal SIGABRT, Aborted.
 [Switching to Thread 0x7fb09bfc56e0 (LWP 1661)]
 0x00007fb09b24ded5 in raise () from /lib/libc.so.6
 (gdb) bt
 #0  0x00007fb09b24ded5 in raise () from /lib/libc.so.6
 #1  0x00007fb09b24f3f3 in abort () from /lib/libc.so.6
 #2  0x00007fb09b246dc9 in __assert_fail () from /lib/libc.so.6
 #3  0x000000000040370b in collect_client (lp=0x620050, tag=SLT_RxHeader,
     spec=<value optimized out>, ptr=0x7fb096efcb54 "#", len=<value
 optimized out>)
     at varnishncsa.c:453
 #4  0x0000000000403877 in h_ncsa (priv=0x7fb09b569780, tag=SLT_RxHeader,
 fd=<value optimized out>,
     len=7, spec=1, ptr=0x7fb096efcb54 "#", bitmap=0) at varnishncsa.c:558
 #5  0x00007fb09b9ab3c1 in VSL_Dispatch () from /usr/lib/libvarnishapi.so.1
 #6  0x00000000004028c4 in main (argc=4, argv=0x7fffa3fd1c78) at
 varnishncsa.c:881

 }}}


 So the code block that fails is :


 {{{
         case SLT_TxHeader:
         case SLT_RxHeader:
                 if (!lp->active)
                         break;
                 if (tag == SLT_RxHeader &&
                     isprefix(ptr, "authorization:", end, &next) &&
                     isprefix(next, "basic", end, &next)) {
                         free(lp->df_u);
                         lp->df_u = trimline(next, end);
                 } else {
                         struct hdr *h;
                         const char *split;
                         h = malloc(sizeof(struct hdr));
                         AN(h);
                         split = strchr(ptr, ':');
                         AN(split);
                         h->key = trimline(ptr, split);
                         h->value = trimline(split+1, end);
                         if (tag == SLT_RxHeader)
                                 VTAILQ_INSERT_HEAD(&lp->req_headers, h,
 list);
                         else
                                 VTAILQ_INSERT_HEAD(&lp->resp_headers, h,
 list);
                 }
                 break;

 }}}

 And it fails at:


 {{{
 AN(split);
 }}}

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




More information about the varnish-bugs mailing list