Comment 30 for bug 966480

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

Confirmed in Ubuntu 14.04.1. There seems to be caused by a race condition or undefined behaviour.

"/etc/rc0.d/casper stop" does "plymouth --ping" to test whether plymouth is running, then does "plymouth message" to print the message to the screen , then "plymouth watch-keystroke" to read the enter key press. But at this point, "plymouthd --mode=shutdown" is already running. This results in a hang with the following processes running:

root 3527 0.0 0.0 4444 652 ? Ss 21:28 0:00 /bin/sh -e /proc/self/fd/9
root 3625 0.0 0.0 18072 368 ? S 21:28 0:00 @sbin/plymouthd --mode=shutdown
root 3629 0.0 0.0 4444 804 ? S 21:28 0:00 /bin/sh /etc/init.d/rc 0
root 3863 0.1 0.0 4444 804 ? S 21:28 0:00 /bin/sh -x /etc/rc0.d/S89casper stop
root 4089 0.0 0.0 4444 388 ? S 21:28 0:00 /bin/sh -x /etc/rc0.d/S89casper stop
root 4096 0.0 0.0 12808 448 ? S 21:28 0:00 plymouth watch-keystroke

There could be a race condition between the "plymouth --ping" test and the action, or between plymouthd being shutdown and the casper script running plymouth, or it could be that the plymouth commands just don't work when plymouthd is in shutdown mode. Either way, this can be fixed by removing the use of plymouth from casper and reverting to the alternative actions which read and write /dev/console. Patch attached.