/var/lib/snapd/state.json corrupts too easily

Bug #2002628 reported by 林博仁(Buo-ren, Lin)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Triaged
Wishlist
Unassigned

Bug Description

Here is an report from the IoT usecase:

More robust way to store state.json? - snapd - snapcraft.io
https://forum.snapcraft.io/t/more-robust-way-to-store-state-json/29554

and here is another one which seems to be a regular desktop user:

what is the problem here . I'm unable to use firefox or snap services. : Ubuntu https://www.reddit.com/r/Ubuntu/comments/1091lio/what_is_the_problem_here_im_unable_to_use_firefox/

Comparing to other components in the system the state file seems to be too fragile to use in the production and will make snapd stop functioning when it broke, is there any way we can prevent this from happening?

## Possible solutions/workarounds

* Switch to a format that is more resilient to unexpected corruption(e.g. SQLite)
* (For the desktop usecase) improve error message when curruption occurs

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

Thanks for raising this.

Changed in snapd:
status: New → Triaged
importance: Undecided → Wishlist
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.