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

gccgo: runtime testcase GoroutineProfile random hang when run on ppc64x #15705

Closed
laboger opened this issue May 16, 2016 · 3 comments
Closed
Milestone

Comments

@laboger
Copy link
Contributor

laboger commented May 16, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.6.1 gccgo (GCC) 7.0.0 20160516 (experimental) linux/ppc64le
    Also happens with gcc 6.1 branch.
  2. What operating system and processor architecture are you using (go env)?
    GOARCH="ppc64le"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="ppc64le"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH=""
    GORACE=""
    GOROOT="/usr/local/gccgo1.6"
    GOTOOLDIR="/usr/local/gccgo1.6/libexec/gcc/powerpc64le-linux/7.0.0"
    GO15VENDOREXPERIMENT="1"
    CC="/usr/local/gccgo1.6/bin/gcc"
    GOGCCFLAGS="-fPIC -pthread -fmessage-length=0"
    CXX="/usr/local/gccgo1.6/bin/g++"
    CGO_ENABLED="1"
  3. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.
    After doing a build of gccgo from trunk or the gcc 6 branch, try to run the runtime testcase.

cd bld/powerp64le-linux-gnu/libgo
make runtime/check (My gotest script in src/libgo/testsuite has keep=true to retain the a.out binary from the testcase)

  1. What did you expect to see?
    PASS
  2. What did you see instead?
    runtime test hangs intermittently in GoroutineProfile

In looking through the gcc-testresults for powerpc64le and powerpc64 over the past few months, the libgo runtime testcase has intermittently failed. With today's trunk, I was able to build the runtime testcase and found that I can run the same binary multiple times and it will PASS several times but after about 4 attempts it will hang. The test hangs in the GoroutineProfile test.
./a.out -test.run=GoroutineProfile

When it was hung, I attached with gdb and looked at the threads, and here are some of the stacktraces:

Some similar to this:
//#0 0x0000000010253cd0 in syscall ()
//#1 0x0000000010043900 in runtime_futexsleep (addr=, val=,
ns=) at ../../../src/libgo/runtime/thread-linux.c:47
//#2 0x000000001004361c in runtime_notesleep (n=)
at ../../../src/libgo/runtime/lock_futex.c:137
//#3 0x000000001004fc00 in stopm () at ../../../src/libgo/runtime/proc.c:1458
//#4 0x0000000010053268 in exitsyscall0 (gp=) at ../../../src/libgo/runtime/proc.c:2205
//#5 0x0000000010053804 in runtime_mstart (mp=) at ../../../src/libgo/runtime/proc.c:1076
//#6 0x00000000100032f8 in main (argc=, argv=)
at ../../../src/libgo/runtime/go-main.c:55
//#7 0x000000001021e54c in generic_start_main ()
//#8 0x000000001021e774 in __libc_start_main ()
//#9 0x0000000000000000 in ?? ()

One like this:
//#0 0x0000000010253cd0 in syscall ()
//#1 0x0000000010043900 in runtime_futexsleep (addr=, val=,
ns=) at ../../../src/libgo/runtime/thread-linux.c:47
//#2 0x000000001004361c in runtime_notesleep (n=)
at ../../../src/libgo/runtime/lock_futex.c:137
//#3 0x0000000010050f34 in runtime_stoptheworld () at ../../../src/libgo/runtime/proc.c:960
//#4 0x000000001005e2d8 in runtime.GoroutineProfile (b=...) at ../../../src/libgo/runtime/mprof.goc:472
//#5 0x0000000010032ebc in runtime_test.TestGoroutineProfile (t=) at runtime_unix_test.go:47
//#6 0x0000000010155d10 in testing.tRunner (test=0xc208007940, param=)
at ../../../src/libgo/go/testing/testing.go:472
//#7 testing.$thunk15 (__go_thunk_parameter=)
at ../../../src/libgo/go/testing/testing.go:581
//#8 0x00000000100514a8 in kickoff () at ../../../src/libgo/runtime/proc.c:235
//#9 0x0000000010228130 in makecontext ()
//#10 0x0000000000000000 in ?? ()

I scanned through some of the older gcc-testresults and found that this has intermittently failed as far back as March (didn't look before that) but seems to happen more frequently now. Fails on ppc64le and ppc64.

@quentinmit quentinmit added this to the Gccgo milestone Jun 17, 2016
@ianlancetaylor
Copy link
Contributor

Is this still a problem these days?

@laboger
Copy link
Contributor Author

laboger commented Feb 5, 2018

I am told we haven't seen intermittent hangs during the gccgo test runs in a while.

@ianlancetaylor
Copy link
Contributor

Thanks, closing.

@golang golang locked and limited conversation to collaborators Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants