[Varnish] #128: varnishd dies on the VCL keyword `error`

Varnish varnish-bugs at projects.linpro.no
Wed Jul 18 17:22:50 CEST 2007


#128: varnishd dies on the VCL keyword `error`
----------------------+-----------------------------------------------------
 Reporter:  bartc     |       Owner:  phk        
     Type:  defect    |      Status:  new        
 Priority:  normal    |   Milestone:  Varnish 1.1
Component:  varnishd  |     Version:  trunk      
 Severity:  normal    |    Keywords:             
----------------------+-----------------------------------------------------
 When a `error <code> <reason>` command in VCL gets called, my varnishd
 (from a recent svn checkout) dies. This is the VCL file I'm using:

 {{{
 backend default {
         set backend.host = "127.0.0.1";
         set backend.port = "9678";
 }

 sub vcl_recv {
         if (req.url == "/foo") {
                 error 404 "No";
         }

         lookup;
 }
 }}}

 A normal GET which doesn't trigger the `error` works ok:

 {{{
 $ nc localhost 6081
 GET /test HTTP/1.1
 Host: localhost

 HTTP/1.1 200 OK
 Server: Zope/(Zope 2.9.7-final, python 2.4.4, linux2) ZServer/1.1
 Plone/2.5.3-final
 Date: Wed, 18 Jul 2007 15:05:42 GMT
 Content-Type: text/html; charset=iso-8859-15
 Content-Length: 10
 X-Varnish: 1993066366
 Age: 0
 Via: 1.1 varnish

 Looks ok.
 }}}

 When calling the error statement in the VCL however, Varnish doesn't
 respond:

 {{{
 $ nc localhost 6081
 GET /foo HTTP/1.1
 Host: localhost

 }}}

 No response is returned. The varnishd started with -d -d has the following
 in its output:

 {{{
 >>
 Child said (2, 18788): <<Assert error in http_Write(), cache_http.c line
 977:
   Condition((hp->hd[HTTP_HDR_STATUS].b) != 0) not true.
   errno = 0 (Success)
 >>
 Cache child died pid=18788 status=0x6
 Clean child
 Child cleaned
 status
 CLI <status>
 200 33
 Child in state died, (restarting)
 }}}

 And it stays in that state; subsequent `status` commands show the status
 as `Child in state died, (restarting)` as well.

 I'm using an svn checkout from source:branches/1.1#1714 (revision 1714)

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


More information about the varnish-bugs mailing list