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: dropping FreeBSD 11 compatibility code in go1.20 #53280

Closed
dmgk opened this issue Jun 7, 2022 · 9 comments
Closed

syscall: dropping FreeBSD 11 compatibility code in go1.20 #53280

dmgk opened this issue Jun 7, 2022 · 9 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-FreeBSD
Milestone

Comments

@dmgk
Copy link
Member

dmgk commented Jun 7, 2022

Go 1.18 release notes state that Go 1.18 will be the last release that still supports FreeBSD 11.x, which reached EOL on September 30, 2021. Yet there's still FreeBSD 11.x compatibility code in the tree introduced by e.g. dc6eb20 and golang/sys@5535b4e which still requires COMPAT_FREEBSD11 in the kernel.

It's probably too late for 1.19, but are there any plans to remove this 11.x compat code in 1.20 and drop COMPAT_FREEBSD11 requirement?

@ianlancetaylor
Copy link
Member

CC @paulzhol @golang/freebsd

@ianlancetaylor ianlancetaylor changed the title Dropping FreeBSD 11 compatibility code in go1.20 syscall: dropping FreeBSD 11 compatibility code in go1.20 Jun 7, 2022
@ianlancetaylor ianlancetaylor added OS-FreeBSD NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jun 7, 2022
@ianlancetaylor ianlancetaylor added this to the Go1.20 milestone Jun 7, 2022
@paulzhol
Copy link
Member

paulzhol commented Jun 8, 2022

Hi, yes sorry I'll try to get around doing that this weekend.
IIRC the 64-bit inode code in syscall and sys/unix does a runtime detection. So on FreeBSD 12.0 and up, the new syscalls are used. The new structs are always used, even in FreeBSD 11 with a compatibility hack to convert the old layout to the new.

The only user of COMPAT_FREEBSD11 is the runtime package for the kevent syscall in the poller which has an extra argument uint64_t ext[4] field in FreeBSD 12. And it is not dynamic. Also COMPAT_FREEBSD11 is still part of the GENERIC kernel, even on arm64.

On a related note, how do I get Gerrit credentials to trigger the build bots?

@ianlancetaylor
Copy link
Member

On a related note, how do I get Gerrit credentials to trigger the build bots?

See https://go.dev/wiki/GerritAccess.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/411596 mentions this issue: syscall: remove FreeBSD 11 and below 64bit inode compatibility shims

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/413174 mentions this issue: runtime: switch FreeBSD to use the non-COMPAT_FREEBSD11 version of the kevent syscall

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/415714 mentions this issue: unix: regenerate on FreeBSD 12.3

gopherbot pushed a commit to golang/sys that referenced this issue Jul 4, 2022
Switch mksysnum to use https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12.
Also remove the SAL 2.0 annotations.

remove FreeBSD 11 and below 64bit inode compatibility shims

Drop the errors_freebsd_GOARCH.go files.

Drop PTRACE_* and additional (arch specific) consts added as part of golang.org/cl/179099 to types_freebsd.
Add <sys/ptrace.h> to mkerror.sh for FreeBSD instead.

Run mkall.sh on FreeBSD 12.3 on amd64 and arm64 hosts with i386 and armv7 jails
for all supported arches.

Updates golang/go#53280

Change-Id: Idd29056829013a1f6eb26376978632645e4018ef
Reviewed-on: https://go-review.googlesource.com/c/sys/+/415714
Reviewed-by: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/416894 mentions this issue: dashboard: drop host-freebsd-11_2, host-freebsd-11_4 builders

gopherbot pushed a commit to golang/build that referenced this issue Jul 11, 2022
…_4 from tryBots for "sys" repo

Updates golang/go#53280
Fixes golang/go#53783

Change-Id: I96a00e6d7733382118f108d31d14f578546639b7
Reviewed-on: https://go-review.googlesource.com/c/build/+/416894
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
@mknyszek mknyszek moved this to Triage Backlog in Go Compiler / Runtime Jul 15, 2022
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/419119 mentions this issue: syscall: update for FreeBSD 12

@prattmic prattmic moved this from Triage Backlog to In Progress in Go Compiler / Runtime Aug 5, 2022
gopherbot pushed a commit that referenced this issue Sep 16, 2022
Update #53280

Change-Id: Iaa7c0cf5dbefaa8e14c2de499f99755911c17672
Reviewed-on: https://go-review.googlesource.com/c/go/+/411596
Reviewed-by: Meng Zhuo <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Yuval Pavel Zholkover <[email protected]>
Reviewed-by: Dmitri Goutnik <[email protected]>
gopherbot pushed a commit that referenced this issue Sep 16, 2022
…e kevent syscall

Update #53280

Change-Id: I1c8d4510fbe8bdfe9a41575bde54ea2fbf6b67e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/413174
Reviewed-by: Dmitri Goutnik <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Run-TryBot: Yuval Pavel Zholkover <[email protected]>
@dmgk
Copy link
Member Author

dmgk commented Sep 16, 2022

Thanks.

@golang golang locked and limited conversation to collaborators Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-FreeBSD
Projects
None yet
Development

No branches or pull requests

4 participants