fix: Avoid races with udev and loop devices
Metadata
Current evaluation
Applies exclusive file locks during mkfs and mount operations to prevent udev and loop device race conditions, but remains unreviewed and pending documentation after 27 days.
Suggested action: needs triage
Reason: The PR has not yet been assessed by maintainers, as indicated by the absence of labels, comments, or an assignee. It requires initial triage to validate the fix, check for conflicts with the referenced PR #330, and determine if it's ready for technical review.
Staleness:
40
Complexity:
40
Issue body
- **fix(image): hold flock LOCK_EX on whole-disk node during mkfs**
- **fix(chroot): hold flock LOCK_EX across mount(2) of loop partitions**
I argued with Claude until it produced a better fix than #330.
- [x] I've followed the [contribution guidelines](https://github.com/canonical/imagecraft/blob/main/CONTRIBUTING.md).
- [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [x] I've successfully run `make lint && make test`.
- [ ] I've added or updated any relevant documentation.
- [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| 2026-06-01 11:07:40.815282+00:00 | qwen3.6-35b-moe-q4 |
Staleness:
40
Complexity:
40
|
needs triage | Applies exclusive file locks during mkfs and mount operations to prevent udev and loop device race conditions, but remains unreviewed and pending documentation after 27 days. |
| 2026-06-01 11:05:08.313178+00:00 | pending | — | — | — |