Mark S.
88c6085846
fix(process): a kill's result stands on every backend, and a failed scope stop never counts as stopped ( #133648 )
...
* fix(process): a kill's result stands on every backend, and a failed scope stop never counts as stopped
Follow-up to #133434 , which fixed these races for local processes only.
Non-local backends (spawn_via_env) settle through _env_poller_loop, which
still wrote the session's final state without the session lock:
- It set exit_code before _finish_exited, so a kill that landed first ended
as killed with the sandbox's exit code. The exit now goes through
_finish_exited alone, and a committed kill keeps its code.
- Its backend-lost path set exited/-1/lost directly, replacing a recorded
kill. It now goes through _finish_exited(reason="lost"), so the kill stands
and the completion is still published by its owner.
- A log delta (or a log-rotation reset) fetched before a kill was applied
after it, so the session's output no longer matched the kill's snapshot.
Both are now dropped once the session has exited, decided under the lock.
A failed systemd scope stop could still count as a successful stop:
- A recovered PID that died between get() and _signal_kill ignored the stop
result and returned a plain already_exited. It now reports
scope_stop_failed.
- kill_all counted already_exited as stopped even when the scope stop
failed, and only looked at _running, so a session that exited after being
picked kept a live scope that no later sweep retried. Every kill path now
stops the scope through _stop_scope, which marks a failed stop pending;
kill_all does not count a result with scope_stop_failed and also retries
finished sessions whose stop is pending.
_log_delta_command moves unchanged into tools/process_registry_env_log.py
(ProcessRegistry._log_delta_command stays as an alias) to keep
process_registry.py under its size cap.
Refs #132358 . Both gaps were found by @andrexibiza in the review of #133434 .
* fix(process): pruning keeps a session whose scope stop is pending
kill_all retries a failed scope stop through the finished session, but
_prune_if_needed still evicted that session by TTL (measured from process
start, so a long-running process was prunable the moment it finished) or
by capacity, leaving a possibly live scope with no retry target. Sessions
with _scope_stop_pending are now exempt from both until the stop succeeds;
capacity pruning drops the oldest prunable session instead.
Found by the independent review of #133648 .
2026-10-06 00:00:57 -04:00
..
2026-09-21 19:18:15 -04:00
2026-10-05 16:46:53 -05:00
2026-09-23 07:36:31 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-30 21:33:08 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-10-05 01:15:16 -07:00
2026-09-23 16:55:09 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-26 20:40:40 -05:00
2026-09-24 02:41:14 -05:00
2026-09-28 05:37:55 -07:00
2026-09-23 03:15:26 -07:00
2026-09-25 14:14:06 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-27 13:48:28 -05:00
2026-09-24 02:23:44 -04:00
2026-09-23 07:36:31 -04:00
2026-09-24 11:50:30 -04:00
2026-09-23 07:36:31 -04:00
2026-09-23 07:36:31 -04:00
2026-09-23 07:36:31 -04:00
2026-09-28 03:34:07 -07:00
2026-09-24 02:23:44 -04:00
2026-09-24 02:23:44 -04:00
2026-09-23 03:15:26 -07:00
2026-10-01 16:18:46 +05:30
2026-09-30 09:57:30 -05:00
2026-09-29 03:01:04 +05:30
2026-10-04 21:29:04 -07:00
2026-09-28 06:06:17 -07:00
2026-09-27 13:48:28 -05:00
2026-10-01 16:18:46 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-01 03:18:09 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-29 15:58:55 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-29 15:58:55 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-10-05 16:42:57 -05:00
2026-10-02 22:54:53 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-05 17:10:58 -07:00
2026-09-23 07:02:44 -04:00
2026-10-02 11:06:58 -05:00
2026-09-27 23:53:40 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-22 15:55:09 +05:30
2026-09-24 01:55:51 -04:00
2026-09-29 14:12:41 -04:00
2026-09-29 14:12:41 -04:00
2026-09-24 01:55:51 -04:00
2026-09-24 01:55:51 -04:00
2026-09-29 18:33:44 +05:30
2026-09-29 19:44:05 -05:00
2026-09-23 08:20:01 -04:00
2026-09-23 03:15:26 -07:00
2026-09-27 00:56:31 +05:30
2026-09-23 03:15:26 -07:00
2026-09-28 06:42:00 -07:00
2026-09-29 15:58:55 +05:30
2026-09-27 00:56:31 +05:30
2026-09-27 00:56:31 +05:30
2026-09-28 10:11:33 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 06:15:21 -04:00
2026-09-23 03:15:26 -07:00
2026-10-05 17:20:30 -07:00
2026-09-23 03:15:26 -07:00
2026-10-02 20:30:25 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 08:20:01 -04:00
2026-09-21 19:18:15 -04:00
2026-10-05 17:20:30 -07:00
2026-09-23 03:15:26 -07:00
2026-09-21 13:26:17 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-10-05 17:20:30 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-10-05 17:20:30 -07:00
2026-09-23 07:02:44 -04:00
2026-09-22 13:57:51 +05:30
2026-09-22 13:57:51 +05:30
2026-09-22 13:57:51 +05:30
2026-09-23 08:04:33 +05:30
2026-09-23 07:02:44 -04:00
2026-09-22 13:57:51 +05:30
2026-09-23 03:15:26 -07:00
2026-09-22 13:57:51 +05:30
2026-10-03 16:56:51 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 06:46:02 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-10-02 01:18:03 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-28 05:28:05 -07:00
2026-09-28 05:28:05 -07:00
2026-10-03 16:31:09 +05:30
2026-09-23 07:02:44 -04:00
2026-09-26 23:44:55 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-05 16:40:38 -05:00
2026-09-27 18:17:20 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-10-02 20:24:30 -05:00
2026-10-02 21:49:36 -05:00
2026-10-02 01:24:41 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-01 01:53:55 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-24 06:08:20 -04:00
2026-09-23 03:15:26 -07:00
2026-10-02 21:43:34 -05:00
2026-09-23 03:15:26 -07:00
2026-09-26 17:34:46 -05:00
2026-09-28 03:34:07 -07:00
2026-09-28 04:34:30 -07:00
2026-09-23 07:02:44 -04:00
2026-09-26 18:27:10 -05:00
2026-09-29 12:25:29 -05:00
2026-10-05 16:46:53 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 16:55:09 -04:00
2026-09-27 01:10:56 +05:30
2026-10-02 01:15:39 +05:30
2026-10-02 21:47:39 -05:00
2026-09-25 14:14:06 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-27 01:10:56 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 15:26:34 -04:00
2026-09-27 02:39:29 +05:30
2026-09-26 23:44:55 +05:30
2026-09-23 07:02:44 -04:00
2026-10-04 05:13:55 -07:00
2026-09-23 03:15:26 -07:00
2026-10-02 01:15:39 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-10-04 00:08:20 -07:00
2026-09-23 07:02:44 -04:00
2026-10-05 01:15:16 -07:00
2026-10-01 16:22:28 +05:30
2026-10-02 01:18:03 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-10-01 16:22:28 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 08:09:47 -07:00
2026-09-23 08:09:47 -07:00
2026-09-23 03:15:26 -07:00
2026-10-02 20:24:01 -05:00
2026-09-23 10:13:26 -04:00
2026-09-21 18:39:24 -07:00
2026-09-23 03:15:26 -07:00
2026-09-29 16:47:48 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-21 19:18:15 -04:00
2026-10-04 00:08:20 -07:00
2026-09-29 18:49:11 -05:00
2026-09-23 21:55:59 -04:00
2026-10-05 16:42:57 -05:00
2026-09-22 00:28:30 -04:00
2026-09-23 08:20:01 -04:00
2026-09-22 17:08:30 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-28 05:24:26 -07:00
2026-09-23 07:02:44 -04:00
2026-10-04 00:08:20 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 10:34:54 -07:00
2026-09-22 22:00:24 +00:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-03 10:26:12 -07:00
2026-09-26 22:40:54 +05:30
2026-09-27 21:30:10 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 05:35:36 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-29 15:58:55 +05:30
2026-09-29 15:58:55 +05:30
2026-09-29 15:58:55 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-26 22:40:54 +05:30
2026-09-23 07:02:44 -04:00
2026-10-03 09:38:33 -07:00
2026-09-23 03:15:26 -07:00
2026-09-28 19:02:20 +05:30
2026-09-23 15:26:34 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-04 12:42:25 -05:00
2026-09-23 03:15:26 -07:00
2026-10-05 16:47:32 -05:00
2026-10-05 15:28:17 -07:00
2026-09-26 20:58:16 -04:00
2026-09-23 07:02:44 -04:00
2026-10-05 15:36:45 -07:00
2026-09-26 23:44:55 +05:30
2026-09-23 07:02:44 -04:00
2026-09-29 02:06:58 +05:30
2026-09-23 03:15:26 -07:00
2026-10-03 23:05:48 -07:00
2026-09-24 04:38:23 -04:00
2026-09-28 11:29:49 -05:00
2026-09-23 03:15:26 -07:00
2026-09-30 10:32:09 -05:00
2026-09-26 16:51:19 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-25 14:58:09 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-25 13:49:31 -05:00
2026-10-03 09:38:33 -07:00
2026-09-23 03:15:26 -07:00
2026-10-03 09:43:03 -07:00
2026-10-05 00:23:05 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-30 23:07:09 -05:00
2026-09-26 17:19:34 -05:00
2026-10-03 10:52:57 -07:00
2026-10-06 00:00:57 -04:00
2026-09-28 05:37:55 -07:00
2026-10-05 14:35:39 -04:00
2026-10-01 00:52:58 -05:00
2026-10-03 17:03:54 -04:00
2026-09-21 19:18:15 -04:00
2026-10-05 16:42:57 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 06:46:02 -07:00
2026-09-24 03:52:03 -05:00
2026-10-05 20:08:11 +05:30
2026-09-21 19:18:15 -04:00
2026-10-05 18:39:43 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 16:55:09 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-29 12:25:29 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 15:43:51 -07:00
2026-09-23 21:28:38 +05:30
2026-09-26 22:26:05 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-04 13:18:57 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-22 00:16:15 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-10-04 00:08:20 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-04 00:08:20 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-24 03:42:38 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-22 07:05:11 -04:00
2026-09-23 03:15:26 -07:00
2026-09-24 16:49:18 +05:30
2026-09-23 03:15:26 -07:00
2026-09-24 07:39:33 -04:00
2026-09-30 23:05:43 -05:00
2026-09-30 23:10:24 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-27 00:19:50 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-29 20:57:45 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-05 15:56:28 -07:00
2026-10-05 15:56:28 -07:00
2026-09-25 14:24:56 -05:00
2026-10-04 02:54:56 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-21 19:18:15 -04:00
2026-09-23 07:02:44 -04:00
2026-09-29 02:06:58 +05:30
2026-09-21 19:18:15 -04:00
2026-09-23 07:02:44 -04:00
2026-09-29 15:28:19 -05:00
2026-09-26 06:20:21 +05:30
2026-10-03 16:30:40 +02:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-10-05 20:08:11 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 16:55:09 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 10:34:54 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-29 15:58:55 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-02 22:42:55 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 16:58:12 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-29 17:29:05 +00:00
2026-09-23 03:15:26 -07:00
2026-09-29 22:07:30 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-27 01:29:25 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-10-05 16:40:15 -05:00
2026-09-23 03:15:26 -07:00
2026-09-27 03:45:07 -04:00
2026-10-05 12:37:46 -04:00
2026-09-23 03:15:26 -07:00
2026-10-02 18:35:34 -05:00
2026-09-23 07:02:44 -04:00
2026-09-26 06:19:34 +05:30
2026-09-26 06:19:34 +05:30
2026-09-30 23:02:33 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-28 12:23:25 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 10:34:54 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-05 16:42:22 -05:00
2026-09-23 03:15:26 -07:00
2026-09-26 06:19:34 +05:30
2026-09-23 18:30:12 -05:00
2026-09-23 07:02:44 -04:00
2026-09-28 12:33:01 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-28 14:16:18 -07:00
2026-09-23 07:02:44 -04:00
2026-09-26 06:19:34 +05:30
2026-10-02 18:35:45 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-22 09:55:47 -04:00
2026-09-29 19:14:28 -05:00
2026-09-29 19:14:28 -05:00
2026-09-23 03:15:26 -07:00
2026-10-04 00:10:54 +05:30
2026-10-02 18:58:06 -05:00
2026-10-04 00:10:54 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-10-02 21:12:48 -05:00
2026-09-23 11:41:01 -04:00
2026-09-23 03:15:26 -07:00
2026-10-03 23:43:03 -04:00
2026-09-23 15:26:34 -04:00
2026-09-24 11:50:30 -04:00
2026-09-23 07:02:44 -04:00
2026-10-05 20:08:11 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 11:41:01 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-28 04:34:30 -07:00