Discussion:
[Bug 1798562] [NEW] After a side by side installation, resized filesystem is corrupted
Launchpad Bug Tracker
2018-10-18 11:39:39 UTC
Permalink
You have been subscribed to a public bug by Rik Mills (rikmills):

Test Case:
1. Perform a first installation of Ubuntu
2. Reboot into the freshly installed system and verify everything works as expected
3. Do a second installation and select "Install alonogside". Keep the size proposed by the installer and proceed to the end of installation
4. Reboot
5. On boot, in the list of installed systems, select the first system installed on the machine
6. Verify that it boots, you can login and it works as expected

Actual Result
The FS is corrupted and depending on the corruption it goes to initramfs, boots but cannot login, ...

Attached is the journal of the system installed on the corrupted
partition.

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 4.18.0-10.11-generic 4.18.12
Uname: Linux 4.18.0-10-generic x86_64
ApportVersion: 2.20.10-0ubuntu13
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Oct 18 10:53:57 2018
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash ---
InstallationDate: Installed on 2018-10-18 (0 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: ubiquity (Ubuntu)
Importance: High
Status: Confirmed


** Tags: amd64 apport-bug cosmic iso-testing ubiquity-18.10.12
--
After a side by side installation, resized filesystem is corrupted
https://bugs.launchpad.net/bugs/1798562
You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to the bug report.
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bug
Jean-Baptiste Lallement
2018-10-18 11:50:31 UTC
Permalink
Apparently it's clearly reproducible with Cosmic alongside Cosmic.

Has anyone been able to reproduce with Cosmic alongside something else
than Cosmic such as an earlier release, another distribution or
operating system?
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1798562

Title:
After a side by side installation, resized filesystem is corrupted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1798562/+subscriptions
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listi
Łukasz Zemczak
2018-10-18 14:22:55 UTC
Permalink
Just reporting that I was unable to reproduce it in any system
combination, even in the original cosmic next to cosmic case. Same for
bionic on cosmic, cosmic on bionic, cosmic on fedora. So it seems the
issue is not easily reproducible in all cases, must be some specific
combination of components and/or race?
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1798562

Title:
After a side by side installation, resized filesystem is corrupted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1798562/+subscriptions
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
http
APolihron
2018-10-18 16:16:06 UTC
Permalink
Personally I've fone this first install entire disk ->boot in the os and
restart it -> install alongside-> boot in the second os and then restart
and boot in the first one.all in uefi mode.
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1798562

Title:
After a side by side installation, resized filesystem is corrupted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1798562/+subscriptions
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
https://list
Jean-Baptiste Lallement
2018-10-18 16:36:52 UTC
Permalink
Possibly related issues:
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1783757
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1778140
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1798562

Title:
After a side by side installation, resized filesystem is corrupted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1798562/+subscriptions
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubun
Thadeu Lima de Souza Cascardo
2018-10-19 20:34:27 UTC
Permalink
With e2fsprogs 1.44.4-2:

bunzip2 vda1b.qcow2.bz
qemu-img convert vda1b.qcow2 vda1b.raw
e2fsck -f vda1b.raw
resize2fs vda1b.raw 6200M
e2fsck -f vda1b.raw

e2fsck 1.44.4 (18-Aug-2018)
Pass 1: Checking inodes, blocks, and sizes
Inode 45746 extent block passes checks, but checksum does not match extent
(logical block 1272, physical block 466167, len 776)
Fix<y>?

** Attachment added: "image before resize"
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1798562/+attachment/5203159/+files/vda1b.qcow2.bz
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1798562

Title:
After a side by side installation, resized filesystem is corrupted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1798562/+subscriptions
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
https://lists.ubuntu.
Jean-Baptiste Lallement
2018-10-20 06:34:37 UTC
Permalink
** Package changed: ubiquity (Ubuntu) => e2fsprogs (Ubuntu)

** Changed in: e2fsprogs (Ubuntu)
Importance: High => Critical

** Tags added: rls-dd-incoming
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1798562

Title:
After a side by side installation, resized filesystem is corrupted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1798562/+subscriptions
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/
Jean-Baptiste Lallement
2018-10-20 06:42:15 UTC
Permalink
** Description changed:

- Test Case:
+ Test Case 1:
+ With e2fsprogs 1.44.4-2:
+
+ Download this file system image:
+ https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1798562/+attachment/5203159/+files/vda1b.qcow2.bz
+
+ Run the following commands:
+
+ bunzip2 vda1b.qcow2.bz
+ qemu-img convert vda1b.qcow2 vda1b.raw
+ e2fsck -f vda1b.raw
+ resize2fs vda1b.raw 6200M
+ e2fsck -f vda1b.raw
+
+ e2fsck 1.44.4 (18-Aug-2018)
+ Pass 1: Checking inodes, blocks, and sizes
+ Inode 45746 extent block passes checks, but checksum does not match extent
+ (logical block 1272, physical block 466167, len 776)
+ Fix<y>?
+
+
+ Test Case 2 (Use case of the installer):
1. Perform a first installation of Ubuntu
2. Reboot into the freshly installed system and verify everything works as expected
3. Do a second installation and select "Install alonogside". Keep the size proposed by the installer and proceed to the end of installation
- 4. Reboot
+ 4. Reboot
5. On boot, in the list of installed systems, select the first system installed on the machine
6. Verify that it boots, you can login and it works as expected

Actual Result
The FS is corrupted and depending on the corruption it goes to initramfs, boots but cannot login, ...

Attached is the journal of the system installed on the corrupted
partition.

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 4.18.0-10.11-generic 4.18.12
Uname: Linux 4.18.0-10-generic x86_64
ApportVersion: 2.20.10-0ubuntu13
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Oct 18 10:53:57 2018
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash ---
InstallationDate: Installed on 2018-10-18 (0 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1798562

Title:
After a side by side installation, resized filesystem is corrupted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1798562/+subscriptions
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
https://lists.ubuntu.
Theodore Ts'o
2018-10-20 14:17:12 UTC
Permalink
Thanks for the very nice repro! I've created a fix which will be
going into the maint branch of the e2fsprogs tree. The commit
description:

resize2fs: update checksums in the extent tree's relocated block

When shrinking an file system, and we need to relocate an inode, the
checksums in its extent tree must get updated to reflect its new inode
number. When doing this, we need to do this *after* we update the
extent tree to reflect any blocks which need to be relocated due to
the file system shrink operation.

Otherwise, in the case where only an interior node of the extent tree
needs to get relocated, and none of the entries in that node need to
be adjusted, the checksum for that interior node is updated in the old
copy of that block, and then after the extent tree is updated to use
the new copy of that interior node, the extent tree is left with an
invalid checksum.

This is a relatively rare case, since it requires the following
conditions to be true:

*) The metadata checksum feature must be enabled.
*) An inode needs to be relocated.
*) The inode needs to have an interior node.
*) The block for that interior node needs to be relocated.
*) None of blocks addressed by entries in that interior node needs
to be relocated.

When all of these conditions are true, though, the file system is left
with corrupted with bad checksum for the extent tree block.

Addresses-Launchpad-Bug: 1798562

Signed-off-by: Theodore Ts'o <***@mit.edu>
Reported-by: Jean-Baptiste Lallement <jean-***@ubuntu.com>

I've tested e2fsprogs with this change and it fixes your repro. I also
have a regression test in the subsequent commit which reproduces the
problem with a smaller test file system.

** Patch added: "resize2fs: update checksums in the extent tree's relocated block"
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1798562/+attachment/5203340/+files/0001-resize2fs-update-checksums-in-the-extent-tree-s-relo.patch
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1798562

Title:
After a side by side installation, resized filesystem is corrupted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1798562/+subscriptions
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinf
Ubuntu Foundations Team Bug Bot
2018-10-20 16:19:47 UTC
Permalink
The attachment "resize2fs: update checksums in the extent tree's
relocated block" seems to be a patch. If it isn't, please remove the
"patch" flag from the attachment, remove the "patch" tag, and if you are
a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1798562

Title:
After a side by side installation, resized filesystem is corrupted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1798562/+subscriptions
--
kubuntu-bugs mailing list
kubuntu-***@lists.ubuntu.com
https://lists.ubuntu.
Loading...