You signed in with another tab or window. Reload to refresh your session.
8000
You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests: worker-death coverage never kills a worker #41
Crash isolation is the documented reason for the RPC engine to exist, and no
test sends a signal to the worker process.
Evidence
tests/nanopynix/rpc/client/test_workerpool.py:98, test_worker_death_detection, force-closes the gRPC channel. Its own
comment says: "In multiprocessing mode, the worker is managed by
AsyncExitStack; kill via process is not directly exposed."
docs/nanopynix/architecture.md names the behaviour as the headline of the
engine: "a worker crash/OOM raises WorkerDiedError -- your process
survives."
Three distinct failures have no test:
SIGKILL during a call, which is what the OOM killer does.
An abort inside the worker on the Nix side, which is the SIGABRT case
that the docstring of nanopynix.init_libstore describes for experimental
features.
Death while handles are outstanding. Do the finalizers of ValueProxy
queue releases against a dead channel, and does Session.close() still
finish?
Scope
WorkerClient already keeps self._worker_proc for this purpose
(rpc/client/_pool.py:405-411). Add an accessor for tests, and add three
tests:
Kill during an in-flight store.query_path_info, and expect WorkerDiedError.
Kill while an EvalSession holds resolved ValueProxy objects, then call session.close(). Expect no hang, no second exception, and a reaped
process.
Open a fresh Session in the same process afterwards, and expect it to
work.
Mark the tests concurrency, so that the ThreadSanitizer matrix runs them.
Risk
Low for the library. Medium for flakiness of the suite. Bound each test with anyio.fail_after, and assert the class of the exception, not the message.
Acceptance criteria
All three tests pass on both store backends, and pass repeatedly under the concurrency marker.
Activity
test(asan): skip the runaway-recursion tests, which libasan cannot un…
test(asan): skip the runaway-recursion tests, which libasan cannot un…
fix(rpc): let an eval session close after its worker dies
test(asan): skip the runaway-recursion tests, which libasan cannot un…