-
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
sendfile regression in ZFS arch linux 5.16 2.1.2_5.16.arch1.1-1 not zfs-linux-2.1.2_5.15.13.arch1.1-1 #12971
Comments
rincebrain/zfs@f6960eb resolves this for me (possibly with the other two patches in that branch; I tried them in a different order than they're committed, this was the last one, and it worked). I'll test it some more and try to submit it for inclusion, possibly with a test to notice this in the future. Of course, the fact that it doesn't work without that is still a problem, I think, since I can't find any suggestion that |
The last argument to sendfile() looks a bit to big and seems to be some 2^31 overflow ? |
I saw that its 2g-4096 I have reverted to 5.15 for the moment.
The sendfile docs suggest a different error of the size is too large.
I will verify the sendfile systemcall under 5.15 to see if there are any
errors and see if I can dig out the depths of rust to see what the call
looks like. It would be better if it was maxed with the file size I would
think.
…On Fri., Jan. 14, 2022, 1:32 p.m. Tino Reichardt, ***@***.***> wrote:
sendfile(4, 6, [0], 2147479552) = -1 EINVAL (Invalid argument)
The last argument to sendfile() looks a bit to big and seems to be some
2^31 overflow ?
Could you check the code which uses sendfile?
Maybe some cast to size_t sendfile(4, 6, [0], (size_t)var) would help...
maybe the error just tells, that count is out of range?
—
Reply to this email directly, view it on GitHub
<#12971 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5XB2LJDA4C5FQTNXSBIKLUWCI7BANCNFSM5L5XFHHA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Works fine under 5.15 end of a long steam of sendfiles for the package
sendfile for the signature of 310 bytes
Good news code in not buried in some library :) code
I'm not sure it will resolve the issue but its not best according to the man page. |
from sendfile man
I would have expected EOVERFLOW when file size is less than 0x7fff_f000 (which it is in both cases) |
The Thank you for the hints. |
I updated the sendfile call and submitted a PR as it seems more inline with the sendfile manpage. It made no difference under 5.16 and zfs. |
Have the same issue using ZFS 2.1.2 and Linux 5.16.2 on a Void Linux system, would appreciate it if the patches were merged and backported to 2.1.x branch. I will try to test them locally myself and give feedback in the PR. |
|
Is this with the master ZFS fixes for 5.16? What commit? |
No, this was with the 2.1.2 release. |
It looks like this change was backported to Linux 5.15 starting in 5.15.37. I'm seeing sendfile failures on that version with openzfs 2.1.2. Here's the diff for Linux 5.15.37: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/?id=v5.15.37&id2=v5.15.36&dt=2 |
What is the current status on this? Is there a current (LTS or mainline) kernel that works with ZFS and sendfile? |
This has been fixed for several releases now. cf. #12975 |
Great, maybe we could close this? I was holding an upgrade back because of it. |
Sounds reasonable to me; if there's some reason I'm not seeing this should be open, I'm sure someone will ping it and we can reopen. |
System information
Distribution Name | Arch Linux
Distribution Version | 5.16.0-arch1-1
Kernel Version | 5.16.0-arch1-1
Architecture | x86_64
OpenZFS Version | zfs-2.1.2-1 zfs-kmod-2.1.2-1
Describe the problem you're observing
sendfile fails with EINVAL after upgrade to linux-5.16.arch1-1 and zfs-linux-2.1.2_5.16.arch1.1-1
works fine with on zfs linux-5.15.13.arch1-1 zfs-linux-2.1.2_5.15.13.arch1.1-1
works fine with an xfs file system on linux-5.16.arch1-1
Describe how to reproduce the problem
attempting to fetch a package from flexo with pacman
from flexo log
from strace of flexo process
Include any warning/errors/backtraces from the system logs
no relevant system logs on either end
The text was updated successfully, but these errors were encountered: