enter kills X when booting Live CD or w/cryptsetup with plymouth text plugin

Bug #540256 reported by Colin Watson on 2010-03-17
54
This bug affects 8 people
Affects Status Importance Assigned to Milestone
plymouth (Ubuntu)
Critical
Scott James Remnant (Canonical)
upstart (Ubuntu)
Critical
Scott James Remnant (Canonical)

Bug Description

Binary package hint: plymouth

While this is the same symptom as in bug 538213, I'm intentionally reporting a new bug since it's possible my problem has a different cause.

Pressing Enter after live CD boot (20100317 Ubuntu desktop i386 image) kills X. This is true either in live session mode (gdm) or when using ubiquity-dm. This image used plymouth 0.8.0~-15, so I tried remastering it with 0.8.0~-16, but the same is true there as well. I'm using kvm, and so plymouth uses the text plugin. I can reproduce this every time.

Between X dying and restarting, a black screen is displayed briefly; on this screen I see a few junk characters at the top left in (I think) a reddish colour, specifically "^\◆" (at least the third character looks like a diamond, I'm not sure exactly which codepoint it is), which looks rather as if keypresses are being interpreted in a garbage keymap, probably raw mode.

I've attached a syslog from my remastered image (plymouth 0.8.0~-16) booted with --verbose in live session mode. The X log says that it caught SIGQUIT; it's not very informative but I've attached it as well. When gdm restarts X, the new server ends up on vt8.

Colin Watson (cjwatson) wrote :
Colin Watson (cjwatson) wrote :
Martin Pitt (pitti) wrote :

Confirmed: 100% reproducible in KVM (which uses text backend). Does not affect real iron when using the graphical plymouth renderer. This also reproduces if you boot the live system on real iron without the "splash" argument.

Changed in plymouth (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Colin Watson (cjwatson) wrote :
summary: - enter kills X when booting with text plugin
+ enter kills X when booting Live CD or w/cryptsetup with plymouth text
+ plugin
Changed in plymouth (Ubuntu):
status: Confirmed → Triaged
milestone: none → ubuntu-10.04-beta-1
assignee: nobody → Scott James Remnant (scott)
importance: High → Critical

This bug is caused by the following:

 * plymouth started from the initramfs (where it will set the terminal into Raw Mode)
 * upstart resetting the terminal back into Canonical Mode
 * plymouth deactivate goes to set back into Canonical Mode, sees it's already there, and does not set the "terminal is not unbuffered" flag
 * X starts and resets the terminal back Raw Mode
 * plymouth quit goes to set back into Canonical Mode again, and since the "terminal is not unbuffered" flag was not reset, and the terminal is still in Raw Mode, it does reset back into Canonical Mode
 * user presses Enter, which in Canonical Mode is C-\ 0x0A
 * X receives SIGQUIT (C-\)

This means there are two bugs here:

 * plymouth doesn't set the "terminal is not unbuffered" flag, and thus retries setting the terminal

fixing that would alone fix the Enter-kills-X bug. But since the terminal is Canonical Mode throughout the boot, plymouth will not receive or handle input correctly (enter would give it SIGQUIT too) - so we have to address that problem too.

Having plymouth reassert Raw Mode would just bring back timing bugs if it did that while X was starting...

Currently investigating why Upstart resets it to Canonical Mode in the first place.

Changed in upstart (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
milestone: none → ubuntu-10.04-beta-1
assignee: nobody → Scott James Remnant (scott)
Changed in plymouth (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart - 0.6.5-5

---------------
upstart (0.6.5-5) lucid; urgency=low

  * init/main.c:
    - Don't change the settings of the foreground console, this is often
      owned by plymouth and not supposed to be in Canonical Mode; all other
      paths have stty sane settings anyway (which these are not), so there
      really isn't need for init to do this. LP: #540256.
 -- Scott James Remnant <email address hidden> Wed, 17 Mar 2010 22:34:55 +0000

Changed in upstart (Ubuntu):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package plymouth - 0.8.0~-17

---------------
plymouth (0.8.0~-17) lucid; urgency=low

  [ Scott James Remnant ]
  * src/libply-splash-core/ply-terminal.c:
    - To restore a terminal into Canonical Mode, rather than setting flags
      that happen to be the opposite of what cfmakeraw() removes, set the
      flags that stty's sane mode sets.
    - Ensure that we clear the "is unbuffered" flag on every exit path from
      ply_terminal_set_buffered() that means the terminal is Canonical Mode
      so that we don't reset it back to Canonical Mode again unexpectedly
      when closing out the terminal under X.
    LP: #540256.

  [ Steve Langasek ]
  * src/main.c: allow clients to watch for <enter> as a keystroke.
    LP: #539182
 -- Scott James Remnant <email address hidden> Wed, 17 Mar 2010 22:36:47 +0000

Changed in plymouth (Ubuntu):
status: Fix Committed → Fix Released
tags: added: iso-testing
Jeff Lane (bladernr) wrote :

Just confirming that I updated to -17 and the issue on my test systems has disappeared.

Henning Schröder (hgschroeder) wrote :

Woohoo! It works. Thanks.

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

Duplicates of this bug

Other bug subscribers