A firewall window killed by a theme change
The firewall's desktop app started at login and was gone seven minutes later, killed along with a scheduled job it had never belonged to.
The firewall’s desktop app starts at login. On the 2nd it started at 19:13:23 and was gone at 19:20:14, and nothing brought it back. The daemon behind it kept running, but without the app there was no one to ask about new connections.
At 19:20:13 the scheduled theme change ran. One of its hooks restyles the
firewall app by killing it and starting it again with setsid. The theme
job runs as a systemd service of Type=oneshot with
KillMode=control-group, and when a oneshot finishes, systemd kills
everything left in its cgroup. setsid gives a process a new session. It
does not move it out of the cgroup. So the app it had just relaunched was
killed with the job at 19:20:16, at the first scheduled theme change after
every login.
The first fix tried was to launch it in its own scope, the way autostart does. That failed the test too. The new process sits in the service’s cgroup until it moves itself into the scope, and it loses that race when the hook exits first.
What works is uwsm-app -t service, which asks the user manager to start
the app as its own service, so it is never in the job’s cgroup at all. In a
test oneshot the app came back in its own unit and was still running twenty
seconds later.
It has not yet been seen through a real scheduled change. Leaving a session is not leaving a cgroup.