[systemd-devel] Cleaning up transient scopes
Alexander Larsson
alexl at redhat.com
Mon Jun 1 03:47:53 PDT 2015
On tis, 2015-05-19 at 19:00 +0200, Lennart Poettering wrote:
> On Thu, 05.03.15 10:12, Alexander Larsson (alexl at redhat.com) wrote:
>
> > See, even when the sleep command died the scope still exists, and is
> > even ACTIVE.
>
> This appears to work fine here on git. There were some fixes to
> systemd-run made, but it would be cool if you could verify that this
> works for you.
I don't have a master build here, but its still an issue on F22 at least
(although that is a bit older). The only fix i saw on master was a race
condition though, but I can easily reproduce this with "slow" services.
I.E:
$ systemd-run --user --scope sleep 30 &
[1] 3998
Running as unit run-3998.scope.
$ systemctl status --user run-3998.scope
● run-3998.scope - /usr/bin/sleep 30
Loaded: loaded (/run/user/1000/systemd/user/run-3998.scope; static;
vendor preset: enabled)
Drop-In: /run/user/1000/systemd/user/run-3998.scope.d
└─50-Description.conf
Active: active (running) since Mon 2015-06-01 12:44:14 CEST; 8s ago
CGroup: /user.slice/user-1000.slice/user at 1000.service/run-3998.scope
└─3998 /usr/bin/sleep 30
Jun 01 12:44:14 nano systemd[1631]: Started /usr/bin/sleep 30.
Jun 01 12:44:14 nano systemd[1631]: Starting /usr/bin/sleep 30.
[alex at nano ~]$ sleep 30
[1]+ Done systemd-run --user --scope sleep 30
[alex at nano ~]$ systemctl status --user run-3998.scope
● run-3998.scope - /usr/bin/sleep 30
Loaded: loaded (/run/user/1000/systemd/user/run-3998.scope; static;
vendor preset: enabled)
Drop-In: /run/user/1000/systemd/user/run-3998.scope.d
└─50-Description.conf
Active: active (running) since Mon 2015-06-01 12:44:14 CEST; 45s ago
Jun 01 12:44:14 nano systemd[1631]: Started /usr/bin/sleep 30.
Jun 01 12:44:14 nano systemd[1631]: Starting /usr/bin/sleep 30.
I.e. the scope is still there and is "active" even though it knows the
one pid, main pid in it doesn't live anymore.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl at redhat.com alexander.larsson at gmail.com
He's a fast talking overambitious dwarf on the run. She's a strong-willed
cigar-chomping vampire with an evil twin sister. They fight crime!
More information about the systemd-devel
mailing list