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
gccgo: testcase failures on ppc64 and ppc64le in gcc trunk #29046
Comments
For |
Not sure yet, I will look at it more. It fails consistently on ppc64 but not ppc64le. These two compile errors look similar and only happen on BE. |
This failure only happens on ppc64: goroutine 224 [running]: |
Change https://golang.org/cl/152160 mentions this issue: |
Some recent failures in gccgo on linux/ppc64 identified an error in buildmodeInit when buildmode=c-archive. A fix went into gofrontend, and this is the corresponding change for master. This change also includes two other updates related to gccgo in this function that were in the file from gofrontend but missing from master. Updates #29046 Change-Id: I9a894e7d728e31fb9e9344cd61d50408df7faf4a Reviewed-on: https://go-review.googlesource.com/c/152160 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
There is a runtime failure in archive/tar on ppc64 (not ppc64le) gccgo that started with this revision:
This commit also causes a failure in net/http --- FAIL: TestProxyFromEnvironment (0.00s) |
No reason to open an entry in GCC bugzilla. It doesn't make this any likelier to get fixed. It is bizarre that that change would have any minor effect like breaking a couple of tests. That change should either break everything or nothing. Did you bisect on all changes to GCC, or just changes to gcc/go and libgo? That said that error looks like a confusion about data initialization. Or generally something very odd. The error message you show is impossible. It suggests that the array |
The bisection was done on all changes to gcc by the person who monitors the gcc-testresults, and I verified it.
If I add a print statement to the top of the test before the struct is initialized, it passes. I can try adding prints to the http test to see if the structure initialization is correct and if that changes they way it runs. |
I looked more at os/signal and its intermittent failures. I found that it will fail regularly if I am on a system where a lot of others are doing builds and compiles. I did a profile on just the Atomic test and found that more than 50% is spent in backtrace.qsort. Not sure who is trying to generate a backtrace when running this test but that obviously is much more expensive than golang and causes the this to take much longer on gccgo. Can we change the limit from 1 to 2 seconds all the time or should I add a check so it is only more for gccgo? I can make the change -- but does it go in golang upstream or gofrontend or both. |
The test harness calls the backtrace code a couple of times. I'm surprised that it has that much effect, though. It's pretty bad if the backtrace library causes a program to take more than a second to start up, even if the system is heavily loaded. If the time is in If that is the problem, then I note that in general Go doesn't actually need that information, as it is only used for But looking at this more closely, I'm not sure that it could be the backtrace library. The 1 second timeout here is in the loop in Still, if bumping up the timeout to 2 seconds means that the program always passes then I guess we may as well do that, in both libraries. |
We have 3 failures that started with 264546, which was the upgrade to go 1.11. If you plan to upgrade to go 1.12 we could just want and see what happens after that. Two of those are compile failures that only happens on ppc64 in net and cmd/go/internal/local as I show above. === RUN TestAbort
...... |
More detail on the archive/tar test failure on ppc64 shown earlier in this issue. In the case where it works, both calls to strings.Repeat pass the constant value 2 as the length of "a/" which looks correct. Here is code from the objdump of the test binary from 265708.
|
Change https://golang.org/cl/153879 mentions this issue: |
This increases the time to wait for signals to be delivered in the TestAtomicStop testcase. When running gccgo tests on ppc64 or ppc64le, there are intermittent failures in this test because the wait time is too small. Updates golang/go#29046 Change-Id: Ic70f4109f328df95d50270f468a4860fa3c1e286 Reviewed-on: https://go-review.googlesource.com/c/153879 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change https://golang.org/cl/153826 mentions this issue: |
This increases the time to wait for signals to be delivered in the TestAtomicStop testcase. When running gccgo tests on ppc64 or ppc64le, there are intermittent failures in this test because the wait time is too small. Updates golang/go#29046 Reviewed-on: https://go-review.googlesource.com/c/153879 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267068 138bc75d-0d04-0410-961f-82ee72b054a4
This increases the time to wait from 1 to 2 seconds in the TestAtomicStop testcase. When running with gccgo on ppc64 & ppc64le on a loaded systems these testcases can intermittently fail with the current value. Updates #29046 Change-Id: If420274dd65926d933a3024903b5c757c300bd60 Reviewed-on: https://go-review.googlesource.com/c/153826 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
I did some debugging on the failing test in net/http. This one consistently fails at runtime on ppc64 and ppc64le on every system (power7 & power8). Both this one and the failure in archive/tar are related to initializing structures with constant strings. The failure happens in TestProxyFromEnvironment because the structure for tt from proxyFromEnvTests has been initialized incorrectly. I did various experiments and found that adding print statements will allow it to work. It will fail when processing the 5th entry from the list in proxyFromEnvTest because the string for env is wrong, apparently a constant initialization error -- it is not pointing to the correct string according to gdb at the point it is trying to pass onto the testProxyForRequest function, which can be seen in the error output. (Possibly because the same constant appears twice in the structure and at compile time it is supposed to find the same one but doesn't? Adding print statements will add more string constants and that somehow affects it? My theory.) I tried removing entries from proxyFromEnvTests and found that I had to have the first 5 entries to make it fail. I tried building the test with -O0 so it is not an optimization issue as far as the test is concerned. |
Thanks for looking into this. Can you use that information to build a standalone reproduction? |
I'll see what I can do. |
I was unable to reproduce the problem in net/http in a smaller testcase. Any minor change allows it to pass. So I decided to wait until the Go 1.12 front end update, and I was able to build with that patch yesterday. With the new frontend, net/http no longer fails on ppc64le, and it fails on ppc64 but in a different way. I will verify it behaves the same on multiple systems/distros before posting that one. The following failure occur in gotools before and after the update to Go 1.12:
|
This is additional information on the failure in archive/tar that currently only happens on ppc64 but I believe it is the same problem that was previously happening in net/http on ppc64le before the recent gofrontend update. It seems to be random in nature because slight changes to the testcase can make it work, so I have been unable to make it work in a small testcase. (If I remove other tests in the file it will work.) So even though it only occurs on ppc64 I believe it could happen on ppc64le. I showed the generated code above to see where it goes wrong. Below is the gimple. It is the middle argument that is wrong based on the objdump above. In the failing case, there is a VIEW_CONVERT_EXPR inserted, but that doesn't appear in the gimple when it works. In the case where it fails:
In the case where it passes:
In writer_test.go, at the top of TestSplitUSTAR this works:
This one fails:
|
gccgo builds are broken on ppc64le, they get an ICE due to a change from yesterday. It is documented here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89368 @ianlancetaylor |
There are a lot of different unrelated problems here. As far as I can tell all the test failures are passing now. If there are still problems, let's open a new issue. Thanks. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
Reviewing the failures from the latest gcc-testresults.
There are several different failures, but I will add them all to this issue instead of opening individual ones.
Problem 1)
In gotools when running on linux/ppc64
cd carchive-test-dir/misc/cgo/testcarchive && PATH=/home/boger/gccgo.work/bld/gotools:/home/boger/golang/go/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/boger/.local/bin:/home/boger/bin GCCGO='/home/boger/gccgo.work/bld/gotools/check-gccgo' CC='/home/boger/gccgo.work/bld/gotools/check-gcc' GCCGOTOOLDIR='/home/boger/gccgo.work/bld/gotools' GO_TESTING_GOTOOLS=yes LD_LIBRARY_PATH=/home/boger/gccgo.work/bld/powerpc64-linux/libgo/.libs GOROOT=/home/boger/gccgo.work/bld/powerpc64-linux/libgo GOCACHE=/home/boger/gccgo.work/bld/gotools/gocache-test LIBRARY_PATH=/home/boger/gccgo.work/bld/powerpc64-linux/libgo/.libs /home/boger/gccgo.work/bld/gotools/go test -test.timeout=480s -test.v carchive_test.go
=== RUN TestInstall
FAIL: TestInstall
carchive_test.go:214: [go install -i -buildmode=c-archive libgo]
carchive_test.go:214: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:214: exit status 1
=== RUN TestEarlySignalHandler
FAIL: TestEarlySignalHandler
carchive_test.go:249: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:250: exit status 1
=== RUN TestSignalForwarding
FAIL: TestSignalForwarding
carchive_test.go:282: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:283: exit status 1
=== RUN TestSignalForwardingExternal
FAIL: TestSignalForwardingExternal
carchive_test.go:326: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:327: exit status 1
=== RUN TestOsSignal
FAIL: TestOsSignal
carchive_test.go:442: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:443: exit status 1
=== RUN TestSigaltstack
FAIL: TestSigaltstack
carchive_test.go:478: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:479: exit status 1
=== RUN TestExtar
SKIP: TestExtar
carchive_test.go:512: skipping -extar test when using gccgo
=== RUN TestPIE
FAIL: TestPIE
carchive_test.go:564: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:565: exit status 1
=== RUN TestSIGPROF
=== PAUSE TestSIGPROF
=== RUN TestCompileWithoutShared
FAIL: TestCompileWithoutShared
carchive_test.go:688: [go build -buildmode=c-archive -gcflags=-shared=false -o libgo2.a libgo2]
carchive_test.go:690: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:692: exit status 1
=== RUN TestCachedInstall
FAIL: TestCachedInstall
carchive_test.go:744: [go install -i -buildmode=c-archive libgo]
carchive_test.go:746: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:747: exit status 1
=== CONT TestSIGPROF
FAIL: TestSIGPROF
carchive_test.go:649: -buildmode=c-archive not supported on linux/ppc64
carchive_test.go:650: exit status 1
FAIL
FAIL command-line-arguments 3.395s
FAIL: go test misc/cgo/testcarchive
This is due to a bug in cmd/go/internal/work/init.go and I have a fix for it.
--- FAIL: TestAtomicStop (2.39s)
signal_test.go:384: iteration 3: output lost signal on tries: 9
signal_test.go:392: iteration 3: lost signal
FAIL
This one can be fixed by increasing the wait time in the test.
The text was updated successfully, but these errors were encountered: