CARVIEW |
Select Language
HTTP/2 200
date: Thu, 31 Jul 2025 09:54:33 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/containerd/go-cni.git
etag: W/"b575342b57aea8156064c989b0bd3664"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=5livFfYs%2ByPrMaXC2fylsTwICvirMlnuBbbwfQUUTRJHy35hp1mNKP9WzQ7suBsNOLkagtGutHfKf5th4pV3BgpdikVc7hPfOvbYedXEpx0aE5yXlcOJaOBToyvRgnjtsbUpmk9ABzMMgLAB%2Bo8z1ngRWxbNccGI7GzFA5XtwD4BJV36w4kdH%2BRSI%2FxaU2w%2BGNfXivVT6QBMgweJqP8vGsZuStTrpDK24UHR7ixaLRvPNMn%2BAVurjBM6vo2ve%2F0cGKROYj2Q%2BPQxGFNrgWbBUw%3D%3D--4DOofKoClm6z7UAE--TTWenLczC03im1hb71r6eg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.576416830.1753955672; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 09:54:32 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 09:54:32 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8CDA:3BDB3D:7778C1:910BC7:688B3D58
fix: recursive RLock() mutex acquision · containerd/go-cni@75a2440 · GitHub
Copy file name to clipboard
Copy file name to clipboard
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit 75a2440
committed
fix: recursive RLock() mutex acquision
There were at least two code paths which might acquire `.RLock()`
recursively:
1. `Setup*()` -> `createResult()`
2. `Setup*()` -> `Networks()`.
On its own, it's not a problem, but if `.Load()` is called concurrently,
it might do `.Lock()` in between recursive `.RLock()`s, which would lead
to a deadlock.
See #125
Fix by introducing a contract on the way mutex is acquired.
Add a test facility to verify for such mistakes via build tags:
* `go test -race` or `go test -tags deadlocks` activates deadlock
detection
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>1 parent 642f1ce commit 75a2440Copy full SHA for 75a2440
File tree
Expand file treeCollapse file tree
11 files changed
+101
-56
lines changedFilter options
- integration
Expand file treeCollapse file tree
11 files changed
+101
-56
lines changed+20-19Lines changed: 20 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
83 |
| - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 |
| |
85 | 88 |
| |
86 | 89 |
| |
| |||
135 | 138 |
| |
136 | 139 |
| |
137 | 140 |
| |
| 141 | + | |
| 142 | + | |
138 | 143 |
| |
139 | 144 |
| |
140 | 145 |
| |
141 |
| - | |
142 |
| - | |
143 | 146 |
| |
144 | 147 |
| |
145 | 148 |
| |
| |||
162 | 165 |
| |
163 | 166 |
| |
164 | 167 |
| |
| 168 | + | |
| 169 | + | |
165 | 170 |
| |
166 | 171 |
| |
167 | 172 |
| |
168 |
| - | |
169 |
| - | |
170 | 173 |
| |
171 | 174 |
| |
172 | 175 |
| |
| |||
180 | 183 |
| |
181 | 184 |
| |
182 | 185 |
| |
| 186 | + | |
| 187 | + | |
183 | 188 |
| |
184 | 189 |
| |
185 | 190 |
| |
186 |
| - | |
187 |
| - | |
188 | 191 |
| |
189 | 192 |
| |
190 | 193 |
| |
| |||
198 | 201 |
| |
199 | 202 |
| |
200 | 203 |
| |
201 |
| - | |
| 204 | + | |
202 | 205 |
| |
203 | 206 |
| |
204 | 207 |
| |
| |||
223 | 226 |
| |
224 | 227 |
| |
225 | 228 |
| |
226 |
| - | |
| 229 | + | |
227 | 230 |
| |
228 | 231 |
| |
229 |
| - | |
| 232 | + | |
230 | 233 |
| |
231 | 234 |
| |
232 | 235 |
| |
233 | 236 |
| |
234 |
| - | |
| 237 | + | |
235 | 238 |
| |
236 | 239 |
| |
237 | 240 |
| |
| |||
245 | 248 |
| |
246 | 249 |
| |
247 | 250 |
| |
| 251 | + | |
| 252 | + | |
248 | 253 |
| |
249 | 254 |
| |
250 | 255 |
| |
251 |
| - | |
252 |
| - | |
253 | 256 |
| |
254 | 257 |
| |
255 | 258 |
| |
256 | 259 |
| |
257 |
| - | |
| 260 | + | |
258 | 261 |
| |
259 | 262 |
| |
260 | 263 |
| |
| |||
275 | 278 |
| |
276 | 279 |
| |
277 | 280 |
| |
| 281 | + | |
| 282 | + | |
278 | 283 |
| |
279 | 284 |
| |
280 | 285 |
| |
281 |
| - | |
282 |
| - | |
283 | 286 |
| |
284 | 287 |
| |
285 | 288 |
| |
286 | 289 |
| |
287 |
| - | |
| 290 | + | |
288 | 291 |
| |
289 | 292 |
| |
290 | 293 |
| |
| |||
329 | 332 |
| |
330 | 333 |
| |
331 | 334 |
| |
332 |
| - | |
333 |
| - | |
334 | 335 |
| |
335 | 336 |
| |
336 | 337 |
| |
|
+15-10Lines changed: 15 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
| 39 | + | |
38 | 40 |
| |
39 | 41 |
| |
40 | 42 |
| |
41 | 43 |
| |
42 |
| - | |
43 |
| - | |
| 44 | + | |
44 | 45 |
| |
45 | 46 |
| |
46 | 47 |
| |
| |||
112 | 113 |
| |
113 | 114 |
| |
114 | 115 |
| |
| 116 | + | |
| 117 | + | |
115 | 118 |
| |
116 | 119 |
| |
117 | 120 |
| |
118 |
| - | |
119 |
| - | |
| 121 | + | |
120 | 122 |
| |
121 | 123 |
| |
122 | 124 |
| |
| |||
200 | 202 |
| |
201 | 203 |
| |
202 | 204 |
| |
| 205 | + | |
| 206 | + | |
203 | 207 |
| |
204 | 208 |
| |
205 | 209 |
| |
206 |
| - | |
207 |
| - | |
| 210 | + | |
208 | 211 |
| |
209 | 212 |
| |
210 | 213 |
| |
| |||
290 | 293 |
| |
291 | 294 |
| |
292 | 295 |
| |
| 296 | + | |
| 297 | + | |
293 | 298 |
| |
294 | 299 |
| |
295 | 300 |
| |
296 |
| - | |
297 |
| - | |
| 301 | + | |
298 | 302 |
| |
299 | 303 |
| |
300 | 304 |
| |
| |||
382 | 386 |
| |
383 | 387 |
| |
384 | 388 |
| |
| 389 | + | |
| 390 | + | |
385 | 391 |
| |
386 | 392 |
| |
387 | 393 |
| |
388 |
| - | |
389 |
| - | |
| 394 | + | |
390 | 395 |
| |
391 | 396 |
| |
392 | 397 |
| |
|
+2Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
| 34 | + | |
33 | 35 |
| |
34 | 36 |
|
+2Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| 7 | + | |
7 | 8 |
| |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
| 13 | + | |
12 | 14 |
| |
13 | 15 |
| |
14 | 16 |
| |
|
+4Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
| 19 | + | |
18 | 20 |
| |
19 | 21 |
| |
| 22 | + | |
| 23 | + | |
20 | 24 |
| |
21 | 25 |
| |
22 | 26 |
| |
|
+2Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
15 | 16 |
| |
| 17 | + | |
16 | 18 |
| |
17 | 19 |
| |
18 | 20 |
| |
|
+4Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
| 85 | + | |
| 86 | + | |
85 | 87 |
| |
86 | 88 |
| |
87 | 89 |
| |
| |||
97 | 99 |
| |
98 | 100 |
| |
99 | 101 |
| |
| 102 | + | |
| 103 | + | |
100 | 104 |
| |
101 | 105 |
| |
102 | 106 |
| |
|
mutex.go
Copy file name to clipboard+23Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + |
mutex_deadlocks.go
Copy file name to clipboard+25Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + |
-2Lines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
72 |
| - | |
73 |
| - | |
74 | 72 |
| |
75 | 73 |
| |
76 | 74 |
| |
|
You can’t perform that action at this time.
0 commit comments