snapd enters fail state after corrupted snap.yaml (probably)

Bug #1782990 reported by Ondrej Kubik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
High
John Lenton

Bug Description

classic system: Ubuntu server 16.04.1
snap version:
snap 2.34.2+git872.88ec69f~ubuntu16.04.1
Core edge channel, revision: 5104

While developing snap and combining use of 'snap try' and editing of snap.yaml I have managed to crash snapd to the point it won't restart
log from journalctl for snapd.service suggests there is indeed some yaml parsing panic.
https://paste.ubuntu.com/p/yXQFc2Qcms/

If this is the case it should sure not derail snapd to the point it cannot recover....

Manually un mounting trubled snap from /snap/<snap-name>/<revision>
removed crash, so snapd service can start again.

Next attempt to 'snap try' will immediately crash snapd and service enters fail state as before, validating it's snap.yaml issue

snap.yaml causing the trouble:
https://paste.ubuntu.com/p/CTpvcF6vF8

Revision history for this message
Ondrej Kubik (ondrak) wrote :

corruption in snap.yaml is caused by two identical item in environment section.

Seems like service fail state is related to snap try, when snap.yaml is edited, but snapd has no clear way to refuse it, as it has been already installed as previous revision with snap try

When doing clean install, snap is refused and snapd service recovers

Revision history for this message
John Lenton (chipaca) wrote :
Changed in snapd:
importance: Undecided → High
assignee: nobody → John Lenton (chipaca)
status: New → In Progress
John Lenton (chipaca)
Changed in snapd:
status: In Progress → Fix Committed
John Lenton (chipaca)
Changed in snapd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.