vmm: guest event persistence holds the global state lock and blocks the async executor
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Trace HostApi.Notify into App::vm_event_report and inspect safe_write, the AppState mutex, and VM removal lifecycle. Add regression coverage for executor responsiveness, per-VM write ordering, cancellation, and removal safety; done means persistence no longer blocks the async executor while holding the global state lock.
Written by the indexing model from the issue text.
Description
Problem
HostApi.Notify calls synchronous App::vm_event_report on an async worker. An instance.info event executes safe_write (including file and directory fsync) while holding the global AppState mutex. A shutdown.progress event reporting powering off also writes its started marker under that mutex.
Slow storage therefore delays unrelated VMs’ control-plane state operations as well as the async worker. This is a source-level finding, not a measured production latency claim.
Fix
Move persistence off the executor and outside the global state lock. Preserve per-VM write ordering and serialize with VM removal, including when the notification request is cancelled. Add regression tests for responsiveness and lifecycle safety.
The supervisor log fsync changes in #1263 do not cover this call path.
- Dominant language
- Rust
- Stars
- 546
- Forks
- 96
- Avg merge
- 19h 22m
- Merged PRs (30d)
- 109
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Dstack-TEE/dstack
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Dstack-TEE/dstack#1301 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Dstack-TEE/dstack#1300 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Dstack-TEE/dstack#1299 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Dstack-TEE/dstack#1298 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Dstack-TEE/dstack#1297 ·
All issues in Dstack-TEE/dstack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100