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/go: TestScript/mod_doc_path and TestScript/cgo_stale_precompiled fail on AIX builder #66344

cherrymui opened this issue Mar 15, 2024 · 6 comments
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-AIX


Copy link

cherrymui commented Mar 15, 2024

cmd/go's TestScript/mod_doc_path and TestScript/cgo_stale_precompiled tests seem to fail consistently on the AIX builder since 412623c. E.g.

--- FAIL: TestScript (0.18s)
    --- FAIL: TestScript/mod_doc_path (0.30s)
        script_test.go:136: 2024-03-15T20:06:34Z
        script_test.go:138: $WORK=/ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/cmd-go-test-3850493464/tmpdir1302838300/mod_doc_path1258781541
            # cmd/doc should use GOROOT to locate the 'go' command,
            # not use whatever is in $PATH.
            # Remove 'go' from $PATH. (It can still be located via $GOROOT/bin/go, and the
            # test script's built-in 'go' command still knows where to find it.) (0.111s)
            > env PATH=''
            > [GOOS:plan9] env path=''
            [condition not met]
            > go doc p.X
            file does not exist
        script_test.go:160: FAIL: testdata/script/mod_doc_path.txt:9: go doc p.X: exit status 1
        script_test.go:415: go was invoked but no counters were incremented
    --- FAIL: TestScript/cgo_stale_precompiled (1.04s)
        script_test.go:136: 2024-03-15T20:07:09Z
        script_test.go:138: $WORK=/ramdisk8GB/workdir-host-aix-ppc64-osuosl/tmp/cmd-go-test-3850493464/tmpdir1302838300/cgo_stale_precompiled3412859766
            # Regression test for and
            # A missing $CC caused the C dependencies of the net
            # package to appear stale, and it could not be rebuilt due to a missing $CC. (0.012s)
            # This test may start with the runtime/cgo package already stale.
            # Explicitly rebuild it to ensure that it is cached.
            # (See
            # If running in non-short mode, explicitly vary CGO_CFLAGS
            # as a control case (to ensure that our regexps do catch rebuilds). (0.643s)
            # a missing $(go env CC) caused the precompiled net
            # to be stale. But as of the precompiled libraries are
            # no longer installed anyway! Since we're requiring a C compiler in order to
            # build and use cgo libraries in the standard library, we should make sure it
            # matches what's in the cache. (0.241s)
            > [abscc] stop
            [condition not met]
            > env CGO_ENABLED=1
            > env CC=''
            > [!GOOS:plan9] env PATH=''  # Guaranteed not to include $(go env CC)!
            > [GOOS:plan9] env path=''
            [condition not met]
            > ! go build -x runtime/cgo
            file does not exist
            [exit status 1]
            > stderr 'C compiler .* not found'
        script_test.go:160: FAIL: testdata/script/cgo_stale_precompiled.txt:32: stderr 'C compiler .* not found': no match for `(?m)C compiler .* not found` in stderr

Commit 412623c doesn't seem related.
The builder also fails on the previous commit d45e8bf (CL, with a probably flaky runtime failure, which might mask out the cmd/go failures. This commit seems more likely related.

cc @matloob @hyangah @golang/aix

@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 15, 2024
@cherrymui cherrymui added this to the Backlog milestone Mar 15, 2024
Copy link

I just verified that the failure is because of the commit d45e8bf (CL

Copy link

matloob commented Mar 18, 2024

@ayappanec Thanks for verifying! I'm planning to take a look at this on the gomotes tomorrow.

@matloob matloob self-assigned this Mar 19, 2024
Copy link

matloob commented Mar 19, 2024

So this seems to be related to the fact that on AIX the code in os/executable_path.go checks PATH to reconstruct the executable path (which we use to start the telemetry sidecar) but the test unsets PATH.

Will continue to investigate

Copy link

@matloob Any update on this ?

Copy link

matloob commented Mar 26, 2024

Hi, sorry I'm still looking at this. I'm trying to figure out what the best thing to do is when we don't have go in our path: to route GOROOT/bin in to telemetry.Start, or to avoid starting the child when we can't find os.Executable

Copy link

Change mentions this issue: cmd: update and vendor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-AIX
None yet

No branches or pull requests

4 participants