← Back to issue list

Snapcraft crashes with some entries in `.ssh/config`

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1857685
Type
issue
State
closed
Author
~callegar
Labels
—
Created
Updated
Closed

Current evaluation

Crash was upstream, not a Snapcraft defect: Multipass's libssh read ~/.ssh/config and segfaulted on options like proxyjump. Fixed by canonical/multipass PR #1286; maintainers closed this as Invalid.

Resolution: closed not a bug

Reason: ~saviq confirmed the fix landed in canonical/multipass#1286 (upstream report canonical/multipass#1259) and ~sergiusens closed the Launchpad bug as Invalid on 2020-02-21, since the fault lay in Multipass/libssh rather than Snapcraft; no Snapcraft code change was made (no matching commits in the repo).

Evaluated by: mr-cal-bot

No scores available.

Issue body

On my system most snapcraft commands crash with messages like ``` An error occurred when trying to execute 'sudo -i env SNAPCRAFT_HAS_TTY=True snap set core refresh.hold=2019-12-26T14:05:30.283562Z' with 'multipass': returned exit code -11. ``` In fact, the commands that crash are all those involving the usage of `multipass`. The issue is in fact in `multipass` and specifically in the `libssh` used by multipass. For some reason, the latter ends up reading `~/.ssh/config`. Furthermore, it crashes when the latter includes parameters that `libssh` does not understand, such as `proxyjump`, etc. Moving away `~/.ssh/config` is a sufficient workaround to avoid the crash. See also https://github.com/canonical/multipass/issues/1259. There seem to be two different problems here: - the fact that in `multipass` the library `libssh` ends up reading `~/.ssh/config` when there is no need to do so; - and most important the fragility of `libssh` that ends up failing ungracefully for things it does not know how to manage. Neither of those are actual bugs with `snapcraft`, but I think it is worth having an issue open here in case someone hits the same problem.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Crash was upstream, not a Snapcraft defect: Multipass's libssh read ~/.ssh/config and segfaulted on options like proxyjump. Fixed by canonical/multipass PR #1286; maintainers closed this as Invalid.
stealth/space-bunny-alpha — closed not a bug Not a Snapcraft bug: segfaults (exit -11) came from multipass's libssh misreading ~/.ssh/config. Fixed upstream in canonical/multipass#1286; Launchpad bug closed as invalid by ~sergiusens.
stealth/space-bunny-alpha — closed not a bug Closed as invalid for Snapcraft: the crash originated in Multipass/libssh and was fixed by canonical/multipass#1286; moving ~/.ssh/config was a workaround.
stealth/space-bunny-alpha — closed not a bug Closed as external/non-Snapcraft bug; the failure originated in Multipass’s libssh parsing of ~/.ssh/config. Moving the SSH config file was a documented workaround.
qwen/qwen3.6-35b-a3b — — Closed as external. The crash stems from multipass's libssh failing on unsupported SSH config directives, not snapcraft. A workaround involves relocating the SSH config file. The report was closed as informational since the root cause lies in an upstream dependency.
qwen/qwen3.6-35b-a3b — — Closed as not a snapcraft bug. The crash originates from multipass libssh failing on unsupported SSH config directives like proxyjump. Workaround involves temporarily removing ~/.ssh/config. The underlying issue was tracked upstream in the multipass repository.

Update history

Date Change
created

Related work

  • Likely Fixed By: multipass#1286 (confidence 92%)

    Cited by ~saviq on 2020-02-03 as the pull request that fixed the libssh/.ssh/config crash.

  • Duplicate Of: multipass#1259 (confidence 90%)

    Upstream Multipass bug report linked as the original place where the root cause was tracked.

Related issues

Issue Project State Summary Similarity
#1867052 Snapcraft crashes while creating snap for ssh-audit snapcraft (launchpad) closed Closed as stale after prolonged inactivity; no Snapcraft PR or commit was cited as resolving the ssh-audit FileNotFoundError.
72%
#1907721 Snapcraft broken on ARM64 snapcraft (launchpad) closed Closed as a configuration issue: a system-wide Python package broke apt-installed Snapcraft, while Multipass lacked ARM64 support; maintainers recommended the Snapcraft snap and --use-lxd.
70%
#5145 snapcraft fails to launch multipass instance when multipass isn't pre-installed snapcraft open Snapcraft emits cryptic 'Remote "snapcraft" is unknown or unreachable / exit code 2' when Multipass can't launch the build instance; maintainer traced it to image-server unavailability or non-amd64 hosts, fix tracked in craft-providers#211
70%