]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/squid/squid-3.5-14179.patch
squid 3.5.26: latest patches (14169-14182)
[ipfire-2.x.git] / src / patches / squid / squid-3.5-14179.patch
1 ------------------------------------------------------------
2 revno: 14179
3 revision-id: squid3@treenet.co.nz-20170701095916-wknqmneq2w0mxt6a
4 parent: squid3@treenet.co.nz-20170701081116-xekwolj1wdkeaxqv
5 author: Alex Rousskov <rousskov@measurement-factory.com>
6 committer: Amos Jeffries <squid3@treenet.co.nz>
7 branch nick: 3.5
8 timestamp: Sat 2017-07-01 21:59:16 +1200
9 message:
10 Fix mgr query handoff from the original recipient to Coordinator.
11
12 This bug has already been fixed once, in trunk r11164.1.61, but that fix
13 was accidentally undone shortly after, during significant cross-branch
14 merging activity combined with the Forwarder class split. The final
15 merge importing the associated code (trunk r11730) was buggy.
16
17 The bug (explained in r11164.1.61) leads to a race condition between
18
19 * Store notifying Server classes about the entry completion (which might
20 trigger a bogus error message sent to the cache manager client while
21 Coordinator sends its own valid response on the same connection!) and
22
23 * post-cleanup() connection closure handlers of Server classes silently
24 closing everything (and leaving Coordinator the only responding
25 process on that shared connection).
26
27 The bug probably was not noticed for so long because, evidently, the
28 latter actions tend to win in the current code.
29 ------------------------------------------------------------
30 # Bazaar merge directive format 2 (Bazaar 0.90)
31 # revision_id: squid3@treenet.co.nz-20170701095916-wknqmneq2w0mxt6a
32 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
33 # testament_sha1: c7e89c80468c7f388f7e09ad2d68a245789db50d
34 # timestamp: 2017-07-01 10:51:12 +0000
35 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
36 # base_revision_id: squid3@treenet.co.nz-20170701081116-\
37 # xekwolj1wdkeaxqv
38 #
39 # Begin patch
40 === modified file 'src/ipc/Forwarder.h'
41 --- src/ipc/Forwarder.h 2017-01-01 00:16:45 +0000
42 +++ src/ipc/Forwarder.h 2017-07-01 09:59:16 +0000
43 @@ -47,12 +47,14 @@
44 virtual void handleError();
45 virtual void handleTimeout();
46 virtual void handleException(const std::exception& e);
47 - virtual void handleRemoteAck();
48
49 private:
50 static void RequestTimedOut(void* param);
51 void requestTimedOut();
52 void removeTimeoutEvent();
53 +
54 + void handleRemoteAck();
55 +
56 static AsyncCall::Pointer DequeueRequest(unsigned int requestId);
57
58 protected:
59
60 === modified file 'src/mgr/Forwarder.cc'
61 --- src/mgr/Forwarder.cc 2017-01-01 00:16:45 +0000
62 +++ src/mgr/Forwarder.cc 2017-07-01 09:59:16 +0000
63 @@ -102,17 +102,6 @@
64 mustStop("commClosed");
65 }
66
67 -/// called when Coordinator starts processing the request
68 -void
69 -Mgr::Forwarder::handleRemoteAck()
70 -{
71 - Ipc::Forwarder::handleRemoteAck();
72 -
73 - Must(entry != NULL);
74 - EBIT_CLR(entry->flags, ENTRY_FWD_HDR_WAIT);
75 - entry->complete();
76 -}
77 -
78 /// send error page
79 void
80 Mgr::Forwarder::sendError(ErrorState *error)
81
82 === modified file 'src/mgr/Forwarder.h'
83 --- src/mgr/Forwarder.h 2017-01-01 00:16:45 +0000
84 +++ src/mgr/Forwarder.h 2017-07-01 09:59:16 +0000
85 @@ -40,7 +40,6 @@
86 virtual void handleError();
87 virtual void handleTimeout();
88 virtual void handleException(const std::exception& e);
89 - virtual void handleRemoteAck();
90
91 private:
92 void noteCommClosed(const CommCloseCbParams& params);
93
94 === modified file 'src/tests/stub_libmgr.cc'
95 --- src/tests/stub_libmgr.cc 2017-01-01 00:16:45 +0000
96 +++ src/tests/stub_libmgr.cc 2017-07-01 09:59:16 +0000
97 @@ -100,7 +100,6 @@
98 void Mgr::Forwarder::handleError() STUB
99 void Mgr::Forwarder::handleTimeout() STUB
100 void Mgr::Forwarder::handleException(const std::exception& e) STUB
101 -void Mgr::Forwarder::handleRemoteAck() STUB
102
103 #include "mgr/FunAction.h"
104 Mgr::Action::Pointer Mgr::FunAction::Create(const CommandPointer &cmd, OBJH *aHandler) STUB_RETVAL(dummyAction)
105