Bug 71996 - output to /dev/console during boot lost
Summary: output to /dev/console during boot lost
Status: RESOLVED INVALID
Alias: None
Product: plymouth
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 15:00 UTC by Scott Moser
Modified: 2014-04-07 16:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
/sbin/init wrapper that will demonstrate the issue (2.93 KB, text/plain)
2013-11-25 15:57 UTC, Scott Moser
Details

Description Scott Moser 2013-11-25 15:00:16 UTC
During early boot, plymouth captures writes to /dev/console. As I understand it, it is supposed to re-play that content later. Whether or not it intends to is not the issue. In Ubuntu cloud-images (and in other cases) users may write data to /dev/console that needs to be seen on the other side (ie a serial logger or 'get-console-ouptput' EC2 api call).

This bug is easily reproducible on a local kvm, a cloud such as EC2 or a local lxc container.  In my opinion, it should be considered "data loss".  The issue is that a user cannot reliably write data to /dev/console.

See the attached 'my-logger.conf' for an upstart job that simply writes data early in boot to /dev/console. Sometimes data "lost" is available in /var/log/boot.log, but sometimes it doesn't even seem to make it there. bug 682831 (http://pad.lv/682831) has an attachment 'myhack-init' that does a similar thing but starts outputting by replacing /sbin/init and then calling /sbin/init itself.

I'd really appreciate it if someone was able to take a look at this.  I'm willing to help reproduce it and can even give access to some cloud-instances that can reproduce if necessary.
Comment 1 Scott Moser 2013-11-25 15:57:25 UTC
Created attachment 89759 [details]
/sbin/init wrapper that will demonstrate the issue

See attachment here, which will reproduce this bug.
Comment 2 Ray Strode [halfline] 2013-11-25 16:39:46 UTC
Does the version of plymouth you're using have add_consoles_from_file() in main.c ?  If not, pulling in the commits that add that function and then subsquently fix that function may fix this issue.

We used to infer serial consoles from the kernel command line.  These days we read them directly from /sys/class/tty/console/active
Comment 3 Scott Moser 2013-11-26 14:06:34 UTC
Ray,
 thanks for the response.
 The version of plymouth we have is '0.8.8-0ubuntu8'. I realize that doesn't mean much, but you can check it out explicitly with 'bzr branch lp:ubuntu/trusty/plymouth'

 It does have the 'add_consoles_from_file' method.

 I'll poke read some more there, try from trunk and see what i can't find out.

  thanks again for the response.
Comment 4 Scott Moser 2014-04-07 16:03:14 UTC
Marking this as RESOLVED / INVALID.
The bug was actually in downstream ubuntu package.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.