forked from goodboy/tractor
Demonstrating the guilty `trio.Lock.acquire()` impl which puts a checkpoint inside its `trio.WouldBlock` handler and which will always appear to mask the "sync path" case on (graceful) cancellation. This first script draft demos the issue from within a `tractor.context` ep bc that's where it was orig discovered, however i'm going to factor out the `tractor` code and instead just use a `.trionics.maybe_raise_from_masking_exc()` to demo its low-level ignore-case feature. Further, this script exposed a previously unhandled remote graceful cancellation case which hangs: - parent actor spawns child and opens a >1 ctxs with it, - the parent then OoB (out-of-band) cancels the child actor (with `Portal.cancel_actor()`), - since the open ctxs raise a ctxc with a `.canceller == parent.uid` the `Context._is_self_cancelled()` will eval `True`, - the `Context._scope` will NOT be cancelled in `._maybe_cancel_and_set_remote_error()` resulting in any bg-task which is waiting on a `Portal.open_context()` to not be cancelled/unblocked. So my plan is to factor this ^^ scenario into a standalone unit test as well as another test which consumes from al low-level `trio`-only version of **this** script-scenario to sanity check the interaction of the unmasker-with-ignore-cases usage implicitly around a ctx ep. |
||
---|---|---|
.. | ||
devx | ||
ipc | ||
__init__.py | ||
conftest.py | ||
test_2way.py | ||
test_advanced_faults.py | ||
test_advanced_streaming.py | ||
test_cancellation.py | ||
test_child_manages_service_nursery.py | ||
test_clustering.py | ||
test_context_stream_semantics.py | ||
test_discovery.py | ||
test_docs_examples.py | ||
test_ext_types_msgspec.py | ||
test_infected_asyncio.py | ||
test_inter_peer_cancellation.py | ||
test_legacy_one_way_streaming.py | ||
test_local.py | ||
test_multi_program.py | ||
test_pldrx_limiting.py | ||
test_pubsub.py | ||
test_remote_exc_relay.py | ||
test_resource_cache.py | ||
test_ringbuf.py | ||
test_root_infect_asyncio.py | ||
test_root_runtime.py | ||
test_rpc.py | ||
test_runtime.py | ||
test_shm.py | ||
test_spawning.py | ||
test_task_broadcasting.py | ||
test_trioisms.py |