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/testplugin: TestForkExec failures with exit status 2 #61846

Closed
gopherbot opened this issue Aug 8, 2023 · 7 comments
Closed
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@gopherbot
Copy link

gopherbot commented Aug 8, 2023

#!watchflakes
post <- pkg == "cmd/cgo/internal/testplugin" && test == "TestForkExec" && `running command failed: exit status 2`

Issue created automatically to collect these failures.

Example (log):

mkdir -p $TMPDIR/src/testplugin
rsync -a testdata/ $TMPDIR/src/testplugin
echo 'module testplugin' > $TMPDIR/src/testplugin/go.mod
mkdir -p $TMPDIR/alt/src/testplugin
rsync -a altpath/testdata/ $TMPDIR/alt/src/testplugin
echo 'module testplugin' > $TMPDIR/alt/src/testplugin/go.mod
cd $TMPDIR/alt/src/testplugin
( GOPATH=$TMPDIR/alt PWD=$TMPDIR/alt/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin -o $TMPDIR/src/testplugin/plugin-mismatch.so ./plugin-mismatch )
cd $TMPDIR/src/testplugin
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin ./plugin1 )
...
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -o issue44956.exe ./issue44956/main.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin ./issue44956.exe )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin -o issue52937.so ./issue52937/main.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin -o issue53989.so ./issue53989/plugin.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -o issue53989.exe ./issue53989/main.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin ./issue53989.exe )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin -o generic.so ./generic/plugin.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -o forkexec.exe ./forkexec/main.go )
--- FAIL: TestForkExec (6.10s)
    plugin_test.go:378: running command failed: exit status 2

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 8, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "cmd/cgo/internal/testplugin" && test == "TestForkExec"
2023-07-21 14:45 darwin-amd64-10_15 go@ed977e2f cmd/cgo/internal/testplugin.TestForkExec (log)
mkdir -p $TMPDIR/src/testplugin
rsync -a testdata/ $TMPDIR/src/testplugin
echo 'module testplugin' > $TMPDIR/src/testplugin/go.mod
mkdir -p $TMPDIR/alt/src/testplugin
rsync -a altpath/testdata/ $TMPDIR/alt/src/testplugin
echo 'module testplugin' > $TMPDIR/alt/src/testplugin/go.mod
cd $TMPDIR/alt/src/testplugin
( GOPATH=$TMPDIR/alt PWD=$TMPDIR/alt/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin -o $TMPDIR/src/testplugin/plugin-mismatch.so ./plugin-mismatch )
cd $TMPDIR/src/testplugin
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin ./plugin1 )
...
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -o issue44956.exe ./issue44956/main.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin ./issue44956.exe )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin -o issue52937.so ./issue52937/main.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin -o issue53989.so ./issue53989/plugin.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -o issue53989.exe ./issue53989/main.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin ./issue53989.exe )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -buildmode=plugin -o generic.so ./generic/plugin.go )
( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /tmp/buildlet/go/bin/go build -gcflags '' -o forkexec.exe ./forkexec/main.go )
--- FAIL: TestForkExec (6.10s)
    plugin_test.go:378: running command failed: exit status 2

watchflakes

@bcmills bcmills added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 8, 2023
@bcmills
Copy link
Contributor

bcmills commented Aug 8, 2023

@gopherbot
Copy link
Author

Change https://go.dev/cl/517095 mentions this issue: cmd/cgo/internal/testplugin: simplify TestForkExec and log stderr output

@bcmills
Copy link
Contributor

bcmills commented Aug 8, 2023

Looks like this test was added in https://go.dev/cl/372798 for #38824.

@bcmills bcmills changed the title cmd/cgo/internal/testplugin: TestForkExec failures cmd/cgo/internal/testplugin: TestForkExec failures with exit status 2 Aug 8, 2023
gopherbot pushed a commit that referenced this issue Aug 8, 2023
This test used to run with a separate goroutine for timeout behavior,
presumably because it was difficult to set an appropriate timeout.

Now that the test is in cmd instead of misc, we can use
internal/testenv.Command, which makes adding the test timeout much
simpler and eliminates the need for the explicit goroutine.

For #61846.

Change-Id: I68ea09fcf2aa394bed1e900cf30ef7d143fa249f
Reviewed-on: https://go-review.googlesource.com/c/go/+/517095
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
@mknyszek
Copy link
Contributor

mknyszek commented Aug 9, 2023

@bcmills Thanks for working on that CL! Are we now just waiting for another failure? Added WaitingForInfo if so, but feel free to drop it.

@mknyszek mknyszek added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 9, 2023
@bcmills
Copy link
Contributor

bcmills commented Aug 9, 2023

Yeah, I think at this point it's fine to just wait — if it's a frequent failure we should get a more detailed log soon, and if it's not then it's probably not important to go chasing after.

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Aug 9, 2023
@gopherbot
Copy link
Author

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
Status: Done
Development

No branches or pull requests

3 participants