Incorrectly handling SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT
Metadata
Current evaluation
Issue with SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT handling and incorrect CPU counts in Multipass. Maintainer is addressing via craft-application integration.
Suggested action: keep open
Reason: The maintainer explicitly stated they are working on a solution via integration with craft-application and will close the issue once that support is available in snapcraft for core24. The issue is triaged and part of an ongoing architectural effort.
Impact:
80
Quick Win:
24.0
Staleness:
40
Complexity:
70
Confidence:
80
Support Request:
10
Issue body
There are two issues when it comes to `SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT` environment variable.
My laptop has 8 cores, verified with `/proc/cpuinfo`
And I've set `SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT=8` but in the snapcraft log I see:
```
CPU count (from process affinity): 8
Invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT value
```
And then it gets worse... later in the log, there is:
```
CPU count (from process affinity): 2
Invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT value
```
Which is another issue: CPU count of 2 is not correct.
snapcraft was launched as:
```
SNAPCRAFT_BUILD_ENVIRONMENT=multipass snapcraft
```
snap versions:
```
$ snap info snapcraft | grep installed
installed: 7.2.9 (8619) 65MB classic
$ snap info multipass | grep installed
installed: 1.11.0 (8465) 112MB -
```
[snapcraft-20230207-135726.857780.log](https://github.com/canonical/craft-providers/files/10679759/snapcraft-20230207-135726.857780.log)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
80
Quick Win:
24.0
Staleness:
40
Complexity:
70
Confidence:
80
Support Request:
10
|
keep open | Issue with SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT handling and incorrect CPU counts in Multipass. Maintainer is addressing via craft-application integration. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
45
Complexity:
60
Confidence:
85
Support Request:
5
|
keep open | Reports invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT handling and inaccurate CPU detection in Multipass. Maintainer acknowledged, tracking internally, and created follow-up issue #531 for CPU/memory config. Awaiting craft-application integration fix. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
40
Complexity:
60
Confidence:
90
Support Request:
10
|
keep open | Issue tracking incorrect SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT handling and CPU detection in multipass. Maintainer acknowledged it, linked to internal tracking, and will close once craft-application integration delivers the fix. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
40
Confidence:
80
Support Request:
10
|
close stale | Reports invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT handling and incorrect CPU count detection in multipass. Maintainer deferred the fix to craft-application integration and opened a new issue for CPU/memory settings. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-providers#531
(confidence 90%)
Maintainer created this as a more specific bug for CPU/memory settings for Multipass instances.
-
Related To:
canonical/craft-application#180
(confidence 80%)
Referenced by maintainer as the source of new build count support being integrated.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3997 providers: pass SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT to instance | snapcraft | merged | Merged into main. Resolves a bug where the SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT environment variable was not passed to the build instance, ensuring correct parallel build limits during snap creation. | |
| #4785 bug: snapcraft uses '1' for CRAFT_PARALLEL_BUILD_COUNT on multi-core machine | snapcraft | closed | Snapcraft incorrectly set CRAFT_PARALLEL_BUILD_COUNT to 1 on multi-core machines due to an environment expansion bug in craft-application. Resolved and fixed in Snapcraft 8.4.4. | |
| #1988748 SNAPCRAFT_PARALLEL_BUILD_COUNT not respected if set in `override-build:` | snapcraft (launchpad) | closed | Closed without resolution or merge. The report details a bug where SNAPCRAFT_PARALLEL_BUILD_COUNT set in override-build is ignored, but no developer response or fix was provided, indicating the issue was abandoned or marked stale. | |
| #4041 utils: log envvar SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT when invalid | snapcraft | merged | Merged into main. Adds logging for the SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT environment variable when invalid. Approved by reviewer, passed CI, and contains no functional changes. | |
| #1795666 snapcraft overcommits CPUs in a multipass environment | snapcraft (launchpad) | closed | Closed without resolution. The report identified snapcraft overcommitting CPUs and RAM in multipass environments, suggesting a 1GB per CPU thread minimum. No fix was implemented. |