[Bug 267788] Go testsuite fails in armv7 jail on arm64 host, but not on armv7 host

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 15 Nov 2022 15:59:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267788

            Bug ID: 267788
           Summary: Go testsuite fails in armv7 jail on arm64 host, but
                    not on armv7 host
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: arm64
               URL: https://github.com/golang/go/issues/56729
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: freebsd-arm@FreeBSD.org
          Reporter: fuz@fuz.su
                CC: cognet@FreeBSD.org, dmgk@freebsd.org

Running the Go 1.19.3 test suite (all.bash in the Go distribution) in an armv7
jail
on arm64 FreeBSD 13.1 (RPi 4B), I get weird test suite failures.  The same
failures do not occur when testing natively on an armv7 machine (RPi 2B) with
the same OS version.

Could this be a kernel bug?

--- 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

-- 
You are receiving this mail because:
You are the assignee for the bug.