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

syscall, internal/poll: accept4-to-accept fallback removal broke Go code on Synology DSM 6.2 ARM devices [1.19 backport] #57339

Closed
gopherbot opened this issue Dec 15, 2022 · 2 comments · Fixed by tailscale/go#37
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@ianlancetaylor requested issue #57333 to be considered for backport to the next 1.19 minor release.

@gopherbot Please open backport issues.

We thought that we could require support for accept4 on Linux when we updated the minimum kernel version to 2.6.32, but it turns out that on 32-bit ARM accept4 was only added in kernel version 2.6.36.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Dec 15, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 15, 2022
@gopherbot gopherbot added this to the Go1.19.5 milestone Dec 15, 2022
@gopherbot
Copy link
Author

Change https://go.dev/cl/457996 mentions this issue: [release-branch.go1.19] syscall, internal/poll: fall back to accept on linux-arm

bradfitz pushed a commit to tailscale/go that referenced this issue Dec 19, 2022
…n linux-arm

Our minimum Linux version is 2.6.32, and the accept4 system call was
introduced in 2.6.28, so we use accept4 everywhere. Unfortunately,
it turns out that the accept4 system call was only added to
linux-arm in 2.6.36, so for linux-arm only we need to try the accept4
system call and then fall back to accept if it doesn't work.

The code we use on linux-arm is the code we used in Go 1.17.
On non-arm platforms we continue using the simpler code introduced
in Go 1.18.

Adding accept4 to the ARM Linux kernel was:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=21d93e2e29722d7832f61cc56d73fb953ee6578e

For golang#57333
Fixes golang#57339

Cherry picked from commit 8d809f950986db3162ec62aa9ebb490a2d20f621
at https://go-review.googlesource.com/c/go/+/457996 which is due
to be merged into Go's release-branch.go1.19.

Change-Id: I6680cb54dd4d3514a6887dda8906e6708c64459d
bradfitz pushed a commit to tailscale/go that referenced this issue Dec 20, 2022
…n linux-arm

Our minimum Linux version is 2.6.32, and the accept4 system call was
introduced in 2.6.28, so we use accept4 everywhere. Unfortunately,
it turns out that the accept4 system call was only added to
linux-arm in 2.6.36, so for linux-arm only we need to try the accept4
system call and then fall back to accept if it doesn't work.

The code we use on linux-arm is the code we used in Go 1.17.
On non-arm platforms we continue using the simpler code introduced
in Go 1.18.

Adding accept4 to the ARM Linux kernel was:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=21d93e2e29722d7832f61cc56d73fb953ee6578e

For golang#57333
Fixes golang#57339

Cherry picked from commit 8d809f950986db3162ec62aa9ebb490a2d20f621
at https://go-review.googlesource.com/c/go/+/457996 which is due
to be merged into Go's release-branch.go1.19.

Change-Id: I6680cb54dd4d3514a6887dda8906e6708c64459d
@heschi heschi reopened this Dec 21, 2022
@dr2chase dr2chase added the CherryPickApproved Used during the release process for point releases label Dec 21, 2022
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Dec 21, 2022
gopherbot pushed a commit that referenced this issue Dec 21, 2022
…n linux-arm

Our minimum Linux version is 2.6.32, and the accept4 system call was
introduced in 2.6.28, so we use accept4 everywhere. Unfortunately,
it turns out that the accept4 system call was only added to
linux-arm in 2.6.36, so for linux-arm only we need to try the accept4
system call and then fall back to accept if it doesn't work.

The code we use on linux-arm is the code we used in Go 1.17.
On non-arm platforms we continue using the simpler code introduced
in Go 1.18.

Adding accept4 to the ARM Linux kernel was:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=21d93e2e29722d7832f61cc56d73fb953ee6578e

For #57333
Fixes #57339

Change-Id: I6680cb54dd4d3514a6887dda8906e6708c64459d
Reviewed-on: https://go-review.googlesource.com/c/go/+/457996
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@dr2chase
Copy link
Contributor

I believe this should be closed, and I'm not sure why the pushed-a-commit above did not close it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants