KVM too fast for plymouth-upstart-bridge

Kind of a hilarious bug, really… I recently installed another Ubuntu 14.04 server running inside a KVM with a rather fast storage backend, therefore the system apparently boots just a tiny bit faster than my other images have in the past. Problem is, apparently that slows down the boot process as init thinks something must be crashing and decides to respawn it for good measure…

[ 2.311174] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[ 2.811553] init: plymouth-upstart-bridge main process (191) terminated with status 1
[ 2.812789] init: plymouth-upstart-bridge main process ended, respawning
[ 2.874117] init: plymouth-upstart-bridge main process (210) terminated with status 1
[ 2.875167] init: plymouth-upstart-bridge main process ended, respawning
[ 2.904155] init: plymouth-upstart-bridge main process (217) terminated with status 1
[ 2.905289] init: plymouth-upstart-bridge main process ended, respawning
[ 2.928618] init: plymouth-upstart-bridge main process (221) terminated with status 1
[ 2.929713] init: plymouth-upstart-bridge main process ended, respawning
[ 49.975826] Adding 2093052k swap on /dev/mapper/[...]

Yep, that’s right – 47 seconds waiting and idling, doing nothing when the image could have booted in a fraction of that time.

To fix it, simply add a sleep 2 to your /etc/init/plymouth-upstart-bridge.conf

[...]
stop on (stopping plymouth
         or stopping plymouth-shutdown)     

console output

exec plymouth-upstart-bridge
sleep 2

Init won’t freak out anymore and starts the image as it’s supposed to:

[    1.225045] random: lvm urandom read with 16 bits of entropy available
[    1.281118] bio: create slab <bio-1> at 1
[    1.370262] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
[    1.684687] tsc: Refined TSC clocksource calibration: 2500.001 MHz
[    2.153550] Adding 2093052k swap on /dev/mapper/[....]-swap_1.  Priority:-1 extents:1 across:2093052k FS
[    2.169332] EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro
[    2.190451] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[    2.408937] EXT4-fs (vda1): mounting ext2 file system using the ext4 subsystem
[    2.417990] EXT4-fs (vda1): mounted filesystem without journal. Opts: (null)
[    3.316769] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    3.316778] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[    3.495345] FS-Cache: Loaded

Way better….

3 thoughts on “KVM too fast for plymouth-upstart-bridge”

  1. Upstart has no sleep stanza, so the proposed solution is synctactically invalid. Maybe it was copied from a script section where it is valid. Maybe the line
    post-stop exec sleep 2
    helps, but I have not tried it. It adds a two seconds wait after the plymout process dies, delaying respawn. If I understand well, that was the intention.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.