Mailing List Archive

#1858: Stale hit-for-pass objects generating 200 responses with missing content
#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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1858: Stale hit-for-pass objects generating 200 responses with missing content [ In reply to ]
#1858: Stale hit-for-pass objects generating 200 responses with missing content
----------------------+--------------------
Reporter: dmz | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.1
Severity: major | Resolution:
Keywords: |
----------------------+--------------------

Comment (by fgsch):

Varnish should not send an IMS request for hit-for-pass objects.

Testcase in .vtc format attached.

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1858: Stale hit-for-pass objects generating 200 responses with missing content [ In reply to ]
#1858: Stale hit-for-pass objects generating 200 responses with missing content
----------------------+--------------------
Reporter: dmz | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.1
Severity: major | Resolution:
Keywords: |
----------------------+--------------------

Comment (by dmz):

Confirm fail when enforcing the expect line in this test case. Without the
enforce, test will pass with IMS sent to server (issues same response
regardless of query).

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1858: Stale hit-for-pass objects generating 200 responses with missing content [ In reply to ]
#1858: Stale hit-for-pass objects generating 200 responses with missing content
----------------------+---------------------
Reporter: dmz | Owner: martin
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.1
Severity: major | Resolution:
Keywords: |
----------------------+---------------------
Changes (by martin):

* owner: => martin


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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1858: Stale hit-for-pass objects generating 200 responses with missing content [ In reply to ]
#1858: Stale hit-for-pass objects generating 200 responses with missing content
----------------------+---------------------
Reporter: dmz | Owner: martin
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.1
Severity: major | Resolution: fixed
Keywords: |
----------------------+---------------------
Changes (by Martin Blix Grydeland <martin@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [1f37998adbc5e68d0b20006436d9bef226ca9bdc]:
{{{
#!CommitTicketReference repository=""
revision="1f37998adbc5e68d0b20006436d9bef226ca9bdc"
Hit-for-pass objects are not IMS candidates

Original test case by fgsch

Fixes: #1858
}}}

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1858: Stale hit-for-pass objects generating 200 responses with missing content [ In reply to ]
#1858: Stale hit-for-pass objects generating 200 responses with missing content
----------------------+---------------------
Reporter: dmz | Owner: martin
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.1
Severity: major | Resolution: fixed
Keywords: |
----------------------+---------------------

Comment (by Martin Blix Grydeland <martin@…>):

In [4f2af500ee64091e8a7c17a2a68026ae8920804c]:
{{{
#!CommitTicketReference repository=""
revision="4f2af500ee64091e8a7c17a2a68026ae8920804c"
Hit-for-pass objects are not IMS candidates

Original test case by fgsch

Fixes: #1858
}}}

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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs