]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Extend cache_log_message to Bug 5187 and job invalidation BUGs (#1639)
authorShmaya <34206053+ShmayaFrankel@users.noreply.github.com>
Tue, 16 Jan 2024 20:51:43 +0000 (20:51 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 17 Jan 2024 20:41:58 +0000 (20:41 +0000)
    70 ERROR: Squid BUG: Job invalidated during ... that threw...
    71 ERROR: Squid BUG: Job invalidated during ...
    72 WARNING: Squid bug 5187 workaround triggered

doc/debug-messages.dox
src/base/AsyncJobCalls.h
src/client_side_request.cc
src/debug/Messages.h

index 08c9b48be06b6bf066594c9e9d13ba4f42e2a64a..a4087a319d38823657a924f28b49eebe9a124bfe 100644 (file)
@@ -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
 */
index faa3e49bd392aaf08aef8fbbcfcbb618e60292bd..78c898736ab8a94cdff81bd9793a2e7498b4d661 100644 (file)
@@ -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<Job>::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<Job>::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
index 7f802d4219e3f95f383b42723dff69aa371d61ae..62a0cba182885fe56bebbb90378a968bba124ee0 100644 (file)
@@ -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"
@@ -2100,7 +2101,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
index 24bc67235f14fa287e754a1b8696436cf7a4f550..13efd7a082621f6be3d7b6b7a3a2bbe102bdffbc 100644 (file)
@@ -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