Intermitent snapd socket timeout
Metadata
Current evaluation
Intermittent snapd socket-activation timeout was fixed by retrying `snap watch` in merged PR #899 (commit e0f6bc7), released in craft-providers 3.3.0.
Resolution: closed resolved
Reason: PR #899 merged as commit e0f6bc7, adding retries for `snap watch` to work around snapd LP#2104066. The fix shipped in craft-providers 3.3.0.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
When running spread tests for craft applications, some (~1%) of the tests fail with `error: daemon is stopping to wait for socket activation`.
We should:
- investigate the issue
- fix it in craft-providers or raise a bug to the snapd team and find a workaround, if necessary
### To Reproduce
Run snapcraft or rockcraft's spread test suite.
### part yaml
```shell
```
### Relevant log output
```shell
2026-01-31 00:02:36.284 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical systemctl is-active systemd-udevd
2026-01-31 00:02:36.895 Executing on host: lxc --project snapcraft config set local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 user.craft_providers.timer 2026-01-31T00:02:36.895110+00:00
2026-01-31 00:02:37.033 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical systemctl enable systemd-udevd
2026-01-31 00:02:37.151 Set instance timer to '2026-01-31T00:02:36.895110+00:00'
2026-01-31 00:02:37.433 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical systemctl start systemd-udevd
2026-01-31 00:02:37.781 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical apt-get install -y snapd
2026-01-31 00:02:40.151 Executing on host: lxc --project snapcraft config set local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 user.craft_providers.timer 2026-01-31T00:02:40.151268+00:00
2026-01-31 00:02:40.418 Set instance timer to '2026-01-31T00:02:40.151268+00:00'
2026-01-31 00:02:43.419 Executing on host: lxc --project snapcraft config set local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 user.craft_providers.timer 2026-01-31T00:02:43.418832+00:00
2026-01-31 00:02:43.606 Set instance timer to '2026-01-31T00:02:43.418832+00:00'
2026-01-31 00:02:46.607 Executing on host: lxc --project snapcraft config set local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 user.craft_providers.timer 2026-01-31T00:02:46.607102+00:00
2026-01-31 00:02:46.872 Set instance timer to '2026-01-31T00:02:46.607102+00:00'
2026-01-31 00:02:49.873 Executing on host: lxc --project snapcraft config set local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 user.craft_providers.timer 2026-01-31T00:02:49.873097+00:00
2026-01-31 00:02:50.230 Set instance timer to '2026-01-31T00:02:49.873097+00:00'
2026-01-31 00:02:53.231 Executing on host: lxc --project snapcraft config set local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 user.craft_providers.timer 2026-01-31T00:02:53.231094+00:00
2026-01-31 00:02:53.494 Set instance timer to '2026-01-31T00:02:53.231094+00:00'
2026-01-31 00:02:53.940 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical ln -sf /var/lib/snapd/snap /snap
2026-01-31 00:02:54.172 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical systemctl enable --now snapd.socket
2026-01-31 00:02:54.765 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical systemctl restart snapd.service
2026-01-31 00:02:55.730 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap wait system seed.loaded
2026-01-31 00:02:56.494 Executing on host: lxc --project snapcraft config set local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 user.craft_providers.timer 2026-01-31T00:02:56.494538+00:00
2026-01-31 00:02:56.755 Set instance timer to '2026-01-31T00:02:56.494538+00:00'
2026-01-31 00:02:59.756 Executing on host: lxc --project snapcraft config set local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 user.craft_providers.timer 2026-01-31T00:02:59.755829+00:00
2026-01-31 00:02:59.900 Set instance timer to '2026-01-31T00:02:59.755829+00:00'
2026-01-31 00:03:00.339 Holding refreshes for snaps.
2026-01-31 00:03:00.340 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap refresh --hold
2026-01-31 00:03:00.616 Waiting for pending snap refreshes to complete.
2026-01-31 00:03:00.617 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap watch '--last=auto-refresh?'
2026-01-31 00:03:00.868 craft-providers error: Failed to wait for snap refreshes to complete.
2026-01-31 00:03:00.868 * Command that failed: "lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 SNAPCRAFT_BUILD_INFO=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap watch '--last=auto-refresh?'"
2026-01-31 00:03:00.868 * Command exit code: 1
2026-01-31 00:03:00.868 * Command standard error output: b'error: daemon is stopping to wait for socket activation\n'
2026-01-31 00:03:00.869 Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20260131-000057.705928.log'
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Intermittent snapd socket-activation timeout was fixed by retrying `snap watch` in merged PR #899 (commit e0f6bc7), released in craft-providers 3.3.0. | |
| stealth/space-bunny-alpha | — | closed resolved | Intermittent 'daemon is stopping to wait for socket activation' snapd failure fixed by adding retries around 'snap watch', merged as #899 (commit e0f6bc7) and released in craft-providers 3.3.0. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Fixed intermittent snapd socket timeout during spread tests in craft-providers 3.3.0 via PR #899. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
craft-providers#899
(confidence 100%)
Merged fix adding retries around the intermittent `snap watch` socket-activation failure.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #899 fix: retry 'snap watch' | craft-providers | merged | Merged #899 as commit e0f6bc7, adding retries for snap watch to work around snapd LP#2104066 and fix intermittent socket timeouts in #898. | |
| #870 snapd "daemon is stopping to wait for socket activation" error during LXD container initialization | craft-providers | closed | Fixed intermittent LXD initialization failures by retrying snap watch; merged in canonical/craft-providers#899 via commit e0f6bc7. |