During further analysis of this issues I have some comments:
1) There's no mechanism in the state engine to prevent spinning of tasks. This is the direct cause of the CPU usage.
2) There's no mechanism in snapd to prevent removal of revisions that are in active use. While some of this this will become available once ongoing work on refresh-app-awareness lands, when we can at least analyse the processes and their resource usage, I wonder if there's something we can do short-term to improve the situation.
During further analysis of this issues I have some comments:
1) There's no mechanism in the state engine to prevent spinning of tasks. This is the direct cause of the CPU usage.
2) There's no mechanism in snapd to prevent removal of revisions that are in active use. While some of this this will become available once ongoing work on refresh- app-awareness lands, when we can at least analyse the processes and their resource usage, I wonder if there's something we can do short-term to improve the situation.
As a way to address 2) I've opened https:/ /github. com/snapcore/ snapd/pull/ 7433