Charmcraft crash when snap is used in /tmp directory
Metadata
Current evaluation
Charmcraft crashed with a permission error when run from /tmp due to strict snap confinement. The issue was resolved by switching to classic confinement mode, which removed the restriction. Closed as fixed.
Suggested action: —
No scores available.
Issue body
Seen today:
```bash
$ pwd
/tmp/charm/
$ charmcraft init
charmcraft internal error! PermissionError: [Errno 13] Permission denied: '/var/lib/snapd/void' (full execution logs in /home/mark/snap/charmcraft/common/charmcraft-log-shi2xw2j)
```
I suspect this is snap confinement doing its job, and we just need to catch the permission error and handle it gracefully.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Charmcraft crashed with a permission error when run from /tmp due to strict snap confinement. The issue was resolved by switching to classic confinement mode, which removed the restriction. Closed as fixed. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved by switching the charmcraft snap to classic confinement mode, eliminating the /tmp permission denied error. The issue was closed as the packaging restriction was removed. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without code changes. The /tmp crash stemmed from snap confinement restrictions. The problem was resolved by migrating the charmcraft snap to classic confinement mode, which removes the permission error. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Charmcraft crashed with a permission error when run from /tmp due to strict snap confinement. Resolved by switching the snap package to classic confinement mode, eliminating the restriction. Closed without code changes. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Charmcraft crashed with a permission error when run from /tmp due to strict snap confinement. Resolved by switching the snap package to classic confinement mode, which removed the restriction. Closed as fixed. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #380 Charmcraft cannot build or pack from tmp dirs created with tempfile.mkdtemp | charmcraft | closed | Fixed. Charmcraft failed to pack from tempfile.mkdtemp directories due to snap confinement mount namespace restrictions. The issue was resolved when Charmcraft transitioned to classic confinement in v1.0.0, eliminating the path resolution problem. | |
| #646 Failed to inject host Charmcraft snap into target environment | charmcraft | closed | Closed. Maintainer confirmed the issue is resolved in recent Charmcraft versions and cannot be reproduced. A user workaround suggested running charmcraft clean --verbose prior to building. | |
| #388 Charmcraft pack cannot run in a CI? | charmcraft | closed | CI build failures were resolved by switching to the charmcraft classic snap on the edge channel, bypassing strict confinement restrictions. The issue was closed after the user confirmed the workaround fixed the build process. | |
| #288 snap: strict -> classic confinement for Charmcraft snap | charmcraft | merged | Merged the change to switch Charmcraft snap confinement from strict to classic. Added python3 stage packages and hardcoded a symlink to bypass a Snapcraft bug. Approved by two reviewers and passed CI. |