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

all: various test suite failures on arm FreeBSD #56729

Closed
clausecker opened this issue Nov 14, 2022 · 5 comments
Closed

all: various test suite failures on arm FreeBSD #56729

clausecker opened this issue Nov 14, 2022 · 5 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-FreeBSD
Milestone

Comments

@clausecker
Copy link

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

$ go version
go version go1.19.3 freebsd/arm

Does this issue reproduce with the latest release?

Yes.

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

I am testing in an armv7 (32 bit) jail on an arm64 FreeBSD 13.1 host.

go env Output
$ go env
GO111MODULE="auto"
GOARCH="arm"
GOBIN=""
GOCACHE="/usr/home/fuz/.cache/go-build"
GOENV="/usr/home/fuz/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm"
GOHOSTOS="freebsd"
GOINSECURE=""
GOMODCACHE="/usr/home/fuz/src/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="freebsd"
GOPATH="/usr/home/fuz/src/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/tmp/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/tmp/go/pkg/tool/freebsd_arm"
GOVCS=""
GOVERSION="go1.19.3"
GCCGO="gccgo"
GOARM="7"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/tmp/go/src/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -marm -pthread -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build855462263=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Run the test suite (run.bash)

What did you expect to see?

No failures, maybe some flakes.

What did you see instead?

Lots of test suite failures:

--- FAIL: TestDCT (0.06s)
    dct_test.go:78: i=35: FDCT
        src
        {
                0x0000, 0x0000, 0x0000, 0x00a6, 0x0000, 0x0000, 0x0064, 0x0000, 
                0x00f4, 0x0000, 0x0044, 0x0046, 0x00ed, 0x0072, 0x0000, 0x0000, 
                0x0000, 0x0000, 0x0096, 0x0000, 0x0000, 0x0000, 0x0038, 0x0000, 
                0x0000, 0x0062, 0x0000, 0x00d3, 0x004e, 0x0000, 0x004b, 0x0000, 
                0x00d0, 0x0000, 0x0000, 0x0000, 0x0000, 0x002b, 0x0000, 0x0000, 
                0x0000, 0x00ec, 0x006a, 0x0023, 0x0000, 0x004b, 0x0063, 0x0000, 
                0x002e, 0x0000, 0x0000, 0x0000, 0x0000, 0x001d, 0x0000, 0x0000, 
                0x0000, 0x0086, 0x0000, 0x0000, 0x00b2, 0x0000, 0x000c, 0x00a4, 
        }
        got
        {
                0xebd8, 0x0292, 0xfee1, 0x0118, 0x00f2, 0x005c, 0xfe31, 0x0052, 
                0x00fd, 0x00ad, 0xfce9, 0x00fd, 0x01b4, 0x051e, 0x00fc, 0x00a6, 
                0x0051, 0xfd6f, 0xff67, 0xffe6, 0x022c, 0xfdc6, 0xffb9, 0x0106, 
                0xff7e, 0x0169, 0x0154, 0x013d, 0xfdaf, 0x0298, 0xff94, 0xfd54, 
                0xff9e, 0xfe51, 0x000c, 0xfef1, 0x034c, 0x0071, 0xfcdf, 0xfdca, 
                0xfc5a, 0xfdfe, 0xfdfe, 0xfbda, 0xfdc4, 0x02fc, 0xfd01, 0xfd2c, 
                0xffd4, 0xfea3, 0x007d, 0xfab7, 0xfa7c, 0xfee3, 0xfdb5, 0xffb1, 
                0xfb03, 0xffc9, 0x02ee, 0x00a8, 0x004f, 0x0262, 0x041b, 0x019a, 
        }
        want
        {
                0xebd9, 0x0292, 0xfee2, 0x0117, 0x00f2, 0x005c, 0xfe32, 0x0052, 
                0x00fd, 0x00ad, 0xfcea, 0x00fd, 0x01b4, 0x051e, 0x00fc, 0x00a5, 
                0x0051, 0xfd70, 0xff67, 0xffe7, 0x022c, 0xfdc7, 0xffba, 0x0106, 
                0xff7f, 0x0169, 0x0154, 0x013d, 0xfdb0, 0x0297, 0xff95, 0xfd56, 
                0xff9f, 0xfe52, 0x000c, 0xfef2, 0x034c, 0x0071, 0xfcdf, 0xfdcb, 
                0xfc5b, 0xfdff, 0xfdff, 0xfbdb, 0xfdc5, 0x02fc, 0xfd03, 0xfd2d, 
                0xffd5, 0xfea4, 0xffa3, 0xfab8, 0xfa7d, 0xfee4, 0xfdb7, 0xffb2, 
                0xfb04, 0xffc9, 0x02ee, 0x00a8, 0x004f, 0x0262, 0x041b, 0x019a, 
        }
FAIL
FAIL    image/jpeg      26.861s
--- FAIL: TestMUDTracking (0.18s)
    mud_test.go:82: inverse(30) = 0.5591381724253374, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5586624103885134, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5469651579616419, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5466046095998363, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5433567836763477, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.532762368527474, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5300878709399219, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5170200550184978, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5170200550184978, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5170200550184978, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5107044797157085, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5072570054458773, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5060522326208803, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5060522326208803, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5039603713275813, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.5039244467792984, not ∈ [0.27734375, 0.2783203125)
    mud_test.go:82: inverse(30) = 0.4934037493992722, not ∈ [0.27734375, 0.2783203125)
FAIL
FAIL    internal/trace  0.359s
stddev NaN != 73.90083445627211 (allowed error 0.0072168783648703235, 0.005773502691896259)
stddev NaN != 73.90083445627211 (allowed error 0.0072168783648703235, 0.005773502691896259)
stddev NaN != 73.90083445627211 (allowed error 0.0072168783648703235, 0.005773502691896259)
--- FAIL: TestReadUniformity (0.27s)
    rand_test.go:395: stddev NaN != 73.90083445627211 (allowed error 0.0072168783648703235, 0.005773502691896259)
    rand_test.go:395: stddev NaN != 73.90083445627211 (allowed error 0.0072168783648703235, 0.005773502691896259)
    rand_test.go:395: stddev NaN != 73.90083445627211 (allowed error 0.0072168783648703235, 0.005773502691896259)
FAIL
FAIL    math/rand       0.815s
(...)
FAIL    net/http        1080.370s
2022/11/14 14:11:46 http: TLS handshake error from 217.197.83.6:54231: remote error: tls: bad certificate
2022/11/14 14:11:46 http: TLS handshake error from 217.197.83.6:54238: read tcp 217.197.83.6:54237->217.19
7.83.6:54238: use of closed network connection
--- FAIL: TestServer (0.26s)
    --- FAIL: TestServer/NewTLSServer (0.10s)
        --- FAIL: TestServer/NewTLSServer/ServerClient (0.09s)
            server_test.go:154: Get "https://217.197.83.6:54230": x509: certificate is valid for 127.0.0.1
, ::1, not 217.197.83.6
    --- FAIL: TestServer/NewTLSServerManual (0.09s)
        --- FAIL: TestServer/NewTLSServerManual/ServerClient (0.09s)
            server_test.go:154: Get "https://217.197.83.6:54237": x509: certificate is valid for 127.0.0.1
, ::1, not 217.197.83.6
2022/11/14 14:11:46 http: TLS handshake error from 217.197.83.6:54249: remote error: tls: bad certificate
--- FAIL: TestTLSServerWithHTTP2 (0.13s)
    --- FAIL: TestTLSServerWithHTTP2/http2 (0.12s)
        server_test.go:287: Failed to make request: Get "https://217.197.83.6:54248": x509: certificate is
 valid for 127.0.0.1, ::1, not 217.197.83.6
2022/11/14 14:11:47 Get "https://217.197.83.6:54256": x509: certificate is valid for 127.0.0.1, ::1, not 2
17.197.83.6
FAIL    net/http/httptest       0.902s

What originally made me suspicious was a strange compilation failure in the FreeBSD port net/gdrive:

# math
/usr/local/go119/src/math/tan.go:98:7: internal compiler error: infinity is not a valid constant

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new

This error occurred with Go 1.19.1. I then loaded Go 1.19.3 to inspect the problem. While I was not able to reproduce this build failure, I did get a whole lot of test failures as seen above.

@joedian joedian added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 14, 2022
@clausecker
Copy link
Author

Further investigation shows that the issue occurs in an armv7 jail on an arm64 host but not on an armv7 host. I suspect a kernel bug.

@clausecker
Copy link
Author

Relevant FreeBSD issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267788

@dmgk
Copy link
Member

dmgk commented Nov 15, 2022

cc @golang/freebsd

@seankhliao seankhliao changed the title various test suite failures on arm FreeBSD all: various test suite failures on arm FreeBSD Nov 19, 2022
@seankhliao seankhliao added this to the Unplanned milestone Nov 19, 2022
@clausecker
Copy link
Author

This is confirmed to be a kernel issue on FreeBSD (wrong FP safe/restore code for armv7 processes on arm64) and will be fixed with an upcoming commit.

@clausecker
Copy link
Author

Fixed with FreeBSD src commit ccd0f34d8585cba727dd17a381309855af655b82, which will be merged into the 13 and 14 stable branches. The fix will be part of FreeBSD 14.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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