[Varnish] #1858: Stale hit-for-pass objects generating 200 responses with missing content

Varnish varnish-bugs at varnish-cache.org
Thu Feb 18 17:59:16 CET 2016


#1858: Stale hit-for-pass objects generating 200 responses with missing content
-------------------+----------------------
 Reporter:  dmz    |       Type:  defect
   Status:  new    |   Priority:  normal
Milestone:         |  Component:  varnishd
  Version:  4.1.1  |   Severity:  major
 Keywords:         |
-------------------+----------------------
 Varnish is sending an If-Modified-Since header to the backend on stale
 hit-for-pass, then serving backend 304 responses as 200 responses with
 missing content.

 It appears to be related to the changes introduced in https://www.varnish-
 cache.org/trac/changeset/51e0af5ad29b9f1c15958c05b67dccfcb2beb95b/ as
 backing out this changeset fixes the issue.

 There is a simple reproducer, but note that it is timing sensitive (have
 to wait for the object to fall out of hit-for-pass and become stale).

 How to reproduce:

 (Files enclosed, vcl simply sets a default backend, no other behaviour
 modified)

 Varnish listening on 127.0.0.1:80, connecting to an Apache webserver on
 192.168.0.180:80. test.sh script run on the varnish server, requests
 content locally.

 Expected response:

 {{{
 $ ./test.sh
 HTTP/1.1 200 OK
 Date: Thu, 18 Feb 2016 14:52:22 GMT
 Server: Apache
 Last-Modified: Thu, 18 Feb 2016 14:47:12 GMT
 Accept-Ranges: bytes
 Content-Length: 827
 Cache-Control: max-age=0, no-cache, no-store, must-revalidate
 Pragma: no-cache
 Expires: Thu, 1 Jan 1970 00:00:00 GMT
 Content-Type: text/plain; charset=UTF-8
 X-Varnish: 33178
 Age: 0
 Via: 1.1 varnish-v4
 Accept-Ranges: bytes
 Connection: close

     Li Europan lingues es membres del sam familie. Lor separat existentie
 es un myth. Por scientie, musica, sport etc, litot Europa usa li sam
 vocabular. Li lingues differe solmen in li grammatica, li pronunciation e
 li plu commun vocabules. Omnicos directe al desirabilite de un nov lingua
 franca: On refusa continuar payar custosi traductores.
     At solmen va esser necessi far uniform grammatica, pronunciation e plu
 commun paroles. Ma quande lingues coalesce, li grammatica del resultant
 lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov
 lingua franca va esser plu simplic e regulari quam li existent Europan
 lingues. It va esser tam simplic quam Occidental in fact, it va esser
 Occidental. A un Angleso it va semblar un simplificat Angles, quam un
 skeptic Cambridge amico dit me que Occidental es.
 }}}

 Response on error:

 {{{
 $ ./test.sh
 HTTP/1.1 200 OK
 Date: Thu, 18 Feb 2016 14:52:33 GMT
 Server: Apache
 Expires: Thu, 1 Jan 1970 00:00:00 GMT
 Cache-Control: max-age=0, no-cache, no-store, must-revalidate
 Last-Modified: Thu, 18 Feb 2016 14:47:12 GMT
 Accept-Ranges: bytes
 Content-Length: 827
 Pragma: no-cache
 Content-Type: text/plain; charset=UTF-8
 X-Varnish: 434
 Age: 0
 Via: 1.1 varnish-v4
 Accept-Ranges: bytes
 Connection: close
 }}}

 (Note that no content is returned to the client).

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1858>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator



More information about the varnish-bugs mailing list