Skip to content

fix(modelchecker): interrupted run stops promptly - #473

Open
lczyk wants to merge 2 commits into
fizzbee-io:mainfrom
lczyk:fix/interrupt-exit
Open

lczyk wants to merge 2 commits into
fizzbee-io:mainfrom
lczyk:fix/interrupt-exit

Conversation

@lczyk

@lczyk lczyk commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

fixes #384.

  • a stopped model-check run prints Model checker stopped and returns before GetAllNodes and the exists check. a partial graph can't refute exists, and deadlock / liveness were already skipped when stopped. it also no longer prints Valid Nodes: or writes the communication file. simulation is unchanged.
  • a second signal exits with 130. the handler used to return after one signal while signal.Notify stayed registered, so later signals were dropped. the channel is now buffered (2).
  • a signal that arrives before the processor is published now stops it once it is.

testing

  • tests/test_interrupt.py: interrupts a long run and checks for Model checker stopped and no Valid Nodes:. fails on main, passes here. not wired into ci.
  • stop-to-exit at ~600k nodes: 2.2s on main, 0.1s here.
  • second signal: no automated test, since the stop now usually finishes before a second signal lands. seen exiting 130 by hand.
  • test_references.py --skip-lovable: 172 passed, 0 failed, counts unchanged.

After the first SIGINT / SIGTERM stopped exploration, the checker still
walked the partial graph with GetAllNodes and the exists-witness check,
which on a large graph took longer than the exploration did. A partial
graph cannot refute an exists assertion, so report the stop and return
before walking it.

The signal handler also took one signal and returned while signal.Notify
stayed registered, so every later signal was dropped and only SIGKILL
ended the process. A second signal now exits with status 130. The
channel is buffered, as signal.Notify requires, and a signal that lands
before the processor is published now stops it once it is.

Fixes fizzbee-io#384.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: interrupted run does not stop and resists further SIGINT / SIGTERM

1 participant