Re: Forwarding loops with squid 2.0 RELEASE

From: Henrik Nordstrom <>
Date: Wed, 21 Oct 1998 01:44:30 +0200

John Sloan wrote:

> The incidence of the loop warnings has certainly diminished, but
> it has not disappeared:

Some loops are expected. One big problem in releases prior to PATH2 was
that Squid failed to break loops when cache digests are used.

A forwarding loop occurs then there is a mutual false hit. This can be
caused by requests that are made in such a way that the cache can't be
used, or occasionally by outdated cache digests.

> Some of the loops seem to be pairwise, and some go round all three
> servers from the looks of things.

Quite expected.

> Is there any extra information that you need?

* request headers used on the looping request
* store.log entries for the object prior to the loop.
* your refresh patterns
* If you are using cache digests or not

I have attached a small patch that logs the request headers when a loop
is detected. Be warned that this includes any cookies that some users
regards as private information..

Henrik Nordström
Spare time Squid hacker

Index: squid/src/client_side.c
diff -u squid/src/client_side.c: squid/src/client_side.c:
--- squid/src/client_side.c: Sun Oct 18 23:18:36 1998
+++ squid/src/client_side.c Wed Oct 21 01:39:02 1998
@@ -760,9 +760,16 @@
         String s = httpHeaderGetList(req_hdr, HDR_VIA);
         /* ThisCache cannot be a member of Via header, "1.0 ThisCache" can */
         if (strListIsSubstr(&s, ThisCache, ',')) {
+ Packer p;
+ MemBuf mb;
+ memBufDefInit(&mb);
+ packerToMemInit(&p, &mb);
+ httpHeaderPackInto(req_hdr, &p);
             debug(33, 1) ("WARNING: Forwarding loop detected for '%s'\n",
- debug(33, 1) ("--> %s\n", strBuf(s));
+ debug(33, 1) ("--> %s\n%s\n", strBuf(s), mb.buf);
+ packerClean(&p);
+ memBufClean(&mb);
             request->flags.loopdetect = 1;
Received on Tue Oct 20 1998 - 17:32:31 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:36 MST