Commit 9f4106e
committed
fix: retry rctx.execute() on SIGKILL (exit 137) for macOS 26
macOS 26 (Tahoe) has a bug in its networking framework's
pthread_atfork handler that intermittently kills child processes
with SIGKILL (exit 137) when spawned via fork+exec. This affects
all rctx.execute() calls in repository rules, causing yq, cp, and
mkdir commands to fail randomly during npm_translate_lock.
Add an execute_with_retry() wrapper in utils.bzl that catches exit
code 137 and retries up to 3 times. Apply it to all rctx.execute()
call sites in npm_translate_lock_state.bzl (yq lockfile parsing,
mkdir, cp) and utils.bzl (reverse_force_copy).
The failure is intermittent so retries reliably work around it.
References:
- GoogleContainerTools/skaffold#9925
- bazelbuild/bazel#27026
Made-with: Cursor1 parent 786a74a commit 9f4106e
2 files changed
Lines changed: 38 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
| 339 | + | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| |||
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
347 | | - | |
| 348 | + | |
| 349 | + | |
348 | 350 | | |
349 | 351 | | |
350 | 352 | | |
| |||
395 | 397 | | |
396 | 398 | | |
397 | 399 | | |
398 | | - | |
| 400 | + | |
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
15 | 45 | | |
16 | 46 | | |
17 | 47 | | |
| |||
212 | 242 | | |
213 | 243 | | |
214 | 244 | | |
215 | | - | |
| 245 | + | |
216 | 246 | | |
217 | 247 | | |
218 | 248 | | |
| |||
229 | 259 | | |
230 | 260 | | |
231 | 261 | | |
232 | | - | |
| 262 | + | |
233 | 263 | | |
234 | 264 | | |
235 | 265 | | |
| |||
375 | 405 | | |
376 | 406 | | |
377 | 407 | | |
| 408 | + | |
378 | 409 | | |
379 | 410 | | |
380 | 411 | | |
| |||
0 commit comments