-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Compile failure with Linux 5.5-rc2 and CONFIG_PREEMPT_RCU=y #9745
Comments
Please be aware 5.5(rc2) isn't a supported kernel at the moment. |
If I were to hazard a guess, I'd say that your kernel is built with |
@behlendorf yes, the kernel is built with CONFIG_PREEMPT_RCU, but my current kernel 5.4.4 is built with this option as well and ZFS is working with it |
@behlendorf i got the same issue, CONFIG_PREEMPT_RCU depends on CONFIG_PREEMPT, does that mean its not possible to build a full preemptive kernel since 5.5 with zfs? I switched to voluntary preemption and the module builds without GPL incompatibility (again). Is there a plan to move the printk stuff to the SPL as a stub? It guess the error comes from the real time preparation for the kernel log infrastructure. |
This comment has been minimized.
This comment has been minimized.
I'm not sure if something has changed, kernel wise, in between rc2 and rc5, but ZFS build fine on a locally patched kernel. I'm exporting
|
@XHDR So basically: Cant reproduce? |
I'm not sure if that's the correct term for it, as I am running a patched version of 5.5-rc5, but: When I've got more time on my hands, I'll try a clean, non-patched version, and see if it happens there. But for now, just experimenting with ZFS for the first time, my experience is that it seems to compile and run as it should. Edit:
The commit in question:
|
Ahh, yes it seems they did the good old "Lets put something GPL-only to screw with non-gpl kernel modules just for lolz". Again. Should be relatively easy to add this to the condom. |
@behlendorf Any chance we can get a patch into 0.8.3 and out until 5.5 becomes stable and the first user run into problems? |
What needs to be done is to identify which function we're calling now incidentally calls |
The object referencing |
I can confirm this issue on the latest linus tree master. I tried commenting out just If you guys like, I can write a |
You need to set |
@tycho thanks for the call chain, that makes sense. |
Reading this, if I have a non-preempt kernel (CONFIG_PREEMPT is not set), like Fedora ships by default, 5.5 should just work with zfs 0.8.3? |
Also wanted to add, I got this issue with:5.5.1 |
For what it's worth, this incompatibility should not affect too many people as most distro kernels do not use preempt, as far as I know, and when they do it is through optional kernel packages like arch does. |
@rkitover The stock Arch kernel has CONFIG_PREEMPT and CONFIG_PREEMPT_RCU: https://git.archlinux.org/svntogit/packages.git/tree/linux/trunk/config#n98 CONFIG_PREEMPT_VOLUNTARY is much more popular with distributions though (Fedora, SuSE, Ubuntu all use it). |
On Tue, Feb 04 2020, Steven Noonan wrote:
@rkitover The stock Arch kernel has CONFIG_PREEMPT and CONFIG_PREEMPT_RCU:
https://git.archlinux.org/svntogit/packages.git/tree/linux/trunk/config#n98
https://git.archlinux.org/svntogit/packages.git/tree/linux/trunk/config#n124
I'm doing the same via the linux-image-rt kernels on debian.
I've been doing that for years.
This issue though started popping up with the 5.4 series, where even the
stock image has preempt-rcu enabled.
|
Is there anything an end-user can do to workaround this problem? Downgrade the kernel? I'm using Arch Linux and this GPL-only nonsense is going to keep me from rebooting as this literally means I can't boot with the new kernel, rendering my system unusable. |
I have been using the lts kernel fine
…On Tue, Feb 4, 2020 at 9:59 AM YaroKasear ***@***.***> wrote:
Is there anything an end-user can do to workaround this problem? Downgrade
the kernel? I'm using Arch Linux and this GPL-only nonsense is going to
keep me from rebooting as this literally means I can't boot with the new
kernel, rendering my system unusable.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9745>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA4X36SG2G23NEHXE4UJQDRBGGFVANCNFSM4J4RWSVQ>
.
|
@YaroKasear End users on Arch Linux have two options. Your first and by far the easiest option is to downgrade or use the LTS kernel. The second option is to revert the offending change in the 5.5 series via a patch and build/manage the kernel yourself. There is plenty of tooling to help you out but if you've never used the Arch Build System before this would prove quite the adventure. While some users have reported success building and running ZoL 0.8.3 against patched versions of Linux 5.5 this isn't presently supported and you may encounter other issues. |
I think the obvious option is: Downgrade the kernel.
I did it that way all previous problematic kernels until the zfs developers found a soloution. |
Just to add one can use the Arch Linux Archive to downgrade to Linux 5.4.8, other (major) distro's should supply an archive as well. Hope you guys can find a solution and I understand testing it with the latest kernel(s) takes time. :) |
In archlinux the linux-lts package will soon be based on 5.4.x (5.4.18 is currently in testing). And also linux-lts does not have RCU compiled in (as it is based on |
Offtopic: |
I've put together a very hacky patch which will prevent the need to reconfigure/recompile your kernel: Essentially this overrides/reverts It's very hacky and not tested very much beyond the fact that Did I mention that it's very much a hack? OK. |
So your patch seems to be different from these other 2 compatibility patches. Which seem to be for the newer 5.6.x release candidate kernel instead of current 5.5.x [edited] oh this 2nd ubuntu pastebin patched is based of the same PR 9961 My question then would be (this about other PR) if then still requires the recompilation of certain kernels setting as discussed here (such as for the ubuntu kernel). Since that is not mentioned in them it isn't clear to me whether we also need this still patched in for 5.6 too.... or can wait to skip over the 5.5 kernel series entirely to get 0.8.3 working back again. My gut feeling is no these are separate issues and this issue still needs to be fixed for kernels 5.6 too (anything 5.5 or higher). Agree / disagree? |
The 5.6 compat patches don't address the change in 5.5 behaviour, they fix other compat issues. The above commit torvalds/linux@9e8d42a is tagged for 5.6-rc1 so it looks to be an ongoing change. Therefore, this issue still needs a proper fix. |
Arch LTS is now linux-lts 5.4.19-1 and DKMS will not install the module. |
Building zfs-dkms from the AUR, not downloading from the archzfs repo. Will
try a reboot.
…On Fri, Feb 14, 2020, 4:43 PM Walton Hoops ***@***.***> wrote:
@bobberb <https://github.com/bobberb> Are you using zfs-dkms from archzfs
<https://github.com/archzfs/archzfs> or something else?
I'm using zfs-dkms and update/rebooted this morning. Just double checked
to verify, and I am on 5.4.19-1.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9745>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAON37EXWZQVW6XPQ6N5TXLRC4GAVANCNFSM4J4RWSVQ>
.
|
Uh, if your ZFS is on root I wouldn't reboot till you've got a good kernel. |
IMO the arch specific discussion is getting a bit off-topic, |
My apologies.
…On Sat, Feb 15, 2020, 11:51 PM Mitch Bigelow ***@***.***> wrote:
IMO the arch specific discussion is getting a bit off-topic,
In 5.4 zfs worked with CONFIG_PREEMPT=y and in 5.5+ it doesn't. Some
distros ship this by default causing issues with 5.5+ kernels.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9745>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAON37EEBCR6AV56KHND5ALRDDA4LANCNFSM4J4RWSVQ>
.
|
This comment has been minimized.
This comment has been minimized.
Commit torvalds/linux@9e8d42a0f accidentally converted the static inline function blkg_tryget() to GPL-only for kernels built with CONFIG_PREEMPT_RCU=y and CONFIG_BLK_CGROUP=y. Resolve the build issue by providing our own equivilant functionality when needed which uses rcu_read_lock_sched() internally as before. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#9745
Commit torvalds/linux@9e8d42a0f accidentally converted the static inline function blkg_tryget() to GPL-only for kernels built with CONFIG_PREEMPT_RCU=y and CONFIG_BLK_CGROUP=y. Resolve the build issue by providing our own equivilant functionality when needed which uses rcu_read_lock_sched() internally as before. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#9745
Commit torvalds/linux@9e8d42a0f accidentally converted the static inline function blkg_tryget() to GPL-only for kernels built with CONFIG_PREEMPT_RCU=y and CONFIG_BLK_CGROUP=y. Resolve the build issue by providing our own equivalent functionality when needed which uses rcu_read_lock_sched() internally as before. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#9745 Closes openzfs#10072
A fix for this issue has been merged to the master branch and will be included in the next 0.8.x release. I've also backported a version of the patch which applies cleanly to 0.8.3 if you need the fix sooner, see 2fcab87. |
Much appreciated! (It would also be nice to get it more visibility by merging to maint.) |
Fantastic. Thanks for this fix. I got an update from the ArchZFS repository this morning, so I am going to recompile my custom kernel to see if that included the fix. |
Commit torvalds/linux@9e8d42a0f accidentally converted the static inline function blkg_tryget() to GPL-only for kernels built with CONFIG_PREEMPT_RCU=y and CONFIG_BLK_CGROUP=y. Resolve the build issue by providing our own equivalent functionality when needed which uses rcu_read_lock_sched() internally as before. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#9745 Closes openzfs#10072
Commit torvalds/linux@9e8d42a0f accidentally converted the static inline function blkg_tryget() to GPL-only for kernels built with CONFIG_PREEMPT_RCU=y and CONFIG_BLK_CGROUP=y. Resolve the build issue by providing our own equivalent functionality when needed which uses rcu_read_lock_sched() internally as before. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#9745 Closes openzfs#10072
Commit torvalds/linux@9e8d42a0f accidentally converted the static inline function blkg_tryget() to GPL-only for kernels built with CONFIG_PREEMPT_RCU=y and CONFIG_BLK_CGROUP=y. Resolve the build issue by providing our own equivalent functionality when needed which uses rcu_read_lock_sched() internally as before. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9745 Closes #10072
Commit torvalds/linux@9e8d42a0f accidentally converted the static inline function blkg_tryget() to GPL-only for kernels built with CONFIG_PREEMPT_RCU=y and CONFIG_BLK_CGROUP=y. Resolve the build issue by providing our own equivalent functionality when needed which uses rcu_read_lock_sched() internally as before. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#9745 Closes openzfs#10072 Signed-off-by: Pavel Snajdr <[email protected]>
Commit torvalds/linux@9e8d42a0f accidentally converted the static inline function blkg_tryget() to GPL-only for kernels built with CONFIG_PREEMPT_RCU=y and CONFIG_BLK_CGROUP=y. Resolve the build issue by providing our own equivalent functionality when needed which uses rcu_read_lock_sched() internally as before. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#9745 Closes openzfs#10072
Distribution Name | Archlinux
Distribution Version | current
Linux Kernel | 5.5-rc2
Architecture | amd64
ZFS Version | 2019.12.13.r5590.gddb4e69db-1
SPL Version | 2019.12.13.r5590.gddb4e69db-1
Describe the problem you're observing
Cannot compile zfs for 5.5-rc2. There's the following error:
FATAL: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol '__rcu_read_lock'
The text was updated successfully, but these errors were encountered: