spl-linux 0.7.5-1ubuntu2.1 ADT test failure with 5.4 kernels in Bionic

Bug #1885285 reported by Kleber Sacilotto de Souza
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
spl-linux (Ubuntu)
Invalid
High
Colin Ian King
Bionic
Fix Released
High
Unassigned

Bug Description

== SRU Justification (Bionic) ==

Building Bionic SPL with 5.4 kernels breaks because 5.4 removed the user_path_dir inlined helper.

== Fix ==

Replace the deprecated inline helper user_path_dir() (not in Linux 5.4) with the more stable generic variant user_path_at_empty(). The latter function has not changed from 4.15.. to present, so it's a more verbose call but semantically identical.

== Testcase ==

Build with a 5.4+ kernel. Without the fix dkms will fail to build. With the fix it will build successfully. Once built, test with the ubuntu autotest ZFS tests, it will pass. Also test on mainline 4.15 and 5.3, 5.4 kernels that don't have ZFS built-in (from https://kernel.ubuntu.com/~kernel-ppa/mainline)

== Regression Potential ==

Very small. We are effectively replacing the call to an inlined helper function user_path_dir with the same underlying more generic call in the kernel, so basically this is a one-to-one mapping of the original inline helper to the more generic version. The resulting generated object code is effectively the same.

----------

Testing failed on:
    amd64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/amd64/s/spl-linux/20200625_151633_f3515@/log.gz
    arm64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/arm64/s/spl-linux/20200625_151231_d6324@/log.gz
    i386: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/i386/s/spl-linux/20200625_155905_74965@/log.gz
    ppc64el: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/ppc64el/s/spl-linux/20200625_132916_ebca2@/log.gz
    s390x: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/s390x/s/spl-linux/20200625_132800_3905e@/log.gz

Build error:
/var/lib/dkms/spl/0.7.5/build/module/spl/spl-vnode.c: In function ‘vn_set_pwd’:
/var/lib/dkms/spl/0.7.5/build/module/spl/spl-vnode.c:830:14: error: implicit declaration of function ‘user_path_dir’; did you mean ‘user_path_at’? [-Werror=implicit-function-declaration]
         rc = user_path_dir(filename, &path);
              ^~~~~~~~~~~~~
              user_path_at

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :
tags: added: kernel-adt-failure
summary: - spl-linux 0.7.5-1ubuntu2.1 ADT test failure with linux-hwe-5.4
- 5.4.0-40.44~18.04.1
+ spl-linux 0.7.5-1ubuntu2.1 ADT test failure with 5.4 kernels in Bionic
Changed in spl-linux (Ubuntu Bionic):
status: New → Confirmed
importance: Undecided → High
description: updated
Timo Aaltonen (tjaalton)
Changed in spl-linux (Ubuntu):
status: New → Invalid
Changed in spl-linux (Ubuntu):
importance: Undecided → High
assignee: nobody → Colin Ian King (colin-king)
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Kleber, or anyone else affected,

Accepted spl-linux into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/spl-linux/0.7.5-1ubuntu2.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in spl-linux (Ubuntu Bionic):
status: Confirmed → Fix Committed
Revision history for this message
Colin Ian King (colin-king) wrote :
Download full text (7.5 KiB)

zfsutils-linux fails to install if `modprobe zfs` fails Edit
Bug #1880421 reported by Simon Déziel on 2020-05-24
10
This bug affects 1 person. Does this bug affect you? Edit
Affects Status Importance Assigned to Milestone
 zfs-linux (Ubuntu) Remove Status tracked in Groovy
​ Focal Remove
Fix Committed

Undecided

  Unassigned

Target to milestone
​ Groovy Remove
Fix Released

Medium

  Colin Ian King

Target to milestone
Also affects project (?) Also affects distribution/package Target to series
Edit
Bug Description

== SRU Justification, Focal ==

Justification: Installing zfsutils with zfs modules not available causes the package to installation to fail. The package should install cleanly rather than break.

== Test Case ==

# Prevent module loading
$ sudo sysctl kernel.modules_disabled=1

# Install the package
$ sudo apt install -y zfsutils-linux

This should succeed. Without the fix this fails. (See below for the failure message). With the fix modules don't install but the package install succeeds.

== Regression Potential ==

There may be users who expect the package to fail to install when the zfs utils fail to install when the modules are not available. However, this is a corner case where users are expecting broken behaviour to occur and should not be relying on this.

The changes to the systemd rules are already in Ubuntu groovy and have been tested, so I believe the regression potential is limited.

----

Description:

When installing zfsutils-linux, failure to `modprobe zfs` cause the package installation to fail.
Ideally, modprobe should be attempted but not fatal.

Steps to reproduce:

# Prevent module loading
$ sudo sysctl kernel.modules_disabled=1

# Install the package
$ sudo apt install -y zfsutils-linux

This should succeed but fails with:

Reading package lists... Done
Building dependency tree
Reading state information... Done
zfsutils-linux is already the newest version (0.8.3-1ubuntu12).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up zfsutils-linux (0.8.3-1ubuntu12) ...
insmod /lib/modules/5.4.0-31-generic/kernel/zfs/zlua.ko
modprobe: ERROR: could not insert 'zfs': Operation not permitted
zfs-import-scan.service is a disabled or a static unit, not starting it.
A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
Job for zfs-load-module.service failed because the control process exited with error code.
See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
zfs-import-scan.service is a disabled or a static unit, not starting it.
Job for zfs-load-module.service failed because the control process exited with error code.
See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
Job for zfs-share.service failed because the control process exited with error code.
See "systemctl status zfs-share.service" and "journalctl -xe" for details.
invoke-rc.d: initscript zfs-share, action "start" failed.
● zfs-share.service - ZFS...

Read more...

Revision history for this message
Colin Ian King (colin-king) wrote :

Testing -proposed spl:

Tested: spl now builds fine on 4.15, 5.3 and 5.4 kernels
Tested: ubuntu ZFS autotest smoke and fs on kernels:
   5.4 - OK
   5.3 - OK
   4.15 - OK

Looks good to me.

Revision history for this message
Colin Ian King (colin-king) wrote :

Ignore comment #3, I pasted the wrong data into the bug report.

tags: added: verification-done-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package spl-linux - 0.7.5-1ubuntu2.2

---------------
spl-linux (0.7.5-1ubuntu2.2) bionic; urgency=medium

  * Add Linux 5.4 compat fix for deprecated user_path_dir call (LP: #1885285)
    - 0019-Linux-compat-5.4-user-path-at-empty.patch

 -- Colin Ian King <email address hidden> Thu, 2 Jul 2020 10:42:22 +0100

Changed in spl-linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for spl-linux has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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