-
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
all: require Linux kernel version 2.6.32 #45964
Comments
I support this change. Other GOOS variants fairly regularly drop support for older versions, and Linux 2.x hasn't had any upstream support at all since 2016 (2.6.32 got extended by Ubuntu/RHEL, other 2.x versions went EOL by 2012). Supporting dozens of Linux versions at once adds cost to maintenance and code complexity, makes testing more difficult, etc. Worth noting that Debian Stretch, now "oldstable", has long-term support until mid-2022, and is on Linux 3.16 like you say. The actual stable release is on Linux 4.19, which is supported by upstream until 2024. Similarly, CentOS v7 using Linux 3.10 is supported until 2024. So it seems like we could consider another bump sometime after. |
glibc now also requires at least 3.2 version since 2.27 (announcement) for all architectures, including x86 ones. |
@ianlancetaylor perhaps this should be a proposal? |
Thanks, moved into proposal process. |
This proposal has been added to the active column of the proposals project |
glibc requires 3.2. CentOS apparently requires 3.10. And what are the benefits of bumping the minimum? Is there code we will be able to delete, like when we dropped XP? |
We are still trying to understand this change, specifically Any thoughts? |
I'll give my opinion on those questions, but I'm not the author of this proposal.
I think changing the minimum to 3.10 would be sensible, given the Linux distro info given above. I don't see a clear reason to go lower than that; even if glibc still supports 3.2 today, that kernel version went EOL in 2018 and isn't used by any supported Linux distro that I can find.
We don't do that check right now with our current minimum, right? Is a new minimum different from the existing minimum, given that we're choosing it to be very conservative?
To me, one of the main benefits is testing. I'd assume that we want to have a GOOS=linux builder running the oldest version of the kernel we support, to have more confidence that it actually works as advertised. That's a lot harder to do if that version is EOL, and isn't used by any maintained distro. Even if one wanted to have GOOS=linux builders at multiple major versions of Linux (maybe popular LTS versions), bumping the minimum would hopefully mean fewer of those versions to worry about. Asking for a summary of code that could be simplified, or issues that could be closed, seems reasonable. I'm not experienced in this area, but with five minutes of grepping I found five likely candidates: go/src/internal/poll/sock_cloexec.go Line 19 in 6e189af
Line 557 in e11d142
go/src/syscall/syscall_linux.go Line 212 in e11d142
go/src/syscall/syscall_linux.go Line 556 in e11d142
|
iant points out that timerfd was added in 2.6.25 and we probably want to depend on it for time.ExternalNow, so we should bump at least that far. And the examples show we could bump to at least 2.6.28 to simplify some code. bradfitz points out that Synology 6.2 ships with 2.6.32. So maybe we should raise to 2.6.32, which will let us eliminate some very old things, keep some existing known use cases working, and seems not to add any known burden compared to newer versions. Thoughts on raising to 2.6.32? |
That would clean all of checks in the go runtime except one that requires 4.5+, sounds good! |
Bumping fewer versions is certainly better than bumping none :) We can always revisit for a newer Linux version in a couple of years. |
I'm not a linux pro, but Synology 6.2.4 on my NAS shows:
Suggestions above seem to target on 3.10, is 2.6.32 really a requirement? |
We know of users of Go programs built for Synology 6.2 using 2.6.32, and we know of users of CentOS 6 using 2.6.32.
The clear downside of 3.10 over 2.6.32 is dropping support for those systems, where we know of real instances where Go is running today. What is the upside of 3.10 over 2.6.32? |
Retitled to specify 2.6.32. Does anyone object to this change? |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Change https://go.dev/cl/422374 mentions this issue: |
Change https://go.dev/cl/422375 mentions this issue: |
Change https://go.dev/cl/424574 mentions this issue: |
All supported Go versions, that is Go 1.18 and newer, now share a common Linux kernel version requirement adopted in proposal 45964. For golang/go#45964. Change-Id: Iec386b75f71ebf192883e4aac9bb3634bffdfe35 Reviewed-on: https://go-review.googlesource.com/c/website/+/424574 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Change https://go.dev/cl/422979 mentions this issue: |
The splice syscall is buggy prior to Linux 2.6.29. CL 113999 added a workaround to detect buggy versions and disable use of splice for these. As of Go 1.18 the minumum Linux version is 2.6.32. Thus, a non-buggy implementation of the splice syscall can be assumed. For #45964 Fixes #54505 Change-Id: Ied3a3334da7a3f7fa1280b7c5b1dfb9030219336 Reviewed-on: https://go-review.googlesource.com/c/go/+/422979 Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Change https://go.dev/cl/424556 mentions this issue: |
Most newer architectures (e.g. arm64, riscv64, loong64) don't provide the epoll_create syscall. Some systems (e.g. Android) block it even if it were available. In the kernel, the epoll_create syscall is implemented [1] the same way EpollCreate is implemented in this package for platforms without the epoll_create syscall. The epoll_create1 syscall is available since Linux kernel 2.6.27 and the minimum required kernel version is 2.6.32 since Go 1.18 (see #45964). Thus, avoid the separate wrapper and consistently implement EpollCreate using EpollCreate1. [1] https://elixir.bootlin.com/linux/v5.15-rc1/source/fs/eventpoll.c#L2006 The same change was already done in CL 349809 for golang.org/x/sys/unix. For #45964 Change-Id: I5463b208aa7ae236fa2c175d6d3ec6568f1840b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/411594 Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Support for operating system versions requiring the fallback to CloseOnExec/SetNonblock was dropped from recent Go versions. The minimum Linux kernel version is 2.6.32 as of Go 1.18. FreeBSD 10 is no longer supported as of Go 1.13. Follows a similar change for net.sysSocket in CL 403634 and syscall.Socket in CL 422374. For #45964 Change-Id: I60848415742a1d8204e1fda585462ff35ad6722f Reviewed-on: https://go-review.googlesource.com/c/go/+/422375 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Support for Linux kernel versions requiring the fallback to CloseOnExec was dropped from recent Go versions. The minimum Linux kernel version is 2.6.32 as of Go 1.18. The SOCK_CLOEXEC flag for the socket syscall is supported since kernel version 2.6.27. Follows a similar change for net.sysSocket in CL 403634. For #45964 Change-Id: I8b6311f07c4ed7900a9af3ecb2e146c49db08665 Reviewed-on: https://go-review.googlesource.com/c/go/+/422374 Reviewed-by: Joedian Reid <joedian@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Older kernels which require the double check of the __kuser_cmpxchg result are no longer supported as of Go 1.18 which requires at least Linux 2.6.32. For #45964 Change-Id: Ic3d6691bf006353ac51b9d43e742d970e3d4e961 Reviewed-on: https://go-review.googlesource.com/c/go/+/424556 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Change https://go.dev/cl/501275 mentions this issue: |
Change https://go.dev/cl/501276 mentions this issue: |
This reverts CL 422375. Reason for revert: We still need the fallback path on Solaris. For #45964 For #59359 Change-Id: Ie598b9ef180708fb157080015aee44f67f6737c4 Reviewed-on: https://go-review.googlesource.com/c/go/+/501275 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org>
Change https://go.dev/cl/501636 mentions this issue: |
For #45964 For #59359 Change-Id: I9f8f4c17ccd9711f81d152953a5e6aea50c6a28f Reviewed-on: https://go-review.googlesource.com/c/go/+/501636 Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com>
This reverts CL 40364. Reason for revert: Fallback path is still required on Solaris. For #45964 For #59359 Change-Id: I4b8c8af77ee987cad6617221793b90c9a8829c3e Reviewed-on: https://go-review.googlesource.com/c/go/+/501276 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Change https://go.dev/cl/501939 mentions this issue: |
For #45964 For #59359 Change-Id: I7fd295a096e5776102e057789d157da681df9073 Reviewed-on: https://go-review.googlesource.com/c/go/+/501939 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
The last version of 2.6.23(.17) was released on February 2008 src.
The current CentOS LTS (v7) uses kernel 3.10 src.
Debian's minimum is 3.16 src.
A quick search shows lot of random issues that could have been avoided by supported a slightly newer kernel.
This is a request to bump the minimum required kernel version to at least 3.10.
The text was updated successfully, but these errors were encountered: