State service doesn't catch permission errors in XDG_RUNTIME_DIR
Metadata
Current evaluation
State service crashes with an internal error when XDG_RUNTIME_DIR is not writable, since _create_state_dir only catches FileExistsError. Should raise a user-friendly error or fall back to the home temp dir. Unfixed at HEAD; no comments in over a year.
Suggested action: keep open
Reason: The bug is still present at HEAD: _create_state_dir (state.py) only catches FileExistsError, so a PermissionError from mkdir on XDG_RUNTIME_DIR still surfaces as an internal error, and the /tmp-based fallback to util.get_home_temporary_directory() does not cover permission failures. It is a well-scoped, labelled (Type: Bug) report from a maintainer with concrete repro sources (Treeherder log, Matrix thread), so it should stay open despite 374 days of inactivity; it is not stale-closable because the problem is still reproducible.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
45
Quick Win:
31.5
Staleness:
75
Complexity:
30
Confidence:
78
Support Request:
5
|
keep open | State service crashes with an internal error when XDG_RUNTIME_DIR is not writable, since _create_state_dir only catches FileExistsError. Should raise a user-friendly error or fall back to the home temp dir. Unfixed at HEAD; no comments in over a year. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
90
Complexity:
25
Confidence:
85
Support Request:
10
|
needs triage | Unhandled permission errors in XDG_RUNTIME_DIR cause internal crashes in the state service. Suggests adding a fallback to CRAFT_STATE_DIR or a home temp directory. Currently untriaged with zero maintainer comments after 333 days. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
20
Confidence:
80
Support Request:
5
|
close stale | State service crashes on XDG_RUNTIME_DIR permission errors instead of falling back or showing a friendly error. Issue has been inactive for over a year with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
75
Complexity:
20
Confidence:
80
Support Request:
5
|
needs triage | State service throws an internal error on XDG_RUNTIME_DIR permission failures. Should catch the error, recommend CRAFT_STATE_DIR, or fall back to the home temp directory. Open, unassigned, awaiting implementation. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-application#838
(confidence 70%)
Merged PR 'fix(StateService): add g+rwx to the state dir' fixed a different state-dir permission case (LXD root needing group access), not the XDG_RUNTIME_DIR access failure in this issue.
Related issues
No related issues found above the similarity threshold.