https://github.com/golang/go/issues/42515 identified a NetBSD kernel bug (kern/50094) affecting the Go runtime. http://golang.org/cl/277332 introduced a (rather subpar) workaround for this issue.
@jdolecek-zz notes that the fix for this bug is included in NetBSD 9.2, making the workaround unnecessary.
Ideally we just drop http://golang.org/cl/277332, but this depends on our support policy for NetBSD. https://github.com/golang/go/wiki/NetBSD states that we currently support NetBSD 7+, but not what the official policy is. (OTOH, e.g., OpenBSD is explicitly supported only for the two most recent releases: https://github.com/golang/go/wiki/OpenBSD#longterm-support).
Based on my reading of https://www.netbsd.org/releases/formal.html, my interpretation would be that Go should support NetBSD 8 and 9 (and presumably drop 8 when 10 is released?). Do others agree? If so, we should probably add a version check to the workaround and keep it until NetBSD 9 is dropped.
cc @bsiegert @dmitshur @mknyszek
Comment From: dmitshur
I agree we should find a support policy that automatically drops support for old NetBSD releases when new ones are made, similar to how OpenBSD has one.
CC @golang/release.
Comment From: tklauser
Another option to already disable the workaround for NetBSD 9.2 while still retaining compatibility with older NetBSD versions would be to check sysctlInt([]uint32{_CTL_KERN, _KERN_OSREV})
in runtime.osinit
and disable the fix if that value is >= 902000000
.
I've sent https://golang.org/cl/324472 implementing that.
Comment From: gopherbot
Change https://golang.org/cl/324472 mentions this issue: runtime: skip sysmon workaround on NetBSD >= 9.2
Comment From: hzzb
Another option to already disable the workaround for NetBSD 9.2 while still retaining compatibility with older NetBSD versions would be to check
sysctlInt([]uint32{_CTL_KERN, _KERN_OSREV})
inruntime.osinit
and disable the fix if that value is>= 902000000
.I've sent https://golang.org/cl/324472 implementing that.
The CL you sent does os version checking in os_netbsd.go
. It seems to me that no GOOS == "netbsd"
rechecking needed in sysmon. Because needSysmonWorkaround
would be true only on netbsd platform. right?
CC @tklauser
Comment From: tklauser
Another option to already disable the workaround for NetBSD 9.2 while still retaining compatibility with older NetBSD versions would be to check
sysctlInt([]uint32{_CTL_KERN, _KERN_OSREV})
inruntime.osinit
and disable the fix if that value is>= 902000000
. I've sent https://golang.org/cl/324472 implementing that.The CL you sent does os version checking in
os_netbsd.go
. It seems to me that noGOOS == "netbsd"
rechecking needed in sysmon. BecauseneedSysmonWorkaround
would be true only on netbsd platform. right?CC @tklauser
Yes, needSysmonWorkaround
will only be true on netbsd. However, the additional GOOS == "netbsd"
check will lead the compiler to omit the entire branch on non-netbsd platforms, i.e. needSysmonWorkaround
will not need to be checked at runtime.
Comment From: hzzb
Another option to already disable the workaround for NetBSD 9.2 while still retaining compatibility with older NetBSD versions would be to check
sysctlInt([]uint32{_CTL_KERN, _KERN_OSREV})
inruntime.osinit
and disable the fix if that value is>= 902000000
. I've sent https://golang.org/cl/324472 implementing that.The CL you sent does os version checking in
os_netbsd.go
. It seems to me that noGOOS == "netbsd"
rechecking needed in sysmon. BecauseneedSysmonWorkaround
would be true only on netbsd platform. right? CC @tklauserYes,
needSysmonWorkaround
will only be true on netbsd. However, the additionalGOOS == "netbsd"
check will lead the compiler to omit the entire branch on non-netbsd platforms, i.e.needSysmonWorkaround
will not need to be checked at runtime.
Got it. Thanks for your explanation.
Comment From: jdolecek-zz
Hello.
NetBSD 10.1 is now out. It's OK to drop support for NetBSD 8 - the end of formal support has been May 4, 2024. NetBSD 9.4 is the latest minor release, released April 20, 2024.
Generally NetBSD support policy is that once a patch release is available, then users are directed towards using that release. Bugs are generally fixed on the main release branch (i.e. netbsd-9), the minor releases don't receive further updates. The only very rare exceptions are critical security updates.
From your perspective, you don't need to worry about supporting 8.x or 9.0 and 9.1. It's OK to only support latest minor releases of two latest major releases, which as of today is 9.4 and 10.1
Comment From: gopherbot
Change https://go.dev/cl/687735 mentions this issue: runtime: drop NetBSD kernel bug sysmon workaround fixed in NetBSD 9.2