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

cmd/cgo/internal/swig,cmd/go,x/build: swig cgo tests incompatible with C++ toolchain on builders #67698

Closed
mknyszek opened this issue May 29, 2024 · 13 comments
Labels
Builders x/build issues (builders, bots, dashboards) NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@mknyszek
Copy link
Contributor

After updating the builder images to have a gcc-based C++ toolchain, the clang and 386 builders began failing. This appears to be because the toolchain that's installed is either incompatible with the object files produced by cgo and the Go toolchain (my theory for clang) or the toolchain just can't properly cross-compile (my theory for 386).

Thing is, these tests were already getting skipped 100% of the time, or not running at all, looking at the history. So for now, they're skipped once again. This bug tracks possibly enabling these tests, but I don't think they're a particularly high priority.

Example failures:

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/588938 mentions this issue: cmd/cgo/internal/swig,cmd/go: skip swig tests on 386 and clang

gopherbot pushed a commit that referenced this issue May 29, 2024
We recently added a C++ toolchain to the image, and this is causing
problems on 386 and clang builders. The likely culprit is that we're
missing 32-bit C++ libraries on the builders.

Even if this theory is wrong, these tests *never* ran (always skipped,
or truly never ran) on these platforms, so just skip them for now. We
can look into getting the libraries installed later, but skip for now
to unblock the builders.

There are also problems with clang, but I believe they'll be resolved by
setting CXX to clang++ in golangbuild.

For #67698.

Change-Id: I20fc1c5fa1285001ff86a4226771c30cf2e7f92d
Cq-Include-Trybots: luci.golang.try:gotip-linux-386-clang15,gotip-linux-386
Reviewed-on: https://go-review.googlesource.com/c/go/+/588938
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/589195 mentions this issue: cmd/cgo/internal/swig,cmd/go: reenable swig tests on 386

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/589175 mentions this issue: env: add g++-multilib for running swig tests on 386

@dmitshur dmitshur added this to the Go1.23 milestone May 29, 2024
@dmitshur dmitshur added Testing An issue that has been verified to require only test changes, not just a test failure. Builders x/build issues (builders, bots, dashboards) NeedsFix The path to resolution is known, but the work has not been done. labels May 29, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/589295 mentions this issue: cmd/cgo/internal/testsanitizers: skip some libfuzzer tests in short mode

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/589296 mentions this issue: cmd/cgo/internal/swig: force use of lld for LTO tests on the builders

@mknyszek mknyszek reopened this May 30, 2024
@mknyszek
Copy link
Contributor Author

Erroneously closed, but will be closed soon.

gopherbot pushed a commit that referenced this issue May 30, 2024
These tests are newly-running now that we have installed a C++ toolchain
on the clang builders, but one of them doesn't actually complete in short
mode.

For #67698.

Change-Id: Id1ff4c05e380426d920277c13495f30e23561a4e
Reviewed-on: https://go-review.googlesource.com/c/go/+/589295
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
@dmitshur
Copy link
Contributor

dmitshur commented May 30, 2024

@gopherbot Please consider this for backport, in particular CL 589295 CL 589495 and CL 589296. They apply test-only fixes that are needed to fix builder failures in newly running tests after a builder change.

@gopherbot
Copy link
Contributor

Backport issue(s) opened: #67714 (for 1.21), #67715 (for 1.22).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

gopherbot pushed a commit that referenced this issue May 31, 2024
CL 589295 only made one of the two tests short, because the other one
seemed to be passing consistently in short mode. On the builders, it
seems to still fail maybe 30% of the time by taking too long. Disable
these tests in short mode.

For #67698.

Change-Id: I9fd047f834f7493b608dd1fee5b9b6dfabbea03d
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-clang15,gotip-linux-386-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/589495
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Knyszek <mknyszek@google.com>
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/589495 mentions this issue: cmd/cgo/internal/testsanitizers: make the libfuzzer tests all short

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/591375 mentions this issue: [release-branch.go1.22] cmd/cgo/internal/swig: force use of lld for LTO tests on the builders

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/591376 mentions this issue: [release-branch.go1.22] cmd/cgo/internal/testsanitizers: make the libfuzzer tests all short

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/591378 mentions this issue: [release-branch.go1.21] cmd/cgo/internal/testsanitizers: make the libfuzzer tests all short

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/591377 mentions this issue: [release-branch.go1.21] cmd/cgo/internal/swig: force use of lld for LTO tests on the builders

gopherbot pushed a commit that referenced this issue Jun 24, 2024
…TO tests on the builders

For whatever reason, on the builders, when using /usr/bin/ld (the
default linker) with -flto we end up with problems. Specifically, the
linker seems to require LLVMgold.so and can't find it. I'm not really
sure why, but what definitely seems to work is forcing use of lld, which
ships with our clang installation on the builders.

Just enforce this on the builders for now; I've actually had very few
problems running this locally (and I think I'm also mixing and matching
linkers and toolchains too...), so it may be related to the version of
clang we're testing with.

For #67698.
For #67714.

Change-Id: I3bfbcd609e7d0fd70e52ac7e2a0817db95664f20
Cq-Include-Trybots: luci.golang.try:go1.21-linux-amd64-clang15,go1.21-linux-386-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/589296
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/591377
gopherbot pushed a commit that referenced this issue Jun 24, 2024
…fuzzer tests all short

CL 589295 only made one of the two tests short, because the other one
seemed to be passing consistently in short mode. On the builders, it
seems to still fail maybe 30% of the time by taking too long. Disable
these tests in short mode.

This CL was merged with CL 589295 before cherry-picking.

For #67698.
Fixes #67715.

Change-Id: I9fd047f834f7493b608dd1fee5b9b6dfabbea03d
Cq-Include-Trybots: luci.golang.try:go1.22-linux-amd64-clang15,go1.22-linux-386-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/589495
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Knyszek <mknyszek@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/591376
gopherbot pushed a commit that referenced this issue Jun 24, 2024
…fuzzer tests all short

CL 589295 only made one of the two tests short, because the other one
seemed to be passing consistently in short mode. On the builders, it
seems to still fail maybe 30% of the time by taking too long. Disable
these tests in short mode.

This CL was merged with CL 589295 before cherry-picking.

For #67698.
Fixes #67714.

Change-Id: I9fd047f834f7493b608dd1fee5b9b6dfabbea03d
Cq-Include-Trybots: luci.golang.try:go1.21-linux-amd64-clang15,go1.21-linux-386-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/589495
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Knyszek <mknyszek@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/591378
gopherbot pushed a commit that referenced this issue Jun 24, 2024
…TO tests on the builders

For whatever reason, on the builders, when using /usr/bin/ld (the
default linker) with -flto we end up with problems. Specifically, the
linker seems to require LLVMgold.so and can't find it. I'm not really
sure why, but what definitely seems to work is forcing use of lld, which
ships with our clang installation on the builders.

Just enforce this on the builders for now; I've actually had very few
problems running this locally (and I think I'm also mixing and matching
linkers and toolchains too...), so it may be related to the version of
clang we're testing with.

For #67698.
For #67715.

Change-Id: I3bfbcd609e7d0fd70e52ac7e2a0817db95664f20
Cq-Include-Trybots: luci.golang.try:go1.22-linux-amd64-clang15,go1.22-linux-386-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/589296
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/591375
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

3 participants