usplash should not be killed by init on shutdown

Bug #34537 reported by Adam Zimmerman
40
Affects Status Importance Assigned to Milestone
usplash (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

When you shut down the livecd, the cd will be ejected. At this point the computer seems to freeze until you press enter (however, no prompt is shown).

This is on the dapper flight 5 livecd.

Changed in casper:
status: Unconfirmed → Confirmed
Revision history for this message
Tollef Fog Heen (tfheen) wrote :

The casper part of this has been fixed, so reassigning to usplash.

Revision history for this message
Paul Sladen (sladen) wrote :

Tollef: what does usplash need to do? Or is it that usplash should display a message:

  $ "Please press enter to restart your machine"?

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

Usplash needs to make sure it's not killed by init. Currently, the last message displayed is "sending all processes TERM signal" (or something like that, I'm too lazy to check).

Revision history for this message
Matt Zimmerman (mdz) wrote :

Perhaps usplash should be sent a message at the beginning of the shutdown process which tells it to ignore SIGTERM from now on?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Obviously that won't work, since /etc/init.d/sendsigs will just SIGKILL it later.

I have a usplash patch which shuts down gracefully, so that the messages after sendsigs are not obscured. Ironically, this looks worse, but is necessary in order to get the live CD working properly (it prompts the user to press enter after they've ejected the CD, which must happen very late).

If we insist on keeping usplash alive until the very end of the boot process, it's going to be messy. sendsigs uses killall5, which isn't very interested in excluding certain processes.

Another option would be to silence the remaining init scripts, so that the screen is simply blank from this point unless there is an error (it's only a few seconds)

Revision history for this message
Matt Zimmerman (mdz) wrote :

If we do try to have usplash stay alive until the very end, I think we need something like the following:

- have usplash write a proper pid file
- write something with something which will kill "everything except kernel threads, my own session, and this other PID here"
- use the above program in place of killall5 in sendsigs

Excluding based on the process name is not accurate enough; user processes which happen to be named usplash (either inadvertently or maliciously) would cause the system to be shut down without unmounting filesystems

Revision history for this message
Matt Zimmerman (mdz) wrote :

I've implemented the above solution locally, and meanwhile uploaded this for the beta:

 usplash (0.1-34) dapper; urgency=low
 .
   * When we are killed by SIGTERM, shut down gracefully, but don't switch VTs
     (workaround for Malone #34537)
     - This means that we fall back to text mode at the end of the shutdown
       sequence, rather than concealing messages (especially the casper
       prompt to press enter)

Revision history for this message
Matt Zimmerman (mdz) wrote :

Patches, source packages and i386 debs:

http://people.ubuntu.com/~mdz/splash-down/

Revision history for this message
Matt Zimmerman (mdz) wrote :

Scott has had a different idea which I quite like, which is to simply allow usplash to be killed (leaving the framebuffer intact) and restart it again afterward:

http://people.ubuntu.com/~scott/splash-down/

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Uploaded my fix.

Changed in usplash:
status: Confirmed → Fix Released
Revision history for this message
Gabe Gorelick (gabegorelick) wrote :

Not sure if this is related, but I've seen a regression in Karmic where usplash is killed by init on shutdown and then it switches to a virtual terminal. See bug #486877

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.