[systemd-devel] v19: plymouth-quit-wait waits forever/no getty

Lennart Poettering lennart at poettering.net
Tue Mar 1 13:44:47 PST 2011


On Tue, 01.03.11 10:58, Andrey Borzenkov (arvidjaar at gmail.com) wrote:

> 2) getty's now are ordered after plymouth-quit-wait, so they are never
> started until plymouth --wait finishes. But it never finishes because
> plymouth-quit is never run. Unfortunately, TimeoutSec is not applied
> to oneshot units so it just sits there forever. Patch attached. After
> booting with it I see that plymouth-quit is actually run but apprently
> *after* plymouthquit-wait which has failed.

"plymouth quit" is implicitly invoked by gdm/X these days. During normal
boots plymouth-quit should be pulled in except when X is started which
terminates plymouth on its own.

> 
> [root at localhost ~]# systemctl status plymouth-quit.service
> plymouth-quit.service - Terminate Plymouth Boot Screen
>           Loaded: loaded (/etc/systemd/system/plymouth-quit.service)
>           Active: inactive (dead) since Thu, 03 Mar 2011 17:16:32
> -0500; 2min 41s ago
>          Process: 1448 ExecStart=/bin/plymouth quit (code=exited,
> status=0/SUCCESS)
>           CGroup: name=systemd:/system/plymouth-quit.service
> [root at localhost ~]# systemctl status plymouth-quit-wait.service
> plymouth-quit-wait.service - Wait for Plymouth Boot Screen to Quit
>           Loaded: loaded (/lib/systemd/system/plymouth-quit-wait.service)
>           Active: failed since Thu, 03 Mar 2011 17:16:31 -0500; 2min 44s ago
>         Main PID: 917
>           CGroup: name=systemd:/system/plymouth-quit-wait.service
> 
> Offhand: it would be *really* nice to have here explanation *why*
> service failed. You cannot expect people searching for this in logs
> every time, really.

Yupp, we actually do store some of the information why we failed, but do
not expose this to clients yet, simply because I wasn's sure how to
encode this best. As a D-Bus like error pair of name and description
string? Or just an errno? Or just an opaque human readable string? I am
tempted to add the latter for now, because we can then upgrade it later
on to more.

>  src/service.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/service.c b/src/service.c
> index 39a46d6..297f97b 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -2014,7 +2014,7 @@ static void service_enter_start(Service *s) {
>  
>          if ((r = service_spawn(s,
>                                 c,
> -                               s->type == SERVICE_FORKING || s->type == SERVICE_DBUS || s->type == SERVICE_NOTIFY,
> +                               s->type == SERVICE_FORKING || s->type == SERVICE_DBUS || s->type == SERVICE_NOTIFY || s->type == SERVICE_ONESHOT,
>                                 true,
>                                 true,
>                                 true,

Ah, good catch.

Hmm, this patch needs to be more complicated unfortunately: we don't
want timeouts on oneshot services by default (to not fuck with stuff
like fsck for example). Hence we should honour timeouts in all cases,
but choose different default timeout values depending on the type. 

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list