Skip to content

freebsd regression in 1.20.1- os.Stat shows function not implemented #58914

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

Closed
JalonSolov opened this issue Mar 7, 2023 · 7 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-FreeBSD WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@JalonSolov
Copy link

JalonSolov commented Mar 7, 2023

What version of Go are you using (go version)?

$ go version
go version go1.19.6 linux/amd64

and

$ go version
go version go1.20.1 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

linux/amd64

What did you do?

Test file foo.go:

package main

import (
        "fmt"
        "os"
)

func main() {
        s, err := os.Stat("foo.go")
        if err != nil {
                fmt.Println(err)
        }
        fmt.Printf("%#v\n", s)
}

On system with Go 1.19.6:

$ GOOS=freebsd go build foo.go
$ scp foo <freebsd machine>:foo.19

On system with Go 1.20.1:

$ GOOS=freebsd go build foo.go
$ scp foo <freebsd machine>:foo.20

From either system:

$ scp foo.go <freebsd machine>:

On FreeBSD system:

$ ./foo.19
...
$ ./foo.20

What did you expect to see?

Same (or at least very similar) output

What did you see instead?

$ ./foo.19
&os.fileStat{name:"foo.go", size:175, mode:0x1a4, modTime:time.Time{wall:0x7d8ca00, ext:63813798690, loc:(*time.Location)(0x53d360)}, sys:syscall.Stat_t{Dev:0x3a00ff6c, Ino:0x4aebd51, Nlink:0x1, Mode:0x81a4, Padding0:0, Uid:0x257, Gid:0x7e, Padding1:0, Rdev:0x0, Atimespec:syscall.Timespec{Sec:1678201603, Nsec:752772000}, Mtimespec:syscall.Timespec{Sec:1678201890, Nsec:131648000}, Ctimespec:syscall.Timespec{Sec:1678201890, Nsec:131648000}, Birthtimespec:syscall.Timespec{Sec:-1, Nsec:0}, Size:175, Blocks:8, Blksize:4096, Flags:0x0, Gen:0x0, Spare:[10]uint64{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}}
$ ./foo.20
stat foo.go: function not implemented
<nil>
$
@bcmills
Copy link
Contributor

bcmills commented Mar 7, 2023

(attn @golang/freebsd)

@bcmills bcmills added this to the Backlog milestone Mar 7, 2023
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 7, 2023
@bcmills
Copy link
Contributor

bcmills commented Mar 7, 2023

What version of FreeBSD are you running?
Per https://go.dev/wiki/MinimumRequirements#freebsd, current Go releases require FreeBSD 10 or higher.

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 7, 2023
@JalonSolov
Copy link
Author

JalonSolov commented Mar 7, 2023

FreeBSD <server name> 11.1-RELEASE FreeBSD 11.1-RELEASE #0

@paulzhol
Copy link
Member

paulzhol commented Mar 7, 2023

That wiki is very out of date. FreeBSD 11 is only supported by Go 1.18 (and 1.19 because we missed the merge window):
https://tip.golang.org/doc/go1.18#freebsd
Specifically for #53280.

@JalonSolov
Copy link
Author

JalonSolov commented Mar 7, 2023

Gotcha... Go 1.18 was supposed to be the last version that supported FreeBSD 11, but because the merge window was missed, Go 1.19 still supported it, but support for that version is really gone in Go 1.20+.

In that case, I guess this issue can be closed. Sorry for the noise.

@paulzhol
Copy link
Member

paulzhol commented Mar 7, 2023

FreeBSD 11 support was dropped in Go 1.20, like mentioned in the ticket. 1.19 still has the compatibility shims for switching the syscall versions at runtime.
Go 1.18 was supposed to be the last, but we missed the merge window. So 1.19 is the last version with that code.

@paulzhol
Copy link
Member

paulzhol commented Mar 7, 2023

I've updated the wiki to point to https://github.com/golang/go/wiki/FreeBSD#go-on-freebsd instead.

@paulzhol paulzhol closed this as completed Mar 7, 2023
github-actions bot pushed a commit to zchee/golang-wiki that referenced this issue Mar 8, 2023
@golang golang locked and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-FreeBSD WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants