Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs-2.1.15 don't compile with Centos last kernel-5.14.0-446.el9.x86_64 #16196

Open
smusich opened this issue May 14, 2024 · 14 comments
Open

zfs-2.1.15 don't compile with Centos last kernel-5.14.0-446.el9.x86_64 #16196

smusich opened this issue May 14, 2024 · 14 comments
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@smusich
Copy link

smusich commented May 14, 2024

<checking whether bio_alloc() wants 4 args... yes
checking whether blkdev_get_by_path() exists and takes 3 args... no
checking whether blkdev_get_by_path() exists and takes 4 args... no
checking whether bdev_open_by_path() exists... configure: error:
*** None of the expected "blkdev_get_by_path()" interfaces were detected.
*** This may be because your kernel version is newer than what is
*** supported, or you are using a patched custom kernel with
*** incompatible modifications.
***
*** ZFS Version: zfs-2.1.15-2
*** Compatible Kernels: 3.10 - 6.7

Building module:
Cleaning build area...(bad exit status: 2)
Failed command:
make -C /lib/modules/5.14.0-446.el9.x86_64/build M=/var/lib/dkms/zfs/2.1.15/build clean
Building module(s)...(bad exit status: 2)
Failed command:
make -j12 KERNELRELEASE=5.14.0-446.el9.x86_64
Error! Bad return status for module build on kernel: 5.14.0-446.el9.x86_64 (x86_64)
Consult /var/lib/dkms/zfs/2.1.15/build/make.log for more information.
dkms autoinstall on 5.14.0-446.el9.x86_64/x86_64 succeeded for nvidia
dkms autoinstall on 5.14.0-446.el9.x86_64/x86_64 failed for zfs(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel 5.14.0-446.el9.x86_64 Failed.

@smusich smusich added the Type: Defect Incorrect behavior (e.g. crash, hang) label May 14, 2024
@tonyhutter
Copy link
Contributor

don't compile with Centos last kernel-5.14.0-446.el9.x86_64

Which distro are you running specifically?

zfs-2.1.15 builds on AlmaLinux 9.4 with the latest 5.14.0-427.16.1.el9_4.x86_64 kernel:

$ ./autogen.sh && ./configure && make -j `nproc`
...
Skipping BTF generation for /home/hutter/zfs/module/zcommon/zcommon.ko due to unavailability of vmlinux
  BTF [M] /home/hutter/zfs/module/zfs/zfs.ko
Skipping BTF generation for /home/hutter/zfs/module/zfs/zfs.ko due to unavailability of vmlinux
make[3]: Leaving directory '/usr/src/kernels/5.14.0-427.16.1.el9_4.x86_64'
make[2]: Leaving directory '/home/hutter/zfs/module'
make[2]: Entering directory '/home/hutter/zfs'
[ -x ./scripts/zfs-tests.sh ] && \
    ./scripts/zfs-tests.sh -c
make[2]: Leaving directory '/home/hutter/zfs'
make[1]: Leaving directory '/home/hutter/zfs'

$ sudo ./cmd/zfs/zfs --version
zfs-2.1.15-1
zfs-kmod-2.1.15-1

$ uname -a
Linux centos9 5.14.0-427.16.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 9 18:15:59 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/redhat-release 
AlmaLinux release 9.4 (Seafoam Ocelot)

@smusich
Copy link
Author

smusich commented May 14, 2024

Distro: Centos Stream 9, with Centos-Stream 9 kernel-5.14.0-444.el9.x86_64 compile is fine.

@tonyhutter
Copy link
Contributor

Unfortunately we don't support CentOS stream

@kai4785
Copy link

kai4785 commented May 16, 2024

Counter point. CentOS Stream is previewing the upcoming changes to RHEL, AlmaLinux, and RockyLinux. Those distros will soon pick up this backported kernel version 6.9 change (which I know 6.9 isn't fully supported yet either).
I've tracked down this particular code change to this commit.
torvalds/linux@e97d06a
If there's a "Support kernel version 6.9" issue somewhere, I think we could mark this a duplicate of that ticket.

Additionally, downgrading to kernel 5.14.0-444.el9.x86_64 will work for CentOS Stream 9 users. So it's only this brand new 446 kernel package that has new code.

@smusich
Copy link
Author

smusich commented May 20, 2024

Maybe someone is interested for Centos 9 you can easily assemble zfs-2.2.4 from srpm fedora 40, with kernel 446 everything seems to work.

@tonyhutter
Copy link
Contributor

@smusich you should also be able to install the EL9 dkms packages as well. That should alleviate the issues when the RHEL/Alma/Rocky/Stream kernel version numbers are not 100% matched up.

@smusich smusich changed the title zfs-2.1.5 don't compile with Centos last kernel-5.14.0-446.el9.x86_64 zfs-2.1.15 don't compile with Centos last kernel-5.14.0-446.el9.x86_64 May 21, 2024
@smusich
Copy link
Author

smusich commented May 21, 2024

zfs-dkms is also needed from fedora

@ramonwirsch
Copy link

@smusich I simply used the Fedora 38 repo. Works without any further changes. Just needed to hardcode the fedora release version.

@tonyhutter I believe we are both already on zfs-dkms via epel/zfs-release-2-3.el9 as instructed in the current "Getting Started" section.

Btw. since I was not aware that Centos-Stream was not supported, that might be sth. to clarify on that Getting Started page. Since Stream has existed for a while and the non-Stream variants had been discontinued, I simply counted "CentOS-Stream" as covered under "CentOS-based distros".

@smusich
Copy link
Author

smusich commented May 21, 2024

@ramonwirsch I use Fedora 40 repo. I'm currently running a test from the package zfs-test.

@hjmallon
Copy link
Contributor

hjmallon commented Jul 8, 2024

You can cherry-pick these commits and it seems to build again (they cherry-pick cleanly)

cfb96c7
e3120f7

@nscfreny
Copy link

nscfreny commented Oct 8, 2024

What goes inte CentOS Stream usually ends up in the next RHEL release. On RHEL 9.5 beta (currently kernel-5.14.0-503.2.1.el9_5.x86_64), zfs-2.1.15 does build with the two cherry-picks suggested above.

Are there still plans to release zfs-2.1.16?
If so, will it be supported on RHEL 9.5?

@Trogvars
Copy link

Trogvars commented Oct 28, 2024

Using zfs-testing worked for me.
Current kernel - 5.14.0-522.el9.x86_64

dnf install https://zfsonlinux.org/epel/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm

dnf install -y epel-release
dnf config-manager --enable zfs-testing
dnf install kernel-devel zfs

This will install zfs-2.2.6 instead of zfs-2.1.15. Will compile kernel modules and zfs-dkms.
Manual build from source zfs-2.2.6 also works.

Don't forget to rebuild initrd:
dracut --regenerate-all -f

@gcoretech
Copy link

AlmaLinux 9.5 has been released with kernel 5.14.0-503.11.1.el9_5.x86_64 and compiling zfs 2.1.15 sources fails with

checking whether bdev_open_by_path() exists... configure: error: 
	*** None of the expected "blkdev_get_by_path()" interfaces were detected.

Will there be an official 2.1.16 release?

If not, is it safe and sufficient to apply patches cfb96c7 and e3120f7? I've successfully built a custom 2.1.16pre RPM including those patches, but I don't know if this may cause issues on production servers later on.

@AllKind
Copy link
Contributor

AllKind commented Nov 20, 2024

@gcoretech #16746 #16781

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

9 participants