[systemd-devel] [PATCH] Fix assertions while disabling unexisting target units

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sun Jul 14 20:00:28 PDT 2013

On Sun, Jul 14, 2013 at 05:03:29PM +0300, Oleksii Shevchuk wrote:
> > Can you be a bit more explicit, how was this condition triggered?
> 1. enable templated target (blahbah at something.target)
> 2. make mistake and disable that as service (systemctl disable
>    blahbah at something)
> 3. enjoy SIGABRT
So the problem happens when disabling a non-existent instance unit.

Your fix undoes the change that introduced this problem:
-                if (q == -ENOENT) {
+                if (q == -ENOENT && i->path) {
because the condition in if now cannot be satisfied.

A different solution is needed. Unfortunately this area
of code seems to have more problems:

# systemctl enable kmsconvt at tty5.service
ln -s '/etc/systemd/system/kmsconvt at .service' '/etc/systemd/system/getty.target.wants/kmsconvt at tty5.service'
# systemctl disable kmsconvt at tty5.service
rm '/etc/systemd/system/autovt at .service'
rm '/etc/systemd/system/getty.target.wants/kmsconvt at .service'
rm '/etc/systemd/system/getty.target.wants/kmsconvt at tty5.service'

Basically the whole idea of removing all symlinks pointing to the
template is borked.


More information about the systemd-devel mailing list