node-tools starts no bundle again once it is stopping (group fix/shutdown-bound, issue 1126) #46

Merged
mesh-tools merged 2 commits from fix/shutdown-bound into main 2026-10-28 15:05:14 +00:00
Member

Delivery group fix/shutdown-bound (mesh-host, mesh-catalog, mesh-tools). Issue 1126 note 86.

During ace's shutdown the service manager sent SIGTERM to node-tools' whole group, and the launcher started about 60 bundles again ('power's bundle exited (SIGTERM) …; started again in 500ms'). I think a restarted client (the power watcher, asking logind and so polkit) then started dbus and polkit again after their stop jobs, and the shutdown hung.

On SIGTERM or SIGINT, main now calls launch.ShutDown() first. From then on no bundle is started, neither by a restart nor by launch.Start (which covers runtime.load's first start). A bundle still running keeps answering. The flag lives in the process: a restart of node-tools for an upgrade starts clear, and a crash while serving still restarts its bundle.

Tests: TestABundleIsStartedAgainUnlessTheRuntimeIsStopping (two rows, a late Start), failing first; 0.29 s (RestartFirst 10 ms). node-tools: 128 unit, 2 integration.

Reviewed-by: rev-shutdown@shanks at a9b02bc676

Delivery group fix/shutdown-bound (mesh-host, mesh-catalog, mesh-tools). Issue 1126 note 86. During ace's shutdown the service manager sent SIGTERM to node-tools' whole group, and the launcher started about 60 bundles again ('power's bundle exited (SIGTERM) …; started again in 500ms'). I think a restarted client (the power watcher, asking logind and so polkit) then started dbus and polkit again after their stop jobs, and the shutdown hung. On SIGTERM or SIGINT, main now calls launch.ShutDown() first. From then on no bundle is started, neither by a restart nor by launch.Start (which covers runtime.load's first start). A bundle still running keeps answering. The flag lives in the process: a restart of node-tools for an upgrade starts clear, and a crash while serving still restarts its bundle. Tests: TestABundleIsStartedAgainUnlessTheRuntimeIsStopping (two rows, a late Start), failing first; 0.29 s (RestartFirst 10 ms). node-tools: 128 unit, 2 integration. Reviewed-by: rev-shutdown@shanks at a9b02bc67604fffd906146c12260d2bed90928d4
mesh-tools added 2 commits 2026-10-28 14:51:47 +00:00
The service manager stops node-tools by signalling its whole group, so every
bundle gets SIGTERM with it; the launcher took each exit for a fault and started
the bundle again, for the 15 s the runtime took to stop. On ace's reboot of
2026-10-28 those restarted bundles dialled the system bus once polkit and the bus
had stopped, the bus and polkit came back during the shutdown, nothing stopped
them a second time, and the reboot waited 29 minutes on its job timeout.

ShutDown, called first on SIGTERM, keeps any bundle from starting again, by a
restart or by a call; a running one still answers.
node-tools: keep the stopping-runtime test under a second, and start no first bundle once stopping
mesh/delivery merged: source.main moved to novox/mesh-tools@27266f99a3c3
mesh/delivery-group group fix/shutdown-bound merged: every member is merged
mesh/check pass a9b02bc67604 on 6cc33988801f | unit 2192 run, 3794 kept, 57 skipped | integration 2208 run, 3829 kept, 57 skipped | over bound: unit, …
a9b02bc676
The test watched two seconds per row; a 10 ms restart pause and a 250 ms window
prove the same. launch.Start itself now refuses while the runtime stops, so a
reload's first start is held too (issue 1126).
Author
Member

Delivery novox/mesh-tools@a9b02bc67604 — merged since 2026-10-28T15:05:15Z

Source — source.main moved to novox/mesh-tools@27266f99a3. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.

Group fix/shutdown-bound: novox/mesh-catalog@6724dab0cf, novox/mesh-host@bc28606d45, novox/mesh-tools@a9b02bc676

  • composed together: pass — the checker's verdict at the members' heads (420d9ef1bdb7)

Transitions

  • 2026-10-28 14:51 (new) → proposed (announced): novox/mesh-tools#46's head announced
  • 2026-10-28 14:51 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
  • 2026-10-28 15:05 ready → merged (merged): on the trunk its modules follow: merged there

The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-tools@a9b02bc67604` — **merged** since 2026-10-28T15:05:15Z **Source** — source.main moved to novox/mesh-tools@27266f99a3c3. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Group** `fix/shutdown-bound`: novox/mesh-catalog@6724dab0cf96, novox/mesh-host@bc28606d4566, novox/mesh-tools@a9b02bc67604 - composed together: pass — the checker's verdict at the members' heads (420d9ef1bdb7) **Transitions** - 2026-10-28 14:51 (new) → proposed (announced): novox/mesh-tools#46's head announced - 2026-10-28 14:51 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false) - 2026-10-28 15:05 ready → merged (merged): on the trunk its modules follow: merged there The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
mesh-tools merged commit 27266f99a3 into main 2026-10-28 15:05:14 +00:00
mesh-tools deleted branch fix/shutdown-bound 2026-10-28 15:05:14 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-tools#46