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

Issue 833643 link

Starred by 3 users

Issue metadata

Status: Available
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

USB images can't mount stateful partition on Linux 3.8 due to new metadata_csum ext4 feature

Project Member Reported by cernekee@chromium.org, Apr 16 2018

Issue description

I flashed a ToT test image (10588.0.0) to a USB thumbdrive and tried to boot it on falco.  On the first boot, it went through the "self_repair" sequence, displaying "Your system is repairing itself" and wiping the stateful partition.  After that, it was fine, except since stateful was zapped the image no longer had tcpdump, python, etc.

Upon further investigation it seems that the falco Linux 3.8 kernel is unable to mount the stateful filesystem that is in our latest images; the kernel logs an error "JBD2: Unrecognised features on journal".  The difference between the good images and the bad images is that `tune2fs -l` shows the metadata_csum feature enabled on the bad images.  The e2fsprogs changelog indicates that metadata_csum was enabled by default starting in e2fsprogs 1.44.0; and indeed we recently upgraded from 1.43.6 to 1.44.1 (http://b/73965847).

Proposed fix:

https://chromium-review.googlesource.com/#/c/chromiumos/platform/crosutils/+/1014504

Should we add a VM test that boots up Linux 3.8 (or whatever our oldest supported kernel is at the time) and ensures that all filesystems in the image are mountable?
 
I have not checked to see if/how this affects recovery images.

Comment 2 Deleted

Comment 3 Deleted

Owner: gwendal@chromium.org
From CL:1014505

> Instead of disabling the checksum, let see if we can add enough code to 3.8 kernel to not throw an error at mount.

Gwendal, could you help find an owner for the FS changes?

Comment 5 by vapier@chromium.org, Apr 20 2018

Summary: USB images can't mount stateful partition on Linux 3.8 due to new metadata_csum ext4 feature (was: USB images can't mount stateful partition on Linux 3.8)
we can already do this on a per-board basis (but not a per-kernel basis).  in the board's disk_layout.json, add:
        "fs_options":{
          "ext4":"-O ^metadata_csum"
        }

i'm not sure changing the kernel to ignore this feature in the FS will work.  iiuc, turning on metadata_csum changes things on the disk to include checksums which the ext4 fs driver will be expecting.
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosutils/+/4b1db8f892d783dff9b280c965e6ea7bb9d97bd9

commit 4b1db8f892d783dff9b280c965e6ea7bb9d97bd9
Author: Kevin Cernekee <cernekee@chromium.org>
Date: Fri Apr 20 04:59:12 2018

Disable ext4 metadata_csum feature when building images

e2fsprogs v1.44.0+ will enable this feature by default.  However, our
3.8 kernels (for e.g. falco) cannot mount these images.

BUG=chromium:833643
TEST=build test image, flash it, check with tune2fs, boot on falco

Change-Id: I05333f0f5feca97d3ee6caf3fb3e3c5c460e3ad1
Reviewed-on: https://chromium-review.googlesource.com/1014504
Commit-Ready: Kevin Cernekee <cernekee@chromium.org>
Tested-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Aditya Kali <adityakali@google.com>

[modify] https://crrev.com/4b1db8f892d783dff9b280c965e6ea7bb9d97bd9/build_library/disk_layout_util.sh

Labels: Merge-Request-67 Merge-Request-66
Status: Fixed (was: Started)
Verified on falco canary 10608.0.0.
Project Member

Comment 8 by sheriffbot@chromium.org, Apr 22 2018

Labels: -Merge-Request-66 Merge-Review-66 Hotlist-Merge-Review
This bug requires manual review: Request affecting a post-stable build
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Is this merge / CL limited to falco?   
I think it will affect any device running a 3.8 kernel (see go/cros-names).
Project Member

Comment 11 by sheriffbot@chromium.org, Apr 23 2018

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

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

Comment 13 by bugdroid1@chromium.org, Apr 23 2018

Labels: merge-merged-release-R67-10575.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosutils/+/6885eae5f60618443bbe91abb2346db93a96c274

commit 6885eae5f60618443bbe91abb2346db93a96c274
Author: Kevin Cernekee <cernekee@chromium.org>
Date: Mon Apr 23 23:43:44 2018

Disable ext4 metadata_csum feature when building images

e2fsprogs v1.44.0+ will enable this feature by default.  However, our
3.8 kernels (for e.g. falco) cannot mount these images.

BUG=chromium:833643
TEST=build test image, flash it, check with tune2fs, boot on falco

Change-Id: I05333f0f5feca97d3ee6caf3fb3e3c5c460e3ad1
Reviewed-on: https://chromium-review.googlesource.com/1014504
Commit-Ready: Kevin Cernekee <cernekee@chromium.org>
Tested-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Aditya Kali <adityakali@google.com>
(cherry picked from commit 4b1db8f892d783dff9b280c965e6ea7bb9d97bd9)
Reviewed-on: https://chromium-review.googlesource.com/1025077
Reviewed-by: Kevin Cernekee <cernekee@chromium.org>
Commit-Queue: Kevin Cernekee <cernekee@chromium.org>

[modify] https://crrev.com/6885eae5f60618443bbe91abb2346db93a96c274/build_library/disk_layout_util.sh

Comment 14 by josa...@google.com, Apr 24 2018

Labels: -Merge-Review-66 Merge-Approved-66

Comment 15 by josa...@google.com, Apr 24 2018

Labels: M-66
Labels: -Merge-Approved-66
Project Member

Comment 17 by bugdroid1@chromium.org, Apr 24 2018

Labels: merge-merged-release-R66-10452.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosutils/+/407dae1e3ccb036b4820539827f21285fa276595

commit 407dae1e3ccb036b4820539827f21285fa276595
Author: Kevin Cernekee <cernekee@chromium.org>
Date: Tue Apr 24 22:52:19 2018

Disable ext4 metadata_csum feature when building images

e2fsprogs v1.44.0+ will enable this feature by default.  However, our
3.8 kernels (for e.g. falco) cannot mount these images.

BUG=chromium:833643
TEST=build test image, flash it, check with tune2fs, boot on falco

Change-Id: I05333f0f5feca97d3ee6caf3fb3e3c5c460e3ad1
Reviewed-on: https://chromium-review.googlesource.com/1014504
Commit-Ready: Kevin Cernekee <cernekee@chromium.org>
Tested-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Aditya Kali <adityakali@google.com>
(cherry picked from commit 4b1db8f892d783dff9b280c965e6ea7bb9d97bd9)
Reviewed-on: https://chromium-review.googlesource.com/1026591
Reviewed-by: Kevin Cernekee <cernekee@chromium.org>
Commit-Queue: Kevin Cernekee <cernekee@chromium.org>

[modify] https://crrev.com/407dae1e3ccb036b4820539827f21285fa276595/build_library/disk_layout_util.sh

Comment 18 by gwendal@chromium.org, Jan 17 (6 days ago)

Cc: sarthakkukreti@chromium.org
Labels: -Pri-1 -Type-Bug-Regression Pri-3 Type-Feature
Status: Available (was: Fixed)
All board have csum disabled, not ideal. [see https://buganizer.corp.google.com/issues/117646254]

Consider disabling it only for 3.8.

Also, looking at the code, mkfs options are different for build_image, chromeos_install and wipe. We should unify. In the 2 later case, it is a little simpler as we know exactly on which kernel we are running.

Sign in to add a comment