← Back to issue list

LXD issue when build multiple charms in parallel

View original Github issue

Metadata

Project
craft-providers
Number
#391
Type
issue
State
open
Author
beliaev-maksim
Labels
Type: Bug
Created
Updated
Closed

Current evaluation

LXD race condition causing parallel charm build failures; reopened by maintainer after resurfacing in modern Charmcraft

Suggested action: keep open

Reason: The issue was reopened by maintainer @lengau on 2025-02-06 because @PietroPasotti is seeing the same LXD error in modern Charmcraft, with recent CI evidence from canonical/parca-agent-operator#55. This is a valid bug that was previously fixed but has resurfaced, and a maintainer has explicitly reactivated it.

Impact: 75 Quick Win: 26.25 Staleness: 45 Complexity: 65 Confidence: 75 Support Request: 10

Issue body

### Bug Description issue in LXD when build multiple projects in parallel ### To Reproduce https://github.com/canonical/knative-operators/actions/runs/6024286376/job/16429412492 ### part yaml _No response_ ### Relevant log output ```shell charmcraft internal error: LXDError(brief='Failed to wait for snap refreshes to complete.\n* Command that failed: "lxc --project charmcraft exec local:charmcraft-knative-operator-146046-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 snap watch \'--last=auto-refresh?\'"\n* Command exit code: 1\n* Command standard error output: b\'error: daemon is stopping to wait for socket activation\\n\'', details=None, resolution=None) ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 75
Quick Win: 26.25
Staleness: 45
Complexity: 65
Confidence: 75
Support Request: 10
keep open LXD race condition causing parallel charm build failures; reopened by maintainer after resurfacing in modern Charmcraft
qwen/qwen3.6-35b-a3b
Staleness: 20
Complexity: 60
Confidence: 85
Support Request: 10
keep open LXD error during parallel charm builds. Reopened in 2025 as issue persists in modern Charmcraft despite prior closure.
qwen3.6-35b-a3b-mtp-q6
Staleness: 25
Complexity: 50
Confidence: 85
Support Request: 10
keep open Reopened bug reporting LXD socket activation errors during parallel charm builds. Recently confirmed active in modern Charmcraft CI, awaiting maintainer investigation.
qwen3.6-35b-a3b-mtp-q6
Staleness: 35
Complexity: 60
Confidence: 85
Support Request: 10
keep open LXD socket activation error during parallel charm builds. Originally marked fixed but reopened in Feb 2025 after reappearing in modern Charmcraft CI. Currently awaiting investigation.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: charmcraft#1132 (confidence 85%)

    Identical LXD race condition when packing multiple charms simultaneously; charmcraft#1132 was closed as fixed but this issue was reopened because the bug resurfaced

  • Related To: charmcraft#554 (confidence 70%)

    Another historical issue about concurrent build problems with LXD race conditions

Related issues

Issue Project State Summary Similarity
#554 Issues with concurrent builds charmcraft closed Concurrent charm builds triggered LXD race conditions and project conflicts. A fix resolving these concurrency issues is now included in Charmcraft, closing the issue.
84%
#1132 LXD race condition when packing multiple charms simultaneously charmcraft closed Fixed in charmcraft and craft-providers. Parallel LXD commands like lxc project create and lxc copy caused race conditions during simultaneous charm packing. Concurrency controls resolved the issue in charmcraft edge and candidate 2.4.0.
84%
#506 Build a charmed failed charmcraft closed charmcraft build failed due to an outdated LXD version lacking project support. Maintainers requested version details. Closed without resolution, likely abandoned, with a request to reopen if the problem persists.
73%
#647 `charmcraft build` sometimes fails on `apt install` inside the lxd container charmcraft closed Closed as a duplicate of issue #567. The report details intermittent apt-get lock failures during charmcraft build inside LXD containers, suspected to be caused by unattended-upgrades.
71%
#164 Can't build the same charm in parallel charmcraft closed Closed as a duplicate of issue #103 after build directory handling was updated. The parallel build race condition was reportedly addressed, but the issue was ultimately closed due to lack of follow-up information from the reporter.
70%