New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 703991 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Recovery mode does not print installation logs to VT3

Project Member Reported by bhthompson@google.com, Mar 22 2017

Issue description

When performing recovery VT2 and VT3 have the same contents, in  issue 701114  Dominik confirmed that the VT3 console is functioning properly if you poke at it directly, so it seems something about the recovery scripts is no longer piping the chromeos_install logs and such into VT3. 

Some steps:

1. Start recovery on a system (this repros on a SKL system, but I think it happens on others).
2. Switch to VT2, which says to go to VT3 to see more logs. 
3. Press ctrl+alt+refresh(F3) and note no additional logs are seen.

Dan, as the lucky person with the most recent commits relating to the VTs in the recovery scripts, is this something you could take a look at?

Your last commit suggests that this was working in October, but I don't see anything after that VT related :( https://chromium-review.googlesource.com/392789
 
Cc: vapier@chromium.org djkurtz@chromium.org hungte@chromium.org jwer...@chromium.org
Owner: shchen@chromium.org
Is the presumption that this changed due to the recovery->frecon migration?

Shelley, I think you actually did most of the heavy lifting back then to switch recovery over to frecon.  Can you take a look?
First of all, just a sanity check: are you sure there's something explicit missing (can you point to a particular message that used to appear and no longer does, for example)? As I understand it the debug log (VT3) is supposed to be a superset of the normal log (VT2), so it's possible that during certain parts of the process (especially while it's dumping a lot to the normal log without doing much else), the two look identical for the length of a screen.

Secondly, I think we're changing the VTs to use frecon nodes (see https://chromium-review.googlesource.com/c/392789/) *after* we tried redirecting all stdout/stderr output to that VT in recovery/init#main(). That's probably not that good and we should move the frecon init further up.
We used to see the actual output from chromeos_install in the VT3 logs and more, so you could for instance see the firmware updater trying to run, and if it failed you could grab a video of it to see what the error was before it got pushed off the display with other log spam. 

This all matters less if the logs always make it to the recovery drive, but they don't always make it there reliably so this is our back up view into the recovery process. 
FWIW I would also be ok with VT2 taking on what used to be in the VT3 logs, though it can be difficult to see what it is doing if it is scrolling by quickly the additional logs are often more useful. VT2 as it is today does not show what actually went wrong in most (any I know of?) cases, so I am not sure the VT2 use case is much better than the default UI with the progress bar. 
Okay, okay, I believe you! ;) Sounds very much like it could be caused by the issue I mentioned then. This needs to be fixed either way if that part is broken, regardless of which VT we want it on.

Let's see if Shelley has some time to fix/test this.

Comment 6 by hungte@chromium.org, Mar 28 2017

I think I've reported this before. See b/35647815 and b/35647974 .

Seems like some people may see the logs but some people don't. Not sure if it's per device, per build, or some race condition issue.

Comment 7 by hungte@chromium.org, Mar 28 2017

... And by the way Linux VT used to support scrolling but frecon does not. I wonder if we can launch a pager on VT2/VT3 as well.

Comment 8 by shchen@google.com, Mar 30 2017

Ok, here's the problem.  We're setting up the redirect of recovery.log at the beginning of the init script, but at that point, we haven't started up frecon yet, so /run/frecon/vt2 doesn't exist and the redirect fails.  I can move the redirect to after frecon starts up, but that means that we'll lose a bit of the debug output on VT3 prior to frecon starting up.  Would that be ok for everyone?  The other option would be to somehow get frecon to create these links earlier before we actually display anything.
I think that moving it up is an improvement for now, catching everything in frecon would be best if it could be moved forward though.

What do we miss by initializing vt2 later, and do we get this through any other means (like vt1)?

Comment 10 by shchen@google.com, Mar 30 2017

I don't think that the vt# matters.  They are all created at the same time by frecon at startup.

The way that things are done now, we will basically miss everything up until message startup (https://cs.corp.google.com/chromeos_public/src/platform/initramfs/recovery/init?l=489), which currently includes checking the clock/mounts, locking the tpm, and verifying the fw version, which would be really nice to have in the logs, especially if one of those fail.
Labels: Merge-Request-58 M-58
Lets put this into 58 once we have it landed/verified on ToT.
Project Member

Comment 13 by sheriffbot@chromium.org, Apr 1 2017

Labels: -Merge-Request-58 Hotlist-Merge-Approved Merge-Approved-58
Your change meets the bar and is auto-approved for M58. Please go ahead and merge the CL to branch 3029 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 14 by bugdroid1@chromium.org, Apr 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/initramfs/+/a8ce70b9f726125b7c54618e612cd889c3395825

commit a8ce70b9f726125b7c54618e612cd889c3395825
Author: Shelley Chen <shchen@chromium.org>
Date: Mon Apr 03 22:41:50 2017

recovery: fix vt3 debug output

The redirect to vt3 was being done prior to the vts
being set up by frecon.  Moving frecon call earlier
in the init process so that the /run/frecon/vt# links
are created earlier in the recovery flow.

BUG= chromium:703991 
BRANCH=None
TEST=Build recovery image, go through recovery flow
     and make sure that recovery.log output to vt2
     in realtime.

Change-Id: I40ffc3f326a4394e471106b97ce44c0f510d873f
Signed-off-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/464067
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/a8ce70b9f726125b7c54618e612cd889c3395825/recovery/init
[modify] https://crrev.com/a8ce70b9f726125b7c54618e612cd889c3395825/recovery/messages.sh

Project Member

Comment 15 by bugdroid1@chromium.org, Apr 5 2017

Labels: merge-merged-release-R58-9334.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/initramfs/+/52044c95cf0673060da74765ad8e911d31e04dd7

commit 52044c95cf0673060da74765ad8e911d31e04dd7
Author: Shelley Chen <shchen@chromium.org>
Date: Wed Apr 05 02:31:12 2017

recovery: fix vt3 debug output

The redirect to vt3 was being done prior to the vts
being set up by frecon.  Moving frecon call earlier
in the init process so that the /run/frecon/vt# links
are created earlier in the recovery flow.

BUG= chromium:703991 
BRANCH=None
TEST=Build recovery image, go through recovery flow
     and make sure that recovery.log output to vt2
     in realtime.

Change-Id: I40ffc3f326a4394e471106b97ce44c0f510d873f
Signed-off-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/464067
Reviewed-by: Randall Spangler <rspangler@chromium.org>
(cherry picked from commit a8ce70b9f726125b7c54618e612cd889c3395825)
Reviewed-on: https://chromium-review.googlesource.com/468346
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>

[modify] https://crrev.com/52044c95cf0673060da74765ad8e911d31e04dd7/recovery/init
[modify] https://crrev.com/52044c95cf0673060da74765ad8e911d31e04dd7/recovery/messages.sh

Project Member

Comment 16 by sheriffbot@chromium.org, Apr 5 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Approved -Merge-Approved-58
Status: Fixed (was: Untriaged)
This has landed in Tot and in 58.
Owner: bhthompson@chromium.org
Sending back to Bernie for verification.
Status: Verified (was: Fixed)
I can see logs!
@7, hungte, shift+up/down arrow scroll by one line and when you also press search it scrolls by full page.
Re#20

That's a great tip. Thanks!

Sign in to add a comment