snap command doesn't finish when snapd already gave up

Bug #1592088 reported by Chad Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Install "hello-world". In one terminal, run hello-world.sh and "cd $SNAP" in it.

In another terminal, run "snap remove hello-world". Notice that it doesn't quit. Snapd prints something about not being able to unmount, and it hangs or crashes or something.

It is not waiting for the running "sh" process to finish. You can now go back to the other terminal and exit the shell. (Wait a few minutes, and exit that terminal too. This might matter somehow!)

Now nothing is holding open the umount request, but the running "snap" command doesn't finish.

You're forced to control-c the snap request. There's a good possibility that the snap state is stuck somehow until next reboot (for a normal user).

Chad Miller (cmiller)
description: updated
Revision history for this message
Paweł Stołowski (stolowski) wrote :

I can reproduce with the current release of snapd (2.13). Indeed, looking at 'snap changes', snapd is stuck on:
213 Doing 2016-09-02T16:34:26Z - Remove "hello-world" snap

However, this problem appears to be fixed with current snapshot of the code (the upcoming 2.14)!

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

This symptom is fixed in the current master code (and likely in the latest SRU that is going in now). The umount will happen synchronously even if there are still processes alive.

That said, please note that the old behavior was not as bad as it sounds from the description. The snapd daemon is not stuck due to the original removal being stopped, and CTRL-C will correctly not force it to simply abort midway through. Instead, snapd will keep track of the pending work and retry every few minutes by itself, attempting to complete the work that was requested and partially done.

Changed in snapd (Ubuntu):
status: New → Fix Committed
Michael Vogt (mvo)
Changed in snapd (Ubuntu):
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.