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

0.8.5 fails to build on RHEL 8.3 #11195

Closed
mskarbek opened this issue Nov 11, 2020 · 20 comments
Closed

0.8.5 fails to build on RHEL 8.3 #11195

mskarbek opened this issue Nov 11, 2020 · 20 comments
Labels
Type: Building Indicates an issue related to building binaries

Comments

@mskarbek
Copy link
Contributor

System information

Type Version/Name
Distribution Name Red Hat Enterprise Linux
Distribution Version 8.3
Linux Kernel 4.18.0-240.el8.x86_64
Architecture x86_64
ZFS Version 0.8.5
SPL Version

Describe the problem you're observing

Release 0.8.5 fails to build the kernel module on the latest RHEL kernel. I'm able to build kABI kmod packages perfectly fine on 8.2 kernel - 4.18.0-193.el8.x86_64. Just out of curiosity I've tested 2.0.0-rc5 and it builds and seems to work fine on 4.18.0-240.el8.x86_64.

Describe how to reproduce the problem

Try to build rpm packages set from the release tar archive on RHEL 8.3.

Include any warning/errors/backtraces from the system logs

  CC [M]  /tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/module/zfs/vdev.o
  CC [M]  /tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/module/zfs/vdev_cache.o
  CC [M]  /tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/module/zfs/vdev_disk.o
  CC [M]  /tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/module/zfs/vdev_file.o
  CC [M]  /tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/module/zfs/vdev_indirect.o
/tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/../zfs-0.8.5/module/zfs/vdev_disk.c: In function 'vdev_bio_associate_blkg':
/tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/../zfs-0.8.5/module/zfs/vdev_disk.c:530:22: error: implicit declaration of function 'vdev_blkg_tryget'; did you mean 'blkg_tryget'? [-Werror=implicit-function-declaration]
  if (q->root_blkg && vdev_blkg_tryget(q->root_blkg))
                      ^~~~~~~~~~~~~~~~
                      blkg_tryget
cc1: some warnings being treated as errors
make[7]: *** [scripts/Makefile.build:315: /tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/module/zfs/vdev_disk.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [scripts/Makefile.build:556: /tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/module/zfs] Error 2
make[5]: *** [Makefile:1544: _module_/tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/module] Error 2
make[5]: Leaving directory '/usr/src/kernels/4.18.0-240.el8.x86_64'
make[4]: *** [Makefile:30: modules] Error 2
make[4]: Leaving directory '/tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64/module'
make[3]: *** [Makefile:842: all-recursive] Error 1
make[3]: Leaving directory '/tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64'
make[2]: *** [Makefile:711: all] Error 2
make[2]: Leaving directory '/tmp/zfs-build-svc_ansible-k43PnUhY/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.el8.x86_64'
error: Bad exit status from /tmp/zfs-build-svc_ansible-k43PnUhY/TMP/rpm-tmp.xEKa8m (%build)


RPM build errors:
    Bad exit status from /tmp/zfs-build-svc_ansible-k43PnUhY/TMP/rpm-tmp.xEKa8m (%build)
make[1]: *** [Makefile:1337: rpm-common] Error 1
make[1]: Leaving directory '/home/svc_ansible/zfs-0.8.5'
make: *** [Makefile:1288: rpm-kmod] Error 2
@mskarbek mskarbek added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Nov 11, 2020
@behlendorf behlendorf added Type: Building Indicates an issue related to building binaries and removed Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Nov 11, 2020
@tonyhutter
Copy link
Contributor

Unfortunately, only CentOS and Fedora are officially supported by OpenZFS. Once CentOS is updated to the newer RHEL kernel, the kmod packages will probably for you though. You can also try using the CentOS dkms packages.

@tonyhutter
Copy link
Contributor

Ah sorry, I missed that you were building the packages manually. Yes, we should get this fixed as we're probably going to hit this when CentOS updates to the latest RHEL kernel.

@mskarbek
Copy link
Contributor Author

4.18.0-240.el8.x86_64 is available in CentOS for quite some time: https://koji.mbox.centos.org/koji/buildinfo?buildID=13747. Of course, it is CentOS Stream repo and I don't expect that OpenZFS will support something that is not yet in the released version of CentOS but this could be a base for future work since this kernel will eventually land in the Centos 8.3.
I can live perfectly well with 4.18.0-193.el8.x86_64 for now.

@tonyhutter
Copy link
Contributor

@behlendorf just put out the 7.9 kmod packages: #11197. Do those work for you?

@anch2150
Copy link

anch2150 commented Dec 2, 2020

A similar issue #10713 has been resolved in 0.8.4. Could this be a regression?

@bobobo1618
Copy link

FWIW, the 2.0.0 package in the testing repo is able to compile and run.

@ThoSap
Copy link

ThoSap commented Dec 7, 2020

As CentOS 8.3.2011 released today (at least the update packages) I'm getting the same error for installed ZFS version 0.8.4.
ZFS 0.8.5 or 2.0.0 prebuilt packages unfortunately are not yet available for CentOS.

  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zcp_global.o
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zcp_iter.o
/var/lib/dkms/zfs/0.8.4/build/module/zfs/vdev_disk.c: In function ‘vdev_bio_associate_blkg’:
/var/lib/dkms/zfs/0.8.4/build/module/zfs/vdev_disk.c:520:22: error: implicit declaration of function ‘vdev_blkg_tryget’; did you mean ‘blkg_tryget’? [-Werror=implicit-function-declaration]
  if (q->root_blkg && vdev_blkg_tryget(q->root_blkg))
                      ^~~~~~~~~~~~~~~~
                      blkg_tryget
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zcp_synctask.o
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zfeature.o
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zfs_acl.o
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zfs_byteswap.o
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zfs_ctldir.o
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zfs_debug.o
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zfs_dir.o
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zfs_fm.o
cc1: some warnings being treated as errors
  CC [M]  /var/lib/dkms/zfs/0.8.4/build/module/zfs/zfs_fuid.o
make[5]: *** [scripts/Makefile.build:316: /var/lib/dkms/zfs/0.8.4/build/module/zfs/vdev_disk.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [scripts/Makefile.build:556: /var/lib/dkms/zfs/0.8.4/build/module/zfs] Error 2
make[3]: *** [Makefile:1544: _module_/var/lib/dkms/zfs/0.8.4/build/module] Error 2
make[3]: Leaving directory '/usr/src/kernels/4.18.0-240.1.1.el8_3.x86_64'
make[2]: *** [Makefile:30: modules] Error 2
make[2]: Leaving directory '/var/lib/dkms/zfs/0.8.4/build/module'
make[1]: *** [Makefile:841: all-recursive] Error 1
make[1]: Leaving directory '/var/lib/dkms/zfs/0.8.4/build'
make: *** [Makefile:710: all] Error 2

@bobobo1618
Copy link

ZFS 0.8.5 or 2.0.0 prebuilt packages unfortunately are not yet available for CentOS.

Yes they are (2.0.0 is at least). As I said in my last reply, they're in the testing repositories.

@ThoSap
Copy link

ThoSap commented Dec 7, 2020

Nevermind, after manually installing the repo for CentOS 8.2.2004 again I was able to install ZFS 0.8.5.

I don't know why but after doing sudo dnf clean all && sudo dnf check-upgrade I never got the ZFS 0.8.5 update recently.

My server was initially installed with CentOS 8.1.1911 in January with ZFS 0.8.3 and was able to automatically update to ZFS 0.8.4, but not ZFS 0.8.5.

Like I mentioned after executing the following commands I got the ZFS 0.8.5 update:

sudo dnf install http://download.zfsonlinux.org/epel/zfs-release.el8_2.noarch.rpm
sudo dnf install epel-release
sudo dnf install kernel-devel zfs

Edit:

ZFS 0.8.5 or 2.0.0 prebuilt packages unfortunately are not yet available for CentOS.

Yes they are (2.0.0 is at least). As I said in my last reply, they're in the testing repositories.

sudo dnf config-manager --enable zfs-testing
sudo dnf install kernel-devel zfs

With 2.0.0 testing I was able to fully build the DKMS module for CentOS 8.3.2011 kernel 4.18.0-240.1.1.el8_3.x86_64.

@truatpasteurdotfr
Copy link

same issue here: (./configure && make rpm w/wo the one line patch from b3a216f)

/tmp/zfs-build-truadm-A8MceTlw/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.1.1.el8_3.x86_64/../zfs-0.8.5/module/zfs/vdev_disk.c: In function 'vdev_bio_associate_blkg':
/tmp/zfs-build-truadm-A8MceTlw/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.1.1.el8_3.x86_64/../zfs-0.8.5/module/zfs/vdev_disk.c:530:22: error: implicit declaration of function 'vdev_blkg_tryget'; did you mean 'blkg_tryget'? [-Werror=implicit-function-declaration]
  if (q->root_blkg && vdev_blkg_tryget(q->root_blkg))
                      ^~~~~~~~~~~~~~~~
                      blkg_tryget
cc1: some warnings being treated as errors
make[7]: *** [scripts/Makefile.build:316: /tmp/zfs-build-truadm-A8MceTlw/BUILD/zfs-kmod-0.8.5/_kmod_build_4.18.0-240.1.1.el8_3.x86_64/module/zfs/vdev_disk.o] Error 1

maybe related to the configure script not finding blkg_tryget?

checking whether blkg_tryget() is available... no

but according to /usr/src/kernels/4.18.0-240.1.1.el8_3.x86_64/include/linux/blk-cgroup.h

509 /**
510  * blkg_tryget - try and get a blkg reference
511  * @blkg: blkg to get
512  *
513  * This is for use when doing an RCU lookup of the blkg.  We may be in the midst
514  * of freeing this blkg, so we can only use it if the refcnt is not zero.
515  */
516 static inline bool blkg_tryget(struct blkcg_gq *blkg)
517 {
518         return percpu_ref_tryget(&blkg->refcnt);
519 }
520 

@truatpasteurdotfr
Copy link

building openzfs-2.0.0 (pristine) works fine and the configure script has:

checking whether blkg_tryget() is available... yes
checking whether blkg_tryget() is GPL-only... no

@truatpasteurdotfr
Copy link

oops, it should be on the centos issue!

@behlendorf
Copy link
Contributor

behlendorf commented Dec 10, 2020

See PR #11322 for the updated patch stack to resolve this build failure on CentOS 8.3.

@wtywtykk
Copy link

I'm using centos8stream, a recent update breaks zfs again....

checking whether aops->direct_IO() uses iov_iter... yes
checking whether fops->read/write_iter() are available... yes
checking whether new_sync_read/write() are available... no
checking whether generic_write_checks() takes kiocb... yes
checking whether kmap_atomic wants 1 args... yes
checking whether follow_down_one() is available... yes
checking whether submit_bio is member of struct block_device_operations... checking whether blk_alloc_queue() expects request function... checking whether make_request_fn() returns void... no
checking whether make_request_fn() returns blk_qc_t... configure: error: 
        *** None of the expected "make_request_fn" 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.0.0-1
        *** Compatible Kernels: 3.10 - 5.9


Building module:
cleaning build area....(bad exit status: 2)
make -j24 KERNELRELEASE=4.18.0-257.el8.x86_64....(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.18.0-257.el8.x86_64 (x86_64)
Consult /var/lib/dkms/zfs/2.0.0/build/make.log for more information.
 Done. 

@truatpasteurdotfr
Copy link

See PR #11322 for the updated patch stack to resolve this build failure on CentOS 8.3.

confirmed 0.8.5 + https://github.com/openzfs/zfs/pull/11322.patch and (autogen.sh && ./configure && make rpm)
yields a buildable kmod-zfs for 4.18.0-240.1.1.el8_3.x86_64

@truatpasteurdotfr
Copy link

for the c8 stream kernel 4.18.0-257.el8.x86_64, trying the 0.8.5+ proposed #11322 patch yields:

checking whether submit_bio is member of struct block_device_operations... checking whether blk_alloc_queue() expects request function... no
checking whether make_request_fn() returns void... no
checking whether make_request_fn() returns blk_qc_t... no
checking whether make_request_fn() returns int... configure: error:
        *** None of the expected "make_request_fn" 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-0.8.5-11322
        *** Compatible Kernels: 2.6.32 - 5.9

@truatpasteurdotfr
Copy link

same error for openzfs-2.0.0 (as expected) ./configure failure

checking whether submit_bio is member of struct block_device_operations... checking whether blk_alloc_queue() expects request function... checking whether make_request_fn() returns void... no
checking whether make_request_fn() returns blk_qc_t... configure: error:
        *** None of the expected "make_request_fn" 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.0.0-1
        *** Compatible Kernels: 3.10 - 5.9

[truadm@foreman-esxi zfs-2.0.0]$ uname -a
Linux foreman-esxi.bis.pasteur.fr 4.18.0-257.el8.x86_64 #1 SMP Thu Dec 3 22:16:23 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

@Zaryob
Copy link

Zaryob commented Dec 13, 2020

#11332 I fixed that issue changing module/zfs/vdev_disk.c file in /usr/src/zfs-0.8.5, line 520

-  if (q->root_blkg && vdev_blkg_tryget(q->root_blkg))
+  if (q->root_blkg && blkg_tryget(q->root_blkg))

@truatpasteurdotfr
Copy link

imho, 0.8.6 is fixing this for CentOS 8.3.2011 (kernel 4.18.0-240.el8.x86_64 series).

@behlendorf
Copy link
Contributor

That's right. 0.8.6 was released which builds against CentOS 8.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

No branches or pull requests

9 participants