e2fsprogs 1.46.3-1 on architecture s390x fails in test f_baddotdir

Bug #1939409 reported by Heinrich Schuchardt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
e2fsprogs (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

e2fsprogs 1.46.3-1ubuntu1 is in proposed.

Architecture s390x fail in test f_baddotdir. The test image was changed with the new release.

Next step should be analyzing the error on a s390x virtual machine.

Tags: fr-1602 s390x
tags: added: fr-1602
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

The problem can be reproduced on another big-endian architecture.

On mips we get the following test failures:

f_baddotdir: bad '.' and '..' entries: failed
m_rootdir_acl: create fs image from dir using inline_data and acls: failed

Revision history for this message
Theodore Ts'o (tytso) wrote :

These problems are fixed upstream. See:

commit 225e5d093b519f9dbe9fcaacd995426f0e5194f6
Author: Theodore Ts'o <email address hidden>
Date: Wed Jul 28 13:51:13 2021 -0400

    e2fsck: fix f_baddotdir failure on big-endian systems

    Commit 63f44aafb1f2 ("e2fsck: fix ".." more gracefully if possible")
    changed the check_dot() function to try to avoid resetting the '..'
    entry when the '.' entry is too large.. But if we do that, then on
    big-endian systems, we need to try byte swapping the rest of the
    directory entries, or else the f_baddotdir test will fail on
    big-endian systems.

    Also add a check to avoid UBSAN warning when there is not enough space
    at the end of the directory block for a directory entry, and so we can
    potentially overflow some pointer arithmetic when trying to byte swap
    the remainder of the (negative) space in the directory block.

    Fixes: 63f44aafb1f2 ("e2fsck: fix ".." more gracefully if possible")
    Signed-off-by: Theodore Ts'o <email address hidden>

commit 7a97083d4350b93f4055bdd8465667cecbb36438
Author: Theodore Ts'o <email address hidden>
Date: Fri Jul 30 12:29:44 2021 -0400

    libext2fs: fix translation of Posix ACL's on big-endian systems

    The ACL returned by the kernel in lgetxattr(2) is returned in Little
    Endian, even on Big Endian systems. Fix the functions
    convert_posix_acl_to_disk_buffer() and convert_disk_buffer_to_posix_acl()
    to work correctly on Big Endian systems. This fixes a failure of
    the test m_rootdir_acl.

    Signed-off-by: Theodore Ts'o <email address hidden>

As I mentioned responding to another bug report, e2fsprogs's maint branch is currently in a translation freeze pending an upcoming 1.46.4 release. PTAL and let me know if you see other issues. (You probably don't care for Ubuntu but 1.46.4 should also fix some portability issues for GNU Hurd.)

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

Thanks Theodore for pointing me to these patches.

Best regards

Heinrich

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

With the two patches on top of upstream v1.46.3 building and testing (make check) on bigendian architecture mips succeeds.

Revision history for this message
Heinrich Schuchardt (xypron) wrote :
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

e2fsprogs - 1.46.3-1ubuntu2 is available in ppa:xypron/merge-from-debian

Lukas Märdian (slyon)
Changed in e2fsprogs (Ubuntu):
status: New → In Progress
Revision history for this message
Lukas Märdian (slyon) wrote :

Thank you for providing & integrating the patches. LGTM!

$ dput ubuntu ../e2fsprogs_1.46.3-1ubuntu2_source.changes
Checking signature on .changes
gpg: ../e2fsprogs_1.46.3-1ubuntu2_source.changes: Valid signature from 5889C17AB1C8D890
Checking signature on .dsc
gpg: ../e2fsprogs_1.46.3-1ubuntu2.dsc: Valid signature from 5889C17AB1C8D890
Uploading to ubuntu (via sftp to upload.ubuntu.com):
  Uploading e2fsprogs_1.46.3-1ubuntu2.dsc: done.
  Uploading e2fsprogs_1.46.3-1ubuntu2.debian.tar.xz: done.
  Uploading e2fsprogs_1.46.3-1ubuntu2_source.buildinfo: done.
  Uploading e2fsprogs_1.46.3-1ubuntu2_source.changes: done.
Successfully uploaded packages.

Mathew Hodson (mhodson)
summary: - merge e2fsprogs 1.46.3-1 from Debian: s390x fails in test f_baddotdir
+ e2fsprogs 1.46.3-1 on architecture s390x fails in test f_baddotdir
Changed in e2fsprogs (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Theodore Ts'o (tytso) wrote :

Note that I've just released e2fsprogs 1.46.4-1 for Debian:

E2fsprogs 1.46.4 (August 18, 2021)
==================================

Updates/Fixes since v1.46.3:

UI and Features
---------------

The defaults for mke2fs now call for 256 byte inodes for all file
systems (with the exception of file systems for the GNU Hurd, which only
supports 128 byte inodes). Creating non-Hurd file systems with 128 byte
inodes will trigger a warning message to make sure users are aware of
the potential problems of using small/legacy inode sizes.

The bigalloc feature is now considered supported if the cluster size no
more than 16 times the block size. So the mke2fs program has been
changes to only warn if the cluster size is larger than that.

Fixes
-----

E2fsck now checks to make sure directory entries do not reference
internal quota inodes.

E2image now includes the quota inodes when creating file system image,
since they are part of the file system metadata.

E2fsck now properly accounts the quota usage of the project quota file.

Fix a regression introduced in 1.64.3 where attempting to create a file
system image using mke2fs into a non-existent file would fail.
(Addresses Debian Bug: #992094)

Fix mke2fs to correctly create Posix ACL's on big-endian systems when
copying files from a directory hierarchy.

Updated and clarified the resize2fs man pages. (Addresses Debian Bug:
#979411)

Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------

Improve various regression tests to be more portable and to reflect the
new default inode size of 256 byte inodes, even for small file systems.

Fixed a GNU Hurd portability problem which was causing tests to fail.

Fixed a test failure in f_baddotdir on big-endian systems. This wasn't
necessarily a bug per se in e2fsck, but rather e2fsck having different
behaviour on big-endian systems. (Addresses Debian Bug: #991922)

Use WantedBy=multi-user.target in e2scrub_reap.service. (Addresses
Debian Bug: #991349)

Synchronize e2fsck/recovery.c with the kernel's fs/jbd2/recovery.c

Fix various Coverity and compiler warnings.

Fix various error pathes to make sure we don't leak resources or
potentially use or try to free uninitialized pointers.

Added a setup-schroot command for use on Debian porter boxes.

Updated config.guess and config.sub with newer versions from the FSF.

Update Czech, Dutch, French, Polish, Portuguese, and Swedish translations.

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

We will consider 1.46.4 for 22.04.

e2fsprogs 1.46.3-1ubuntu3 is available in ppa:xypron/merge-from-debian and needs a sponsor.

Revision history for this message
Theodore Ts'o (tytso) wrote :

If you don't take 1.46.4 for 22.04, you might want to consider at the very least backporting the fix for:

Fix a regression introduced in 1.64.3 where attempting to create a file
system image using mke2fs into a non-existent file would fail.
(Addresses Debian Bug: #992094)

As this will likely be very noticeable by many Ubuntu users,

In fact, nearly all of the changes in 1.46.4 are bug fixes, designed so because engineers from a number of distributions attend the weekly ext4 development call, and 1.46.4 was designed to meet the needs of companies taking snapshots for enterprise distros (in the RHEL and SLE ecosystems) to be released in 2022....

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

Hello Theodore,

I wrote "We will consider 1.46.4 for 22.04.". For 21.10 it is too late. We already have a freeze.

The patch that you mention is exactly what I added in e2fsprogs 1.46.3-1ubuntu3.

Best regards

Heinrich

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

sponsored 1.46.3-1ubuntu3.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package e2fsprogs - 1.46.3-1ubuntu3

---------------
e2fsprogs (1.46.3-1ubuntu3) impish; urgency=medium

  * Restore mke2fs capability to create files adding patch

    - mke2fs: fix creating a file system image w/o a pre-existing file

 -- Heinrich Schuchardt <email address hidden> Mon, 30 Aug 2021 17:58:29 +0200

Changed in e2fsprogs (Ubuntu Impish):
status: In Progress → Fix Released
no longer affects: e2fsprogs (Ubuntu Impish)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.