forked from goodboy/tractor
a628eabb30
By re-purposing our `pexpect`-based console matching with a new `debugging/shield_hang_in_sub.py` example, this tests a few "hanging actor" conditions more formally: - that despite a hanging actor's task we can dump a `stackscope.extract()` tree on relay of `SIGUSR1`. - the actor tree will terminate despite a shielded forever-sleep by our "T-800" zombie reaper machinery activating and hard killing the underlying subprocess. Some test deats: - simulates the expect actions of a real user by manually using `os.kill()` to send both signals to the actor-tree program. - `pexpect`-matches against `log.devx()` emissions under normal `debug_mode == True` usage. - ensure we get the actual "T-800 deployed" `log.error()` msg and that the actor tree eventually terminates! Surrounding (re-org/impl/test-suite) changes: - allow disabling usage via a `maybe_enable_greenback: bool` to `open_root_actor()` but enable by def. - pretty up the actual `.devx()` content from `.devx._stackscope` including be extra pedantic about the conc-primitives for each signal event. - try to avoid double handles of `SIGUSR1` even though it seems the original (what i thought was a) problem was actually just double logging in the handler.. |_ avoid double applying the handler func via `signal.signal()`, |_ use a global to avoid double handle func calls and, |_ a `threading.RLock` around handling. - move common fixtures and helper routines from `test_debugger` to `tests/devx/conftest.py` and import them for use in both test mods. |
||
---|---|---|
.. | ||
asyncio_bp.py | ||
debug_mode_hang.py | ||
fast_error_in_root_after_spawn.py | ||
multi_daemon_subactors.py | ||
multi_nested_subactors_error_up_through_nurseries.py | ||
multi_subactor_root_errors.py | ||
multi_subactors.py | ||
open_ctx_modnofound.py | ||
per_actor_debug.py | ||
pm_in_subactor.py | ||
restore_builtin_breakpoint.py | ||
root_actor_breakpoint.py | ||
root_actor_breakpoint_forever.py | ||
root_actor_error.py | ||
root_cancelled_but_child_is_in_tty_lock.py | ||
root_timeout_while_child_crashed.py | ||
shield_hang_in_sub.py | ||
shielded_pause.py | ||
subactor_bp_in_ctx.py | ||
subactor_breakpoint.py | ||
subactor_error.py | ||
sync_bp.py |