Bug#813879: systemd: Assertion 's->exec_command[SERVICE_EXEC_START]' failed service_enter_start()
Alexandre Detiste
alexandre.detiste at gmail.com
Mon Feb 8 15:34:53 GMT 2016
Le lundi 8 février 2016, 18:18:20 Yuriy M. Kaminskiy a écrit :
> Problem is, we started executing unit, spawned StartPre command, then
> unit file was removed, systemctl daemon-reload was issued, unit
> structure become half-ghost, then we got SIGCHLD for that StartPre
> command from the already-removed unit. Oops.
The half-ghost issue is the reason the two commands are
"encapsulated" in a single 'sh -c' call.
Without that the second call simply vanish.
cron-after-var.service is even weirder;
it's just the least worst way to do it.
>
> With 96fb824 applied, end result would be same:
>
> @@ -1332,6 +1345,12 @@ static void service_enter_start(Service *s) {
> c = s->main_command = s->exec_command[SERVICE_EXEC_START];
> }
>
> + if (!c) {
> + assert(s->type == SERVICE_ONESHOT);
> + service_enter_start_post(s);
> + return;
> + }
> +
>
> c is NULL, s->type here is _SERVICE_TYPE_INVALID, so we'll die in assert
> anyway :-\
>
> It is possible that upstream systemd version is still affected, you may
> want to try install jessie's systemd-cron 1.3.* into sid and play with
> install/removal in a loop.
A long time ago running systemctl daemon-reload in a loop was just enough to crash systemd.
And doing a big update will leads to so many calls to daemon-reload anyway.
> Completely untested patches for systemd master and backport to v215 is
> attached.
More information about the Pkg-systemd-maintainers
mailing list