oxidecomputer / oxidecomputer/crucible

crucible agent's apply_smf() is not removing all instances

Open
#542 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
260
Forks
34
Avg merge
2d 1h
Merged PRs (30d)
8

Description

Something is not cleaning up smf instances when regions are deleted.

After running a test that creates then deletes a disk in a loop, I can see both the
memory usage going up for agent, and the log file listing more and more messages each time apply_smf() runs:

Message like these:

Nov 29 06:27:36.485 ERRO remove downstairs instance: downstairs-66dab510-7749-4191-adb3-330aec2124d7, component: worker
Nov 29 06:27:36.485 INFO instance states: (Some(Disabled), None), component: worker
Nov 29 06:27:36.485 ERRO remove downstairs instance: downstairs-98be2db0-165b-4adb-9c3d-52f2afab8fed, component: worker
Nov 29 06:27:36.486 INFO instance states: (Some(Disabled), None), component: worker
Nov 29 06:27:36.486 ERRO remove downstairs instance: downstairs-0c941299-6abe-427e-9d39-c9ff67f2aa6b, component: worker
Nov 29 06:27:36.487 INFO instance states: (Some(Disabled), None), component: worker
Nov 29 06:27:36.487 ERRO remove downstairs instance: downstairs-de23a0eb-1c79-4f28-8eb5-df689ad5dbd7, component: worker
Nov 29 06:27:36.487 INFO instance states: (Some(Disabled), None), component: worker

Each loop of the create/delete disk script results in another pair of messages printed.

Something yet TBD is not completely removing items from the svc.instances() list.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the apply_smf() entry point and inspect how svc.instances() is updated when regions are deleted. Reproduce the create/delete disk loop described in the issue, then trace why disabled instances remain and why each run adds messages. Done means deleted instances are removed and repeated runs no longer increase memory use or duplicate removal logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.