From: Shmaya <34206053+ShmayaFrankel@users.noreply.github.com> Date: Tue, 16 Jan 2024 20:51:43 +0000 (+0000) Subject: Extend cache_log_message to Bug 5187 and job invalidation BUGs (#1639) X-Git-Tag: SQUID_6_7~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38f3097fafde59ea27facd2e9ed00cc2c08553ef;p=thirdparty%2Fsquid.git Extend cache_log_message to Bug 5187 and job invalidation BUGs (#1639) 70 ERROR: Squid BUG: Job invalidated during ... that threw... 71 ERROR: Squid BUG: Job invalidated during ... 72 WARNING: Squid bug 5187 workaround triggered --- diff --git a/doc/debug-messages.dox b/doc/debug-messages.dox index 08c9b48be0..a4087a319d 100644 --- a/doc/debug-messages.dox +++ b/doc/debug-messages.dox @@ -67,5 +67,8 @@ ID Message gist 67 WARNING: BCP 177 violation. IPv6 transport forced OFF by build parameters. 68 Processing Configuration File: ... (depth ...) 69 WARNING: Unsupported or unexpected from-helper annotation with a name reserved for Squid use: ...advice: If this is a custom annotation, rename it to add a trailing underscore: ... +70 ERROR: Squid BUG: Job invalidated during ... that threw exception: ... +71 ERROR: Squid BUG: Job invalidated during ... +72 WARNING: Squid bug 5187 workaround triggered \endverbatim */ diff --git a/src/base/AsyncJobCalls.h b/src/base/AsyncJobCalls.h index faa3e49bd3..78c898736a 100644 --- a/src/base/AsyncJobCalls.h +++ b/src/base/AsyncJobCalls.h @@ -11,6 +11,7 @@ #include "base/AsyncJob.h" #include "base/CbcPointer.h" +#include "debug/Messages.h" #include "debug/Stream.h" /** @@ -177,7 +178,7 @@ JobDialer::dial(AsyncCall &call) debugs(call.debugSection, 3, call.name << " threw exception: " << e.what()); if (!job) { - debugs(call.debugSection, DBG_CRITICAL, "ERROR: Squid BUG: Job invalidated during " << + debugs(call.debugSection, Critical(70), "ERROR: Squid BUG: Job invalidated during " << call.name << " that threw exception: " << e.what()); return; // see also: bug 4981, commit e3b6f15, and XXX in Http::Stream class description } @@ -185,7 +186,7 @@ JobDialer::dial(AsyncCall &call) } if (!job) { - debugs(call.debugSection, DBG_CRITICAL, "ERROR: Squid BUG: Job invalidated during " << call.name); + debugs(call.debugSection, Critical(71), "ERROR: Squid BUG: Job invalidated during " << call.name); return; } job->callEnd(); // may delete job diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 15e556296e..3ee97d4bcc 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -28,6 +28,7 @@ #include "clientStream.h" #include "comm/Connection.h" #include "comm/Write.h" +#include "debug/Messages.h" #include "error/Detail.h" #include "errorpage.h" #include "fd.h" @@ -2074,7 +2075,7 @@ ClientHttpRequest::noteMoreBodyDataAvailable(BodyPipe::Pointer) // XXX: Setting receivedWholeAdaptedReply here is a workaround for a // regression, as described in https://bugs.squid-cache.org/show_bug.cgi?id=5187#c6 receivedWholeAdaptedReply = true; - debugs(85, DBG_IMPORTANT, "WARNING: Squid bug 5187 workaround triggered"); + debugs(85, Important(72), "WARNING: Squid bug 5187 workaround triggered"); endRequestSatisfaction(); } // else wait for more body data diff --git a/src/debug/Messages.h b/src/debug/Messages.h index 24bc67235f..13efd7a082 100644 --- a/src/debug/Messages.h +++ b/src/debug/Messages.h @@ -61,7 +61,7 @@ private: }; /// The maximum used DebugMessage::id plus 1. Increase as you add new IDs. -constexpr DebugMessageId DebugMessageIdUpperBound = 70; +constexpr DebugMessageId DebugMessageIdUpperBound = 73; /// a collection of DebugMessage objects (with fast access by message IDs) class DebugMessages