golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.68k stars 17.62k forks source link

gccgo: libgo failures beginning with r275026 on ppc64/ppc64le #33958

Closed laboger closed 5 years ago

laboger commented 5 years ago

We are seeing new failures in libgo on trunk beginning with r275026. It happens on ppc64 and ppc64le power8 and ppc64le power9.

New test case failures:

FAIL: cmd/go/internal/generate
FAIL: cmd/go/internal/get
FAIL: cmd/go/internal/load
FAIL: cmd/go/internal/modconv
FAIL: cmd/go/internal/modfetch
FAIL: cmd/go/internal/modfile
FAIL: cmd/go/internal/modload
FAIL: cmd/go/internal/work
FAIL: crypto/tls
FAIL: crypto/x509
FAIL: fmt
FAIL: go/ast
FAIL: go/constant
FAIL: go/doc
FAIL: go/format
FAIL: go/printer
FAIL: html/template
FAIL: net
FAIL: net/http
FAIL: net/http/pprof
FAIL: net/rpc
FAIL: net/rpc/jsonrpc
FAIL: text/template
FAIL: text/template/parse

libgo.log:

panic: template: main:1: unexpected
package main

import (

goroutine 1 [running]:
text..z2ftemplate.Must
        /home/boger/gccgo.work/trunk/bld/../src/libgo/go/text/template/helper.go:23
cmd..z2fgo..z2finternal..z2fload..import
        /home/boger/gccgo.work/trunk/bld/../src/libgo/go/cmd/go/internal/load/test.go:568
Keeping gotest147124
FAIL: cmd/go/internal/generate
panic: template: main:1: unexpected
package main

import (

goroutine 1 [running]:
text..z2ftemplate.Must
        /home/boger/gccgo.work/trunk/bld/../src/libgo/go/text/template/helper.go:23
cmd..z2fgo..z2finternal..z2fload..import
        /home/boger/gccgo.work/trunk/bld/../src/libgo/go/cmd/go/internal/load/test.go:568
Keeping gotest147322
FAIL: cmd/go/internal/get

Many of the failures start with a similar panic message regarding template: main:1: unexpected fmt looks like this:

  239 |  {"%q", string(0x110000), `"�"`},
      |         ^
fmt_test.go:240:10: warning: unicode code point 0x110000 out of range in string
  240 |  {"%+q", string(0x110000), `"\ufffd"`},
      |          ^
fmt_test.go:241:10: warning: unicode code point 0x110000 out of range in string
  241 |  {"%#q", string(0x110000), "`�`"},
      |          ^
fmt_test.go:242:11: warning: unicode code point 0x110000 out of range in string
  242 |  {"%#+q", string(0x110000), "`�`"},
      |           ^
--- FAIL: TestScanf (0.00s)
    scan_test.go:511: Sscanf("7573696e672d2578\n", "%x"): unexpected error: unexpected EOF
    scan_test.go:511: Sscanf("7573696E672D2558\n", "%X"): unexpected error: unexpected EOF
    scan_test.go:511: Sscanf("62797465732d2578\n", "%x"): unexpected error: unexpected EOF
    scan_test.go:511: Sscanf("62797465732D2558\n", "%X"): unexpected error: unexpected EOF
--- FAIL: TestHexBytes (0.00s)
    scan_test.go:1115: simple pair: got count, err = 0, unexpected EOF; expected 2, nil
    scan_test.go:1102: simple pair a: bad length 0
    scan_test.go:1102: simple pair b: bad length 0
FAIL
Keeping gotest183138
FAIL: fmt
--- FAIL: TestOps (0.00s)
    value_test.go:179: "" + "" = "": got "\"\" not an Int"; want ""
    value_test.go:179: "foo" + "" = "foo": got "\"\" not an Int"; want "foo"
    value_test.go:179: "" + "bar" = "bar": got "\"bar\" not an Int"; want "bar"
    value_test.go:179: "foo" + "bar" = "foobar": got "\"bar\" not an Int"; want "foobar"
panic: interface conversion:    go..z2fconstant constant.Value is       go..z2fconstant constant.ratVal, not *  go..z2fconstant constant.stringVal [recovered]
        panic: interface conversion:    go..z2fconstant constant.Value is       go..z2fconstant constant.ratVal, not *  go..z2fconstant constant.stringVal

goroutine 20 [running]:
testing.tRunner..func1
        /home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:803
panic
        /home/boger/gccgo.work/trunk/bld/../src/libgo/go/runtime/panic.go:701
go..z2fconstant.Compare
        /home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest185632/test/value.go:1302
constant.eql
        /home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest185632/test/value_test.go:201
go..z2fconstant.TestOps
        /home/boger/gccgo.work/trunk/bld/powerpc64le-linux/libgo/gotest185632/test/value_test.go:178
testing.tRunner
        /home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:865
created by testing.T.Run
        /home/boger/gccgo.work/trunk/bld/../src/libgo/go/testing/testing.go:916 +0x398
Keeping gotest185632
FAIL: go/constant

Even though the change where this started happening was not to gofrontend or libgo, the only new failures we are seeing come from libgo, so I thought we could start here for some insight on why this would happen with this change.

Let me know if I can provide more information.

ianlancetaylor commented 5 years ago

This was filed on the GCC issue tracker as https://gcc.gnu.org/PR91617.

laboger commented 5 years ago

Fixed according to the bz and our gcc-testresults.