New issue 107 by pyromania: storeLocateVary: Not our vary marker object
http://code.google.com/p/lusca-cache/issues/detail?id=107
What steps will reproduce the problem?
1. Unknown
2.
3.
What is the expected output? What do you see instead?
No error in cache log.
What version of the product are you using? On what operating system?
LUSCA_HEAD-r14535 Debian 5.0.1
Please provide any additional information below.
The error always mentions accept-encoding="gzip,deflate so I'm wondering
if its related to Gzip compression. It happends very frequently with 400
users on the proxy.
2010/04/12 21:37:14| storeLocateVary: Not our vary marker object,
7642FF1728147A73DA9064A2C33837ED
= 'http://an.tacoda.net/an/cda1.js', 'accept-encoding="gzip,%
20deflate"'/'gzip, deflate'
2010/04/12 21:37:14| storeLocateVary: Not our vary marker object,
A734F7F48C13B221F0A44E8AD841DA0D
= 'http://an.tacoda.net/an/tpp.html', 'accept-encoding="gzip,%
20deflate"'/'gzip, deflate'
2010/04/12 21:37:15| storeLocateVary: Not our vary marker object,
E80B968A159BB3AC276995C5C6C452B6
= 'http://an.tacoda.net/an/tpp3.js', 'accept-encoding="gzip,%
20deflate"'/'gzip, deflate'
2010/04/12 21:37:23| storeLocateVary: Not our vary marker object,
F6E05E2A9971D86A87E7100BCE85CB3D
= 'http://s7.addthis.com/js/250/addthis_widget.js', 'accept-
encoding="gzip,deflate,sdch"'/'gzip,deflate,sdch'
2010/04/12 21:38:06| idnsReadTcp: Short response from nameserver 1 for
afv.pplive.com.
2010/04/12 21:38:09| storeLocateVary: Not our vary marker object,
BF1F675396CC7206A74B9FE5C1FA172A
= 'http://static.ak.fbcdn.net/rsrc.php/zBCZC/hash/6iwl7nqi.css', 'accept-
encoding="gzip,%20deflate"'/'gzip, deflate'
2010/04/12 21:38:21| storeLocateVary: Not our vary marker object,
38A7AB8DA5F761ADE6E77A62CEB908B6
= 'http://static.ak.fbcdn.net/rsrc.php/z70NZ/hash/cqp62s8o.js', 'accept-
encoding="gzip,%20deflate"'/'gzip, deflate'
2010/04/12 21:38:22| storeLocateVary: Not our vary marker object,
1E739F7CA9D4E9AE1CCE98CC4994C539
= 'http://static.ak.fbcdn.net/rsrc.php/z2KLB/hash/68rhih7w.css', 'accept-
encoding="gzip,%20deflate"'/'gzip, deflate'
2010/04/12 21:38:22| storeLocateVary: Not our vary marker object,
10E345FBE0F121942E59FBFF9CE4606F
= 'http://static.ak.fbcdn.net/rsrc.php/z5DUA/hash/d2f1n3c0.js', 'accept-
encoding="gzip,%20deflate"'/'gzip, deflate'
2010/04/12 21:38:22| storeLocateVary: Not our vary marker object,
38A7AB8DA5F761ADE6E77A62CEB908B6
= 'http://static.ak.fbcdn.net/rsrc.php/z70NZ/hash/cqp62s8o.js', 'accept-
encoding="gzip,%20deflate"'/'gzip, deflate'
2010/04/12 21:38:22| storeLocateVary: Not our vary marker object,
BA7716649EC1EAB1EDC2BEB786B59ADC
= 'http://static.ak.fbcdn.net/rsrc.php/z7LZY/hash/5vjds43u.js', 'accept-
encoding="gzip,%20deflate"'/'gzip, deflate'
2010/04/12 21:38:23| storeLocateVary: Not our vary marker object,
180BB5BF6F1311E8A95356186A410F19
= 'http://static.ak.fbcdn.net/rsrc.php/z6F6I/hash/bxdm2bja.js', 'accept-
encoding="gzip,%20deflate"'/'gzip, deflate'
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Hi,
Please apply the attached patch and get back to me. I'm trying to
understand exactly what conditions occur for this to happen.
This patch logs the vary marker header which it's comparing against. I
really would like to see what it thinks the content-type is.
Attachments:
store-vary.1.diff 1.1 KB
After applying the patch Squid started to restart frequently after 10 ~ 20
minutes
inspecting the cache.log i got
2010/06/26 17:39:38| clientTryParseRequest: FD 321 (81.25.139.16:38143)
Invalid Request
2010/06/26 17:39:38| clientTryParseRequest: FD 197 (81.25.139.16:38142)
Invalid Request
2010/06/26 17:40:40| clientTryParseRequest: FD 166 (81.25.139.16:19099)
Invalid Request
2010/06/26 17:41:07| clientTryParseRequest: FD 329 (81.25.139.16:4113)
Invalid Request
2010/06/26 17:41:07| clientTryParseRequest: FD 126 (81.25.139.16:4114)
Invalid Request
2010/06/26 17:41:11| clientTryParseRequest: FD 222 (81.25.139.16:19102)
Invalid Request
2010/06/26 17:41:14| storeLocateVary: Not our vary marker object,
5628A2D8E10D67485240C2363E98EB9E
= 'http://static.ak.fbcdn.net/rsrc.php/z3J8R/hash/en6wnfcw.css',
vary_data='accept-encoding="gzip,deflate,sdch"' ;
accept_encoding='gzip,deflate,sdch'
2010/06/26 17:41:14| storeLocateVary: local content type: 'FATAL: Received
Segment Violation...dying.
2010/06/26 17:41:14| storeDirWriteCleanLogs: Starting...
2010/06/26 17:41:14| WARNING: Closing open FD 101
2010/06/26 17:41:14| commSetEvents: epoll_ctl(EPOLL_CTL_DEL): failed on
fd=101: (1) Operation not permitted
2010/06/26 17:41:14| 65536 entries written so far.
2010/06/26 17:41:14| 131072 entries written so far.
2010/06/26 17:41:14| 196608 entries written so far.
2010/06/26 17:41:14| 262144 entries written so far.
2010/06/26 17:41:14| 327680 entries written so far.
2010/06/26 17:41:14| 393216 entries written so far.
- Show quoted text -
Comment #3 on issue 107 by adrian.chadd: storeLocateVary: Not our vary
marker object
http://code.google.com/p/lusca-cache/issues/detail?id=107
Yeah that patch is broken. Try this:
Index: src/store_vary.c
===================================================================
--- src/store_vary.c (revision 14716)
+++ src/store_vary.c (working copy)
@@ -585,10 +585,18 @@
state->seen_offset = offset;
if (!strLen2(e->mem_obj->reply->content_type) ||
strCmp(e->mem_obj->reply->content_type, "x-squid-internal/vary") != 0) {
/* This is not our Vary marker object. Bail out. */
- debug(33, 1) ("storeLocateVary: Not our vary marker object, %s
= '%s', '%s'/'%.*s'\n",
+ debug(33, 1) ("storeLocateVary: Not our vary marker object, %s
= '%s', vary_data='%s' ; accept_encoding='%.*s'\n",
storeKeyText(e->hash.key), e->mem_obj->url, vary_data,
strLen2(accept_encoding) ? strLen2(accept_encoding) : 1,
strBuf2(accept_encoding) ? strBuf2(accept_encoding) : "-");
+
+ if (strLen2(e->mem_obj->reply->content_type))
+ debug(33, 1) ("storeLocateVary: local content
type: '%.*s'\n",
+ strLen2(e->mem_obj->reply->content_type),
+ strBuf2(e->mem_obj->reply->content_type));
+ else
+ debug(33, 1) ("storeLocateVary: reply->content_type length
is 0, why!?\n");
+
storeLocateVaryCallback(state);
return;
}
I have tried your new patch look what it gives when patching.
patch -p0 <patch.diff
patching file src/store_vary.c
Hunk #1 FAILED at 585.
1 out of 1 hunk FAILED -- saving rejects to file src/store_vary.c.rej
and src/store_vary.c.rej contains
***************
*** 585,594 ****
state->seen_offset = offset;
if (!strLen2(e->mem_obj->reply->content_type) ||
strCmp(e->mem_obj->reply->content_type, "x-squid-internal/vary") != 0) {
/* This is not our Vary marker object. Bail out. */
- debug(33, 1) ("storeLocateVary: Not our vary marker object, %s
= '%s', '%s'/'%.*s'\n",
storeKeyText(e->hash.key), e->mem_obj->url, vary_data,
strLen2(accept_encoding) ? strLen2(accept_encoding) : 1,
strBuf2(accept_encoding) ? strBuf2(accept_encoding) : "-");
storeLocateVaryCallback(state);
return;
}
--- 585,602 ----
state->seen_offset = offset;
if (!strLen2(e->mem_obj->reply->content_type) ||
strCmp(e->mem_obj->reply->content_type, "x-squid-internal/vary") != 0) {
/* This is not our Vary marker object. Bail out. */
gah, just use this diff. :)
Attachments:
t 715 bytes
Have you had any further luck? I'm still trying to understand the exact set
of circumstances which is giving rise to this behaviour. I can take a stab
at the dark and say it's a potentially bad use of Vary, but it'd be
complete conjecture.
David, I need to know exactly what's going on in order to fix it. I don't
have a way of reproducing it at home. It seems to require many more real
users through the proxy.
What it -looks- like is that some requests include the Vary: stuff, and so
the cache stores a Vary: object for that particular URL and then
sub-objects under that; some requests don't and that particular URL gets a
raw object stored. Whatever order this is occuring with is creeping out
Squid/Lusca.
I'd love to know precisely how to replicate it. :)
Comment #9 on issue 107 by adrian.chadd: storeLocateVary: Not our vary
marker object
http://code.google.com/p/lusca-cache/issues/detail?id=107
Added further debugging for this in r14806. Please update to this and
report!
Here's an example - turns out I added the debugging and forgot, so
content-type is doubled up:
2010/10/19 10:21:59| storeLocateVary: Not our vary marker object,
0040D0DC31D99EF71C3CA4D1226EEC62
= 'http://www.xinhuanet.com/english2010/static/css.css',
vary_data='accept-encoding="gzip,%20deflate"' ; content-type: 'text/css' ;
accept_encoding='-'
2010/10/19 10:21:59| storeLocateVary: local content type: 'text/css'
2010/10/19 10:21:59| storeLocateVary: Not our vary marker object,
2C3AB28DD1F6C14868083A861F54E857
= 'http://www.xinhuanet.com/english2010/static/xilan.css',
vary_data='accept-encoding="gzip,%20deflate"' ; content-type: 'text/css' ;
accept_encoding='-'
2010/10/19 10:21:59| storeLocateVary: local content type: 'text/css'
2010/10/19 10:21:59| storeLocateVary: Not our vary marker object,
5AA2A61D55392004AB27E3F0ED4CA053
= 'http://www.xinhuanet.com/english2010/static/dp.js',
vary_data='accept-encoding="gzip,%20deflate"' ;
content-type: 'application/x-javascript' ; accept_encoding='-'
2010/10/19 10:21:59| storeLocateVary: local content
type: 'application/x-javascript'
2010/10/19 10:21:59| storeLocateVary: Not our vary marker object,
C307762E3D32F224E610329EB6401B0C
= 'http://www.xinhuanet.com/english2010/static/check.js',
vary_data='accept-encoding="gzip,%20deflate"' ;
content-type: 'application/x-javascript' ; accept_encoding='-'
2010/10/19 10:21:59| storeLocateVary: local content
type: 'application/x-javascript'
2010/10/19 10:22:00| storeLocateVary: Not our vary marker object,
0040D0DC31D99EF71C3CA4D1226EEC62
= 'http://www.xinhuanet.com/english2010/static/css.css',
vary_data='accept-encoding="gzip,%20deflate"' ; content-type: 'text/css' ;
accept_encoding='-'
2010/10/19 10:22:00| storeLocateVary: local content type: 'text/css'
See? The reply content-type of the object is a non-vary object - so
something's replied to this object with a non-Vary reply and the cache has
stored that. A subsequent request is for a Vary object .. but as I said, an
earlier reply didn't indicate it was a Vary response.
So, it's harmless. I now know why; but it's harmless.