Design 47 H2: H-A-774, the node-engine takes its locks in one order; a stuck stop says why and ends

This commit is contained in:
2026-11-26 20:12:10 +01:00
parent 079cab8a88
commit 1d23aed27f
@@ -1087,3 +1087,19 @@ mesh-delivery 3b1f03ce, mesh-tools 393449e, mesh-catalog 17e1bfb6 and mesh-sdk b
package-published were said again a moment before; its version-released clears it. The version was not released within
its bound, which is what the finding says, and no special case for the pass is added (principles 3 and 7). Issue 1984
note 8's two rows (1984/AC5) then expect version-unreleased, cleared at the version-released.
- **H-A-774 (the node-engine takes its locks in one order, and a stop or a run's end that cannot finish says why and
ends, 20:12)** 26 Nov, issue 1984; on g14's node-engine standing still from 19:13 to its restart at 19:53 (research-
readers, 26 Nov 19:53 and 20:11: the early composition pass holds the composer's lock and asks the session's node
record, which waits on the haves lock; the haves pass holds the haves lock and asks the composer for a manifest; the
stop then waits on the session's saying lock, held by a link's facts waiting on the haves lock; no goroutine trace
exists). (1) No callback of the node-engine's environment is called while the composer's lock is held: what the
composer needs from it (the node's record, what runs) is read before the lock is taken; and the haves pass lets go of
the haves lock before it asks the composer for a module's manifest. One lock is never taken while another is held
across a call to another part (principle 3: nothing stands still silently). (2) The end of a node agent's run waits on
its composer, and the process's stop waits on its link, each within a bound, a setting of the node-engine with a
default of 60 s (under the service manager's 90 s stop); past it the node-engine says what it waits on in one line,
writes every goroutine's stack to its journal, and ends, so the launcher starts it again and the next stall is
readable (principles 3, 4 and 11). How it is checked: a unit test with no bus in which the environment's node record
waits on a lock another goroutine holds while it asks a manifest fails today within its bound and passes with (1); a
guard test that fails when an environment or manifest callback is made with the composer's lock or the haves lock
held; a test that a stop past its bound says its line, writes the stacks and ends.