Can you attach the output of snap changes ? Specifically, there should be a change that is in Doing state, please attach the output of snap change <id> of that change as well.
271 Done today at 15:27 JST today at 15:27 JST Install “lenovo-wwan-dpr” snap from file “lenovo-wwan-dpr_1.0.2-wwan-dpr_amd64.snap”
272 Done today at 15:28 JST today at 15:28 JST Connect lenovo-wwan-dpr:modem-manager to snapd:modem-manager
273 Done today at 15:28 JST today at 15:28 JST Connect lenovo-wwan-dpr:hardware-observe to snapd:hardware-observe
274 Doing today at 15:28 JST - Running service command
Yes , i can see Doing . Is there a way , i can forcefully remove snap ?
command snap change <id> doesnot work for me like snap change <274> or snap change 274
So if you run snap change 274 there’s no output? Can you check the journal maybe? Running sudo journalctl --since 15:28 should produce sufficient output.
No output but using ‘snap tasks 274’ , i can see below:
Status Spawn Ready Summary
Doing today at 15:28 JST - Run service command “start” for services [“wwan-dpr”] of snap “lenovo-wwan-dpr”
To test my modification locally , I have executed below commands:
You can run snap abort 274 to abort the change and then you should be able to remove the snap. FWIW I would look into why the service cannot be started. Probably inspecting the journal will help.
Still i was unable to remove snap. I saw binary running . So , i killed process as i have mentioned below and then it worked.
I found that binary i.e ‘/snap/lenovo-wwan-dpr/x1/bin/X2’ was running . So , i just kill the process by check id using ‘ps -ef’. After than i can remove snap . So , its working now.
Hello @mborzecki . While testing my updated snap , i am getting this issue again i.e error while removing snap . Although, i can fix this by manually killing process of binary but i think there might be some way to be fixed from snap side or else , i am missing something.
Issue Log:
root@nitin-ThinkPad-X1-Nano-Gen-1:/home/nitin# snap remove lenovo-wwan-dpr
error: snap “lenovo-wwan-dpr” has “service-control” change in progress
Jounalctl log during this issue is below:
dbus-daemon[1567]: [session uid=1000 pid=1567] Activating via systemd: service name=‘org.freedesktop.Tracker1.Miner.Extract’ unit=‘tracker-extract.service’ requested by ‘:1.2’ (uid=1000 pid=1563 comm="/usr/libexec/tracker-miner-fs " label=“unconfined”)
Which means that there is a running change related to this snap. Inspect the output of snap changes for any changes that are in doing state. Then you can run snap change <id> for a specific change and see what is happening there.
Hello @mborzecki I can see below log . I am not sure, if i am missing something … It will be helpful, if you can update , in case i am missing something ? Thank you
From the logs, lenovo-wwan-dpr is waiting for systemd to report that its services have been started. Journal logs from the time of the installation would be more useful. The startup job be killed by systemd if it doesn’t complete within the default timeout (usually 90s) and the install will fail. I see that there is another install which run just minutes before which failed too. Ultimately you need to figure out why the services do not start.
Thank you … Still i am checking and trying to find root cause, as i didn’t get any extra information from previously shared journalctl log .
Below is what i am doing, I am not sure if i am using services correctly for my snap or not ? Any comments on below?
“Application A” (binary) -> using “system call (“xxx”)” Launches “Application b” (binary) which will keep running correctly.
I have made “Application A” as daemon which is “oneshot” so that it restarts after every reboot .
In this case, when i explicitly kill running process of “Application b” binary then i am able to perform “snap remove xx”
Also , While installing it always shows "snap has “install-snap” change in progress’ and when i reboot system , snap gets started correctly but while removing snap it shows ““lenovo-wwan-dpr” has “service-control” change in progress”