<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [squid-users] Squid BUG: assurance failed: tok.skip(WellKnownUrlPathPrefix())</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Wow - Alex now even the old cachemgr.cgi works :-] client v4.6 also works<BR>
<BR>
But - could someone (or you) clarify the next one for me? I've read some questions about the "new" cachemgr.cgi and the MGR_INDEX template. Without this file the only output which the cmgr.cgi produces is "Internal Error: Missing Template MGR_INDEX". But if I put content from MGR_INDEX from <A HREF="https://github.com/yadij/cachemgr.js/">https://github.com/yadij/cachemgr.js/</A> it gives me (Apache/2.4.38 Debian)<BR>
<BR>
[Wed Sep 13 05:57:57.902368 2023] [cgid:error] [pid 22501:tid 140478824113920] [client 192.168.xx.xx:24201] End of script output before headers: cachemgr.cgi, referer: <A HREF="http://squid_IP/cgi-bin/cachemgr.cgi">http://squid_IP/cgi-bin/cachemgr.cgi</A><BR>
assertion failed: MemBuf.cc:211: "sz >= 0"<BR>
<BR>
(line 211 is in the function MemBuf::Append)<BR>
<BR>
But if I put only some text in the MGR_INDEX file (something like <p>Test bla bla</p>) it renders<BR>
<BR>
Cache Manager menu for localhost:<BR>
Test bla bla<BR>
<BR>
Generated Thu, 14 Sep 2023 10:16:11 GMT, by cachemgr.cgi/6.3-20230903-ra9c06aa6a@proxy<BR>
<BR>
Have not found any info about substitutions (eq. like in the ERR files) or something. I thought if there is no MGR_INDEX file cachemgr.cgi should work as the old one - and MGR_INDEX is only used while I need some customization or my own design/functions.<BR>
<BR>
<BR>
Besides that I have found out that every time I shutdown squid with start-stop-daemon it coredumps. Frankly - I do not have capacity to go through these.<BR>
<BR>
ep 14 11:55:13 proxy squid[23984]: Squid Parent: squid-4 process 23990 exited due to signal 6 with status 0<BR>
Sep 14 11:55:15 proxy squid[23984]: Squid Parent: squid-1 process 23993 exited due to signal 6 with status 0<BR>
Sep 14 11:55:47 proxy squid[23984]: Squid Parent: squid-3 process 23991 exited due to signal 6 with status 0<BR>
Sep 14 11:55:48 proxy squid[23984]: Squid Parent: squid-2 process 23992 exited due to signal 6 with status 0<BR>
Sep 14 11:56:18 proxy systemd-coredump[3679]: Process 23990 (squid) of user 13 dumped core.#012#012Stack trace of thread 23990:<BR>
#012#0 0x00007f35c21ab8eb __GI_raise (libc.so.6)<BR>
#012#1 0x00007f35c2196535 __GI_abort (libc.so.6)<BR>
#012#2 0x000055c7eca80694 xassert (squid)<BR>
#012#3 0x000055c7ecb23c7c _ZN5Store4RootEv (squid)<BR>
#012#4 0x000055c7ec8805af _ZN10StoreEntry16destroyMemObjectEv (squid)<BR>
#012#5 0x000055c7ec8811f6 _Z17destroyStoreEntryPv (squid)<BR>
#012#6 0x000055c7ecb2d3eb hashFreeItems (squid)<BR>
#012#7 0x000055c7ecb1fe4a _ZN5Store10ControllerD1Ev (squid)<BR>
#012#8 0x000055c7ecb1fec9 _ZN5Store10ControllerD0Ev (squid)<BR>
#012#9 0x00007f35c21adebc __run_exit_handlers (libc.so.6)<BR>
#012#10 0x00007f35c21adfea __GI_exit (libc.so.6)<BR>
#012#11 0x000055c7ec847ce3 SquidShutdown (squid)<BR>
#012#12 0x000055c7ec6f0cf1 SquidMainSafe (squid)<BR>
#012#13 0x00007f35c219809b __libc_start_main (libc.so.6)<BR>
#012#14 0x000055c7ec6fa71a _start (squid)<BR>
Sep 14 11:56:18 proxy systemd-coredump[3681]: Process 23993 (squid) of user 13 dumped core.<BR>
#012#012Stack trace of thread 23993:<BR>
#012#0 0x00007f169c64c8eb __GI_raise (libc.so.6)#012#1 0x00007f169c637535 __GI_abort (libc.so.6)<BR>
#012#2 0x0000557ee57ab694 xassert (squid)<BR>
#012#3 0x0000557ee584ec7c _ZN5Store4RootEv (squid)<BR>
#012#4 0x0000557ee55ab5af _ZN10StoreEntry16destroyMemObjectEv (squid)<BR>
#012#5 0x0000557ee55ac1f6 _Z17destroyStoreEntryPv (squid)<BR>
#012#6 0x0000557ee58583eb hashFreeItems (squid)<BR>
#012#7 0x0000557ee584ae4a _ZN5Store10ControllerD1Ev (squid)<BR>
#012#8 0x0000557ee584aec9 _ZN5Store10ControllerD0Ev (squid)<BR>
#012#9 0x00007f169c64eebc __run_exit_handlers (libc.so.6)<BR>
#012#10 0x00007f169c64efea __GI_exit (libc.so.6)#012#11 0x0000557ee5572ce3 SquidShutdown (squid)<BR>
#012#12 0x0000557ee541bcf1 SquidMainSafe (squid)<BR>
#012#13 0x00007f169c63909b __libc_start_main (libc.so.6)#012#14 0x0000557ee542571a _start (squid)<BR>
Sep 14 11:56:18 proxy systemd[1]: systemd-coredump@60-3678-0.service: Succeeded.<BR>
Sep 14 11:56:18 proxy systemd[1]: systemd-coredump@61-3680-0.service: Succeeded.<BR>
Sep 14 11:56:42 proxy systemd-coredump[3688]: Process 23992 (squid) of user 13 dumped core.<BR>
#012#012Stack trace of thread 23992:#012<BR>
#0 0x00007fa6a64568eb __GI_raise (libc.so.6<BR>
#012#1 0x00007fa6a6441535 __GI_abort (libc.so.6)<BR>
#012#2 0x000055bde67df694 xassert (squid)<BR>
#012#3 0x000055bde6882c7c _ZN5Store4RootEv (squid)<BR>
#012#4 0x000055bde65df5af _ZN10StoreEntry16destroyMemObjectEv (squid)<BR>
#012#5 0x000055bde65e01f6 _Z17destroyStoreEntryPv (squid)<BR>
#012#6 0x000055bde688c3eb hashFreeItems (squid)<BR>
#012#7 0x000055bde687ee4a _ZN5Store10ControllerD1Ev (squid)<BR>
#012#8 0x000055bde687eec9 _ZN5Store10ControllerD0Ev (squid)<BR>
#012#9 0x00007fa6a6458ebc __run_exit_handlers (libc.so.6)<BR>
#012#10 0x00007fa6a6458fea __GI_exit (libc.so.6)<BR>
#012#11 0x000055bde65a6ce3 SquidShutdown (squid)<BR>
#012#12 0x000055bde644fcf1 SquidMainSafe (squid)<BR>
#012#13 0x00007fa6a644309b __libc_start_main (libc.so.6)<BR>
#012#14 0x000055bde645971a _start (squid)<BR>
Sep 14 11:56:43 proxy systemd[1]: systemd-coredump@62-3685-0.service: Succeeded.<BR>
Sep 14 11:56:56 proxy systemd-coredump[3677]: Process 23991 (squid) of user 13 dumped core.<BR>
#012#012Stack trace of thread 23991:<BR>
#012#0 0x00007fbe358dd8eb __GI_raise (libc.so.6)<BR>
#012#1 0x00007fbe358c8535 __GI_abort (libc.so.6)<BR>
#012#2 0x00005642b5ae8694 xassert (squid)<BR>
#012#3 0x00005642b5b8bc7c _ZN5Store4RootEv (squid)<BR>
#012#4 0x00005642b58e85af _ZN10StoreEntry16destroyMemObjectEv (squid)<BR>
#012#5 0x00005642b58e91f6 _Z17destroyStoreEntryPv (squid)<BR>
#012#6 0x00005642b5b953eb hashFreeItems (squid)<BR>
#012#7 0x00005642b5b87e4a _ZN5Store10ControllerD1Ev (squid)<BR>
#012#8 0x00005642b5b87ec9 _ZN5Store10ControllerD0Ev (squid)<BR>
#012#9 0x00007fbe358dfebc __run_exit_handlers (libc.so.6)<BR>
#012#10 0x00007fbe358dffea __GI_exit (libc.so.6)<BR>
#012#11 0x00005642b58afce3 SquidShutdown (squid)<BR>
#012#12 0x00005642b5758cf1 SquidMainSafe (squid)<BR>
#012#13 0x00007fbe358ca09b __libc_start_main (libc.so.6)<BR>
#012#14 0x00005642b576271a _start (squid)<BR>
Sep 14 11:56:57 proxy systemd[1]: systemd-coredump@59-3676-0.service: Succeeded.<BR>
<BR>
<BR>
Maybe something with my (rock) storage closing?<BR>
THX<BR>
LL<BR>
<BR>
<BR>
-----Původní zpráva-----<BR>
Od: squid-users za uživatele Alex Rousskov<BR>
Odesláno: st 13.9.2023 20:53<BR>
Komu: squid-users@lists.squid-cache.org<BR>
Předmět: Re: [squid-users] Squid BUG: assurance failed: tok.skip(WellKnownUrlPathPrefix())<BR>
<BR>
On 2023-09-12 15:50, Loučanský Lukáš wrote:<BR>
<BR>
> 2023/09/12 19:12:03 kid4| ERROR: Squid BUG: assurance failed:<BR>
> tok.skip(WellKnownUrlPathPrefix())<BR>
<BR>
> Request:<BR>
> GET cache_object://squid_ip/info HTTP/1.0<BR>
> Host: squid_ip<BR>
> User-Agent: squidclient/4.6<BR>
> Accept: */*<BR>
> Connection: close<BR>
<BR>
Thank you for sharing this detail. I can now reproduce this problem.<BR>
<BR>
You are suffering from a bug in Squid v6.3 commit 6695897 (which was<BR>
incorrectly attributed to me). Until that bug is addressed, cache<BR>
manager requests using the deprecated cache_object scheme (e.g., those<BR>
emitted by older squidclients) will trigger the above<BR>
WellKnownUrlPathPrefix assertion in Squid v6.3.<BR>
<BR>
I have attached a patch that fixes this v6.3 bug in my tests.<BR>
<BR>
<BR>
> Sending HTTP request ...<BR>
> done.<BR>
> HTTP/1.1 404 Not Found<BR>
> Server: squid<BR>
> Mime-Version: 1.0<BR>
> Date: Tue, 12 Sep 2023 19:09:41 GMT<BR>
> Content-Type: text/html;charset=utf-8<BR>
> Content-Length: 13057<BR>
> X-Squid-Error: ERR_INVALID_URL 0<BR>
> Cache-Status: proxy;detail=no-cache<BR>
> Via: 1.1 proxy (squid)<BR>
> Connection: close<BR>
><BR>
> This is obviously calling for url cache_object://squid_ip/info which I<BR>
> think is obsolete. Now I went with the new squidclient:<BR>
><BR>
> ./squidclient -h squid_ip -p squid_port -vv mgr:info<BR>
><BR>
> Request:<BR>
> GET <A HREF="http://squid_ip:squid_port/squid-internal-mgr/info">http://squid_ip:squid_port/squid-internal-mgr/info</A> HTTP/1.0<BR>
> Host: 10.50.1.5:3127<BR>
> User-Agent: squidclient/6.3<BR>
> Accept: */*<BR>
> Connection: close<BR>
<BR>
> But it seems squid is then trying to open it's<BR>
> visible_hostname:squid_port/squid-internal-mgr/ and due my DNS setting<BR>
> it is its WAN IP - so it's connecting to its outside IP with its outside<BR>
> IP which is not in the http_access manager allow list (now it is and the<BR>
> newer squidclient works).<BR>
<BR>
You are in Squid Bug 5283 territory here:<BR>
<A HREF="https://bugs.squid-cache.org/show_bug.cgi?id=5283">https://bugs.squid-cache.org/show_bug.cgi?id=5283</A><BR>
<BR>
In a Linux test environment, I can work around those "outside IP"<BR>
problems by adding "-l 127.0.0.1" option to squidclient, forcing<BR>
squidclient to connect to Squid from the loopback address. IIRC, that<BR>
"-l" trick does not work in environments that do not support<BR>
from-localhost connections to "outside IPs" on the same box (e.g., Windows).<BR>
<BR>
<BR>
HTH,<BR>
<BR>
Alex.<BR>
<BR>
<BR>
<BR>
> -----Původní zpráva-----<BR>
> Od: squid-users za uživatele Alex Rousskov<BR>
> Odesláno: út 12.9.2023 19:28<BR>
> Komu: squid-users@lists.squid-cache.org<BR>
> Předmět: Re: [squid-users] Squid BUG: assurance failed:<BR>
> tok.skip(WellKnownUrlPathPrefix())<BR>
><BR>
> On 2023-09-12 13:06, Loučanský Lukáš wrote:<BR>
> > Is this anyhow interesting?<BR>
><BR>
> Not really, IMO -- the problem happens earlier. I can confirm that you<BR>
> are running v6.3-based code. Let's call that progress :-).<BR>
><BR>
> Can you share the a _pointer_ to a compressed ALL,9 cache.log file while<BR>
> reproducing the problem using a single transaction?<BR>
><BR>
> <A HREF="https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction">https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction</A> <<A HREF="https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction">https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction</A>><BR>
><BR>
> Alex.<BR>
><BR>
> ><BR>
> > 2023/09/12 18:47:04.267 kid4| 24,8| SBuf.cc(30) SBuf: SBuf15514952<BR>
> created<BR>
> > 2023/09/12 18:47:04.267 kid4| 24,8| SBuf.cc(30) SBuf: SBuf15514953<BR>
> created<BR>
> > 2023/09/12 18:47:04.267 kid4| 24,8| SBuf.cc(30) SBuf: SBuf15514954<BR>
> created<BR>
> > 2023/09/12 18:47:04.267 kid4| 24,7| SBuf.cc(85) assign: assigning<BR>
> > SBuf15514952 from SBuf15514912<BR>
> > 2023/09/12 18:47:04.267 kid4| 24,8| SBuf.cc(38) SBuf: SBuf15514955<BR>
> > created from id SBuf15514915<BR>
> > 2023/09/12 18:47:04.267 kid4| 24,8| SBuf.cc(445) startsWith:<BR>
> > SBuf15514955 startsWith SBuf125812, caseSensitive: 0<BR>
> > 2023/09/12 18:47:04.267 kid4| 24,8| SBuf.cc(447) startsWith: no, too<BR>
> short<BR>
> > 2023/09/12 18:47:04.267 kid4| 24,8| Tokenizer.cc(185) skip: no match,<BR>
> > not skipping '/squid-internal-mgr/'<BR>
> > 2023/09/12 18:47:04 kid4| ERROR: Squid BUG: assurance failed:<BR>
> > tok.skip(WellKnownUrlPathPrefix())<BR>
> > 2023/09/12 18:47:04.268 kid4| 24,8| SBuf.cc(70) ~SBuf: SBuf15514955<BR>
> > destructed<BR>
> ><BR>
> ><BR>
> > BTW debug 24,9 makes pretty big log files... :-)<BR>
> ><BR>
> > L<BR>
> ><BR>
><BR>
><BR>
> _______________________________________________<BR>
> squid-users mailing list<BR>
> squid-users@lists.squid-cache.org<BR>
> <A HREF="https://lists.squid-cache.org/listinfo/squid-users">https://lists.squid-cache.org/listinfo/squid-users</A><BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>