Backlog
Labels
bugSomething isn't working
Description
Found by model checking (the Quint specs in #206). A counterexample in the model, each step read in the code at e281a48. Not reproduced on a running system.
- Where:
lib/hyper/node.ex:66-84:UsersandNetsit under:rest_for_oneahead of the VM supervisor.node.ex:101-110and181-186: a boot claims its ids first and builds the rootfs before it starts the VM. - Chain:
- Boot A claims uid U and is still in
Img.create_mutable/3. Userscrashes.:rest_for_onerestarts it with an empty state and kills every VM. A's boot runs in its caller's process and survives.- The fresh pool counts up from its minimum again and hands U to boot B: at once if U was the lowest id, otherwise after as many claims as came before A's.
- A starts its VM on U as well.
- Boot A claims uid U and is still in
- Effect: two VMs on one uid. The same goes for
Netand a NetId. If A's boot fails instead, its latereleaseputs U on the fresh pool's free queue while B runs on it. - Trigger: a pool process crashing while any boot is between its claim and its bind.
- Model:
id_pool_small --step stepPoolRestartviolatesidExclusive. The trace, fromspec/on that branch afternpm ci:node_modules/.bin/quint run id_pool.qnt --main id_pool_small --step stepPoolRestart \ --invariant idExclusive --max-samples 100000 --max-steps 40
- Repro: not written. E2E: kill
Hyper.Node.Netwhile a boot is increate_mutable, boot again, and compare the NetIds. - Fix: one option is to stamp each claim with the pool's incarnation and have the boot fail when the pool that issued its id is gone. Related: Give each VM its own supervision subtree for its resources #97.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Fields
No fields configured for issues without a type.
Projects
- StatusShow more project fieldsTodo
Activity