-
Notifications
You must be signed in to change notification settings - Fork 17.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
os: cmd/go gets error "copy_file_range: function not implemented" #58592
Comments
Are you sure that the error message is "function not implement" ? I don't see where that could come from. Could it be "function not implemented"? What Linux kernel version are you running? |
Yes, it's "implemented" might have cut the 'ed' on accident.
uname -sr: Linux 5.4.0 |
same issue. reverting to go 1.19.4 "fixes it" |
I'm able to reproduce this, it seems to be a regression introduced in Go 1.20.0. To expand on @remover's comment: the exact message in our case is:
In our case, we see the error when running
This works with Go 1.19.4, but fails with Go 1.20.0 and 1.20.1:
|
I was able to remove docker from the picture. Running directly with qemu results in the same behaviour:
I think this is interesting because similar to @m1d1, there's a virtualization layer involved. I don't know if VSERVER is qemu-based? For completeness, to see if this is something to do with qemu, I tried running the same in qemu-x86_64-static, but only got segfaults, so I didn't look further.
|
|
Can people who are having this problem please see if https://go.dev/cl/470016 fixes it. Thanks. |
Change https://go.dev/cl/470016 mentions this issue: |
@gopherbot Please open a backport to 1.20. On some systems copy_file_range appears to fail with ENOSYS, even though it seems that it shouldn't. On those systems the go tool doesn't work at all. |
Backport issue(s) opened: #58627 (for 1.20). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Also, could you guys try to run the example C code of |
@ianlancetaylor @panjf2000 I'll give those a try today |
I can confirm that https://go.dev/cl/470016 fixes the issue for us. I cherry-picked the CL onto the go1.20.1 tag in a fresh golang/go checkout, buit it with
|
@panjf2000 I just gave this a try, too. Looks like
|
I see that the |
@ccmtaylor Thank you for the effort, we now know the behavior of qemu, it does look a bit unusual. On the other hand, I'm also interested in how the real machine (other than emulator and virtualizer) acts on |
sure! the copy_file_range sample code works fine running natively on the host (an e2-medium instance in europe-west1):
|
What about go1.20? does it also work with |
not sure what you're asking. Yes, the release binaries for Go 1.20.1 work fine on the host:
|
@ccmtaylor Thanks. |
Change https://go.dev/cl/470316 mentions this issue: |
…in CopyFileRange" This reverts CL 428555. Reason for revert: It appears that even a newer kernel can get ENOSYS from copy_file_range. For #58592 Fixes #58627 Change-Id: Ib8dd1be61544f54bf652a99dc0b449109f8f50ed Reviewed-on: https://go-review.googlesource.com/c/go/+/470316 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Fix build issue with copy_file_range: function not implemented See golang/go#58592
…in CopyFileRange" This reverts CL 428555. Reason for revert: It appears that even a newer kernel can get ENOSYS from copy_file_range. For golang#58592 Fixes golang#58627 Change-Id: Ib8dd1be61544f54bf652a99dc0b449109f8f50ed Reviewed-on: https://go-review.googlesource.com/c/go/+/470316 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Please file a new issue at golang.org/issue/new using this template:
What version of Go are you using (
go version
)?Go on a VSERVER.
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Tried to build or run a "hello world" Println example.
What did you expect to see?
"Hello World"
What did you see instead?
runtime: copying /usr/lib/go-1.20/src/runtime/asm_amd64.h to /tmp/go-build3218382935/b008/asm_GOARCH.h: write /tmp/go-build3218382935/b008/asm_GOARCH.h: copy_file_range: function not implement
Note
go 1.19 worked on the Vserver. go >= 1.20 doesn't.
The text was updated successfully, but these errors were encountered: