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: issue19182 test hangs with large initial CPU count #47232

Open
pmur opened this issue Jul 15, 2021 · 2 comments
Open

gccgo: issue19182 test hangs with large initial CPU count #47232

pmur opened this issue Jul 15, 2021 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@pmur
Copy link
Contributor

pmur commented Jul 15, 2021

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

$ gccgo -v
Using built-in specs.
COLLECT_GCC=gccgo
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.1.1-20210531/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.1.1 20210531 (Red Hat 11.1.1-3) (GCC) 

or ppc64le

Using built-in specs.
COLLECT_GCC=/opt/at14.0/bin/gccgo
COLLECT_LTO_WRAPPER=/opt/at14.0/libexec/gcc/powerpc64le-linux-gnu/10.3.1/lto-wrapper
Target: powerpc64le-linux-gnu
Configured with: /build/at14.0_RHEL8_ppc64le-ppc64le/103/at14.0-3.redhat-8_ppc64le_ppc64le/sources/gcc/configure --build=powerpc64le-linux-gnu --host=powerpc64le-linux-gnu --target=powerpc64le-linux-gnu --with-cpu=default64 --prefix=/opt/at14.0 --with-long-double-128 --enable-secureplt --disable-multilib --with-advance-toolchain=at14.0 --with-glibc-version=2.32 --with-local-prefix=/opt/at14.0 --enable-threads=posix --enable-languages=c,c++,fortran,go --enable-__cxa_atexit --enable-shared --enable-checking=release --enable-lto --enable-gnu-indirect-function --enable-initfini-array --enable-linker-build-id --with-system-zlib --with-gmp-include=/opt/at14.0/include --with-gmp-lib=/opt/at14.0/lib64 --with-mpfr-include=/opt/at14.0/include --with-mpfr-lib=/opt/at14.0/lib64 --with-mpc-include=/opt/at14.0/include --with-mpc-lib=/opt/at14.0/lib64 --without-ppl --without-cloog --without-libelf --with-host-libstdcxx='-L/opt/at14.0/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm' --with-cpu=power8 --with-tune=power8
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 20210412 (Advance-Toolchain 14.0-3) [9c2461a2d5de] (GCC) 

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

ppc64le and amd64.

What did you do?

gccgo -o issue19182 issue19182.go
GOMAXPROCS=400 ./issue19182

What did you expect to see?

Program termination

What did you see instead?

Program does not terminate.

@gopherbot gopherbot added this to the Gccgo milestone Jul 15, 2021
@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 15, 2021
@ianlancetaylor
Copy link
Contributor

This is happening because the large initial GOMAXPROCS is somehow causing the garbage collector to start. The garbage collector tries to suspend all threads, but the thread that is looping calling atomic.AddUint64 isn't paying attention and can't be suspended. The program then hangs with one thread running forever and another thread waiting for it to stop.

Not sure what to do about this.

@cherrymui
Copy link
Member

Maybe we could set the GC to off in this test?

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.
Projects
None yet
Development

No branches or pull requests

4 participants