apt auto refresh sometimes interferes with my snap builds
Metadata
Current evaluation
Snapcraft build-package installation can fail when the VM's unattended apt process holds the dpkg lock; retrying inside the VM succeeds, but the report has no maintainer triage.
Suggested action: needs triage
Reason: The report provides the exact lock error, occurs during MicroStack rebuilds, and succeeds on retry, indicating a transient apt/dpkg race. Current craft-parts still runs apt-get without lock waiting or retry handling, but the open report has no labels, assignee, or maintainer response, so it needs triage rather than being treated as resolved.
Evaluated by: mr-cal-bot
Impact:
30
Quick Win:
11
Complexity:
40
Confidence:
85
Actionability:
60
Issue body
I'm running an issue where snapcraft fails with the following output:
-----------------------
+ snapcraft --debug
Launching a VM.
Installing build dependencies: libnuma-dev libnuma1 librados-dev librados2 librbd-dev librbd1 libvirt-dev libvirt0 python-pkg-resources python-setuptools python3-pkg-resourc
es python3-setuptools
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
Could not install all requested build packages: libnuma-dev libnuma1 librados-dev librados2 librbd-dev librbd1 libvirt-dev libvirt0 python-pkg-resources python-setuptools py
thon3-pkg-resources python3-setuptools
-----------------------
It looks like the multipass vm is busy running some automated apt tasks in the background, which means that the snapcraft script can't get a lock when installing packages. Everything works if I run snapcraft again from within the vm, though the error message is annoying to come back to after getting up to get a coffee, expecting the snap to loyally build itself while I am away. :-)
This happens when building microstack, usually when I'm re-running a build after making changes (I don't think that I've seen this with a fresh build). My snapcraft yaml can be here: https://opendev.org/x/microstack/src/branch/master/snapcraft.yaml
Note that I'm adding a ppa and running apt update as part of the build of the uca-sources part, so this may be a self inflicted wound. I'll experiment with ordering, but would appreciate advice on best practices for handling this situation, if my ppa shenanigans are at fault here ...
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
30
Quick Win:
11
Complexity:
40
Confidence:
85
Actionability:
60
|
needs triage | Snapcraft build-package installation can fail when the VM's unattended apt process holds the dpkg lock; retrying inside the VM succeeds, but the report has no maintainer triage. | |
| stealth/space-bunny-alpha |
Impact:
44
Quick Win:
24
Complexity:
22
Confidence:
90
Actionability:
70
|
close resolved | Snapcraft build-package installation sometimes collides with automatic apt maintenance in a Multipass VM, causing dpkg lock errors; craft-providers 1.2.0 addresses this by disabling automatic apt actions during setup. | |
| qwen/qwen3.8-27b |
Impact:
25
Quick Win:
16
Staleness:
95
Complexity:
35
Confidence:
60
Support Request:
70
|
close stale | snapcraft build fails with dpkg lock error when background apt auto-refresh in multipass VM holds the lock; reporter suspects their own ppa/apt update in a part may be self-inflicted; open 2482 days, 0 comments, no labels, no maintainer interaction. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
100
Complexity:
15
Confidence:
90
Support Request:
85
|
close stale | User reports snapcraft failures due to apt lock conflicts in Multipass VMs. Issue is 6.7 years old, has zero comments, and describes a known background process race condition. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
35
Confidence:
90
Support Request:
75
|
close stale | Snapcraft build fails due to dpkg lock contention from background apt tasks in Multipass VM. Open for ~6.7 years with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
35
Confidence:
90
Support Request:
75
|
close stale | Snapcraft build fails due to dpkg lock contention from background apt processes in Multipass VM. Issue is over six years old, unlabelled, and has received no maintainer response. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
No related issues found above the similarity threshold.