Bug 403467

Summary: Discover does not kill invoked snap process on SIGTERM
Product: [Applications] Discover Reporter: Felipe Peter <mr-peipei>
Component: Snap BackendAssignee: Aleix Pol <aleixpol>
Status: RESOLVED NOT A BUG    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Felipe Peter 2019-01-21 15:26:58 UTC
SUMMARY
Killing Discover when stuck during snap installation leads to the snapd process still running afterwards

STEPS TO REPRODUCE
1. Bug 403463
2. Kill Discover process with KSysGuard
3. Run "snap install clion --classic" from CLI 

OBSERVED RESULT
"error: snap "clion" has "install-snap" change in progress"
A snapd process is still running. The process can't be killed.

EXPECTED RESULT
Discover can be killed in a save way without messing things up.
Comment 1 Felipe Peter 2019-01-21 15:52:25 UTC
Okay, I am not sure if I am getting this right. If I understand correctly, the snapd process is just running all the time in the background and can't be killed.

What helped me to fix this was
"snap changes" to find the ID of the broken install
"snap abort ID" to abort the install

Is this something that Discover could prevent?
Comment 2 Nate Graham 2019-02-06 04:25:41 UTC
(In reply to MrPepe from comment #1)
> Okay, I am not sure if I am getting this right. If I understand correctly,
> the snapd process is just running all the time in the background and can't
> be killed.
That's correct.

The real bug to be fixed here is Bug 403463.