Removing backing directory of try mode snap breaks refresh, listing (at least 2.32.3, till 2.32.5)

Bug #1764977 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
High
Zygmunt Krynicki

Bug Description

I had a snap in my home directory, installed with "snap try". This created a symlink from /var/lib/snapd/snaps/foo_x1.snap to ~zyga/foo/. I moved ~/foo to ~/Documents/foo and then tried to refresh an unrelated snap bar. Refreshing bar failed with the following message:

zyga@t470:~$ sudo snap refresh bar --edge
error: cannot refresh "bar" stat /var/lib/snapd/snaps/foo_x4.snap: no such file or directory

Moving the directory ~/Documents/foo back to ~/foo fixes everything

This issue breaks refreshes of core so I'm bumping it to critical.

Zygmunt Krynicki (zyga)
summary: - Removing backing directory of try mode snap breaks refresh of other
- snaps
+ Removing backing directory of try mode snap breaks refresh, listing
+ (2.32.5)
description: updated
Changed in snapd:
importance: Undecided → Critical
Zygmunt Krynicki (zyga)
summary: - Removing backing directory of try mode snap breaks refresh, listing
- (2.32.5)
+ Removing backing directory of try mode snap breaks refresh, listing (at
+ least 2.32.3, till 2.32.5)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

When this happens I saw the following message in journal:

2018/04/18 10:59:22.512843 snapmgr.go:228: cannot read snap info of snap "classic-snap-analyzer" at revision x4: stat /var/lib/snapd/snaps/classic-snap-analyzer_x4.snap: no such file or directory

I also added a regression test: https://github.com/snapcore/snapd/pull/5067

Changed in snapd:
importance: Critical → High
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This is fixed in master now. It will be out in 2.33 most likely.

Changed in snapd:
status: New → Fix Committed
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.