tractor/tractor
Tyler Goodlet b23780c102 Make `request_root_stdio_lock()` post-mortem-able
Finally got this working so that if/when an internal bug is introduced
to this request task-func, we can actually REPL-debug the lock request
task itself B)

As in, if the subactor's lock request task internally errors we,
- ensure the task always terminates (by calling `DebugStatus.release()`)
  and explicitly reports (via a `log.exception()`) the internal error.
- capture the error instance and set as a new `DebugStatus.req_err` and
  always check for it on final teardown - in which case we also,
 - ensure it's reraised from a new `DebugRequestError`.
 - unhide the stack frames for `_pause()`, `_enter_repl_sync()` so that
   the dev can upward inspect the `_pause()` call stack sanely.

Supporting internal impl changes,
- add `DebugStatus.cancel()` and `.req_err`.
- don't ever cancel the request task from
  `PdbREPL.set_[continue/quit]()` only when there's some internal error
  that would likely result in a hang and stale lock state with the root.
- only release the root's lock when the current ask is also the owner
  (avoids bad release errors).
- also show internal `._pause()`-related frames on any `repl_err`.

Other temp-dev-tweaks,
- make pld-dec change log msgs info level again while solving this
  final context-vars race stuff..
- drop the debug pld-dec instance match asserts for now since
  the problem is already caught (and now debug-able B) by an attr-error
  on the decoded-as-`dict` started msg, and instead add in
  a `log.exception()` trace to see which task is triggering the case
  where the debug `MsgDec` isn't set correctly vs. when we think it's
  being applied.
2024-05-14 21:01:20 -04:00
..
_testing Start a new `._testing.fault_simulation` 2024-04-03 10:19:50 -04:00
devx Make `request_root_stdio_lock()` post-mortem-able 2024-05-14 21:01:20 -04:00
experimental Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
msg Rename `.msg.types.Msg` -> `PayloadMsg` 2024-05-10 13:15:45 -04:00
trionics Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
__init__.py Expose `MsgTypeError` from pkg 2024-04-05 16:32:15 -04:00
_child.py Hide `._entry`/`._child` frames, tweak some more type annots 2024-04-14 17:49:18 -04:00
_clustering.py Passthrough runtime kwargs from `open_actor_cluster()` 2022-12-11 19:56:08 -05:00
_context.py Rework and first draft of `.devx._frame_stack.py` 2024-05-08 14:51:56 -04:00
_discovery.py More spaceless union type annots 2024-03-11 10:33:06 -04:00
_entry.py "Icons" in `._entry`'s subactor `.info()` messages 2024-05-06 13:12:44 -04:00
_exceptions.py Change to `RemoteActorError.pformat()` 2024-05-06 13:01:56 -04:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_ipc.py Move `MsgTypeError` maker func to `._exceptions` 2024-04-22 18:24:02 -04:00
_mp_fixup_main.py Avoid importing mp for as long as possible 2022-02-17 11:55:26 -05:00
_multiaddr.py Fix doc string "its" typo.. 2023-11-06 15:44:21 -05:00
_portal.py Use `.recv_msg_w_pld()` for final `Portal.result()` 2024-05-09 09:47:13 -04:00
_root.py Hide some API frames, port to new `._debug` apis 2024-05-09 16:04:34 -04:00
_rpc.py Add a "current IPC `Context`" `ContextVar` 2024-05-07 15:35:45 -04:00
_runtime.py Adjust `._runtime` to report `DebugStatus.req_ctx` 2024-05-08 15:06:50 -04:00
_shm.py Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
_spawn.py Hide some API frames, port to new `._debug` apis 2024-05-09 16:04:34 -04:00
_state.py Add a "current IPC `Context`" `ContextVar` 2024-05-07 15:35:45 -04:00
_streaming.py More bitty (runtime) logging tweaks 2024-04-26 13:13:04 -04:00
_supervise.py Hide some API frames, port to new `._debug` apis 2024-05-09 16:04:34 -04:00
log.py Add a `.log.at_least_level()` predicate 2024-05-08 13:33:59 -04:00
to_asyncio.py Provision for infected-`asyncio` debug mode support 2024-03-25 16:09:32 -04:00