Repository navigation
Description
What
Nothing under nanopynix/rpc/ reads the exit status of a worker process.
grep -rn "returncode\|exitcode" nanopynix/src/nanopynix/rpc/ returns
nothing. The parent sees the transport close and knows that the worker went
away, never how.
An orderly shutdown, a SIGKILL from a test, and an abort() from a failed
C assertion therefore all present the same way: a stream that ended.
Evidence
A run of the whole suite against nanopynix-tests-nix_2_34-nogc reported
2077 passed, 13 skipped and the systemd unit reported Result=success. A
worker core-dumped inside that run:
22:08:18 PID 533673 SIGABRT si_code: SI_USER
Command Line: 'nanopynix (daemon)'
User Unit: nanopynix-fork-final.service
The run window was 22:03 to 22:15, and the process is in the cgroup of the
unit. Nothing in the report mentions it.
The abort is not yet explained, and this issue is not about that abort. It
is about the parent having no way to tell. The tests that kill a worker use
SIGKILL, and the one module whose subject is a deliberate SIGABRT asserts
returncode == 0 in every case, so neither accounts for it.
Why an exception in the child cannot solve this
Three tiers of failure cross the worker boundary, and only two of them can
become an exception:
| in the worker | reaches the caller as an exception? |
|---|---|
| Python raised | yes, and it keeps its class -- the status trailer carries ErrorIdentity |
C++ threw a nix::Error |
yes, the binding converts it first |
abort(), a failed assert, std::terminate |
never |
abort() raises SIGABRT with the default handler. The process ends at that
instant. No stack unwinds, no except runs, nothing is pickled and sent.
There is no moment at which the worker could report.
The death is still observable, in the parent.
multiprocessing.Process.exitcode gives -6 for SIGABRT, -9 for
SIGKILL and -11 for SIGSEGV. That value is available now and discarded.
What to build
- Read the exit code of a worker before deciding what its disappearance
meant. - A negative exit code that the pool did not ask for becomes its own
exception, which names the signal, rather than a generic disconnect. - A test that kills a worker on purpose says so, so that an expected
-9
stays expected and an unexpected-6does not.
Where the new class sits in the exception hierarchy is part of the work.
This repository already has a worker-death taxonomy, and a new class has to
join it rather than sit beside it.
Why it matters beyond the tests
The ASAN and no-collector jobs exist to find memory errors. A sanitizer
report that kills a worker currently reaches the result only if its text
lands in a log that a later grep reads. An exit code that the parent
already has is a stronger signal than that.
A consumer gets the same repair for free: an aborting worker today looks like
a worker that finished.
Acceptance criteria
- A worker killed by a signal the pool did not request raises an exception
that names the signal. - A test that kills a worker on purpose still passes, and says that it meant
to. - The suite fails when a worker aborts.
Tests
- A worker sent
SIGABRTfrom outside the pool, and the exception the caller
receives. - The existing worker-death tests, which must keep passing.
Activity
ci(nogc): run the no-collector suite on every commit
test(darwin): skip the builds that a chroot store cannot do on macOS
test(darwin): skip the builds that a chroot store cannot do on macOS
ci(darwin): stop the crash reporter that holds an aborted worker
feat(rpc): tell a caller which signal killed its worker, and report a…
ci(nogc): run the no-collector suite on every commit
test(darwin): skip the builds that a chroot store cannot do on macOS
ci(darwin): stop the crash reporter that holds an aborted worker