Commit 458a35c
committed
Surface silent failures in
Three places that previously swallowed exceptions silently now log via
`log.exception()` so they surface in the runtime log when something
weird happens — easier to track down sneaky failures in the
fork-from-worker-thread / subint-bootstrap primitives.
Deats,
- `_close_inherited_fds()`: post-fork child's per-fd `os.close()`
swallow now logs the fd that failed to close. The comment notes the
expected failure modes (already-closed-via-listdir-race,
otherwise-unclosable) — both still fine to ignore semantically, but
worth flagging in the log.
- `fork_from_worker_thread()` parent-side timeout branch: the
`os.close(rfd)` + `os.close(wfd)` cleanup now logs each pipe-fd close
failure separately before raising the `worker thread didn't return`
RuntimeError.
- `run_subint_in_worker_thread._drive()`: when
`_interpreters.exec(interp_id, bootstrap)` raises a `BaseException`,
log the full call signature (interp_id + bootstrap) along with the
captured exception, before stashing into `err` for the outer caller.
Behavior unchanged — only adds observability.
(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code_subint_forkserver
1 parent 7cd47ef commit 458a35c
1 file changed
Lines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
| |||
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
404 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
405 | 412 | | |
406 | 413 | | |
407 | 414 | | |
408 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
409 | 419 | | |
410 | 420 | | |
411 | 421 | | |
| |||
475 | 485 | | |
476 | 486 | | |
477 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
478 | 495 | | |
479 | 496 | | |
480 | 497 | | |
| |||
0 commit comments