Race condition when mounting loop devices
Metadata
Current evaluation
Race condition where loop partition devices (/dev/loopXpN) don't exist yet when mount is called after losetup --partscan. Triaged, maintainer suggested flock on parent device. Partial fix (wait for nodes) added in services/image.py via PR #428, but same failure still hit in pack path CI (19 days ago).
Suggested action: keep open
Reason: Issue is triaged and acknowledged by maintainer mwhudson who confirmed the race and suggested flock on the parent device. A partial fix (_wait_for_partition_nodes) was added in services/image.py (PR #428), but the pack/image.py path still lacks any wait, and the same class of failure was hit 19 days ago on PR #402 (non-sequential-partitions test). The issue remains reproducible and unfixed in the pack code path.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
55
Quick Win:
19.25
Staleness:
25
Complexity:
65
Confidence:
72
Support Request:
5
|
keep open | Race condition where loop partition devices (/dev/loopXpN) don't exist yet when mount is called after losetup --partscan. Triaged, maintainer suggested flock on parent device. Partial fix (wait for nodes) added in services/image.py via PR #428, but same failure still hit in pack path CI (19 days ago). | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
45
Confidence:
90
Support Request:
5
|
keep open | Intermittent race condition causes loop device partitions to disappear before mounting, leading to CI test failures. Triaged and acknowledged by maintainers, with a proposed workaround but no fix yet. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
45
Complexity:
65
Confidence:
85
Support Request:
5
|
keep open | Race condition causing mount failures on loop devices due to udev processing delays. Triaged bug with maintainer suggesting flock-based synchronization. Awaiting implementation or further investigation. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
45
Confidence:
90
Support Request:
5
|
keep open | Race condition causes mount failures when loop partition devices disappear before udevd finishes processing. Triaged bug with a maintainer-proposed fix, awaiting implementation. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
65
Confidence:
85
Support Request:
5
|
keep open | Race condition during loop device mounting causes failures when partitions disappear before udevd finishes processing. Triaged, with a maintainer suggesting flock-based synchronization. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
30
Confidence:
90
Support Request:
0
|
keep open | Loop device partition mounts fail due to a race condition before udev finishes processing. Triaged bug. Suggested fix uses flock on the parent device during mount. Awaiting implementation. |
Update history
| Date | Change |
|---|---|
| updated |
Related work
-
Related To:
imagecraft#428
(confidence 80%)
PR #428 added _wait_for_partition_nodes in services/image.py which partially addresses the race by polling for partition node existence after losetup --partscan, but does not cover the pack/image.py path or the udev remove/recreate race mwhudson described.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #340 fix: Avoid races with udev and loop devices | imagecraft | open | Adds flock LOCK_EX on the whole-disk node during mkfs and across loop partition mounts to fix udev/loop-device races; supersedes #330's approach. Open 118 days with no review or comments; CI mostly green but lint, title policy, and snap-builds checks failing. |