Skip to content

syscall: TestDeathSignal failed in github code space. #62719

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

Closed
qiulaidongfeng opened this issue Sep 19, 2023 · 4 comments
Closed

syscall: TestDeathSignal failed in github code space. #62719

qiulaidongfeng opened this issue Sep 19, 2023 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge 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

@qiulaidongfeng
Copy link
Member

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

$ go version
tip

Does this issue reproduce with the latest release?

yes.

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

go env Output
$ go env

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/workspaces/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/workspaces/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='devel go1.22-ee788dba Sat Sep 9 01:48:44 2023 +0000'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/workspaces/go/src/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2757108754=/tmp/go-build -gno-record-gcc-switches'

What did you do?

Fork golang/go in github, see https://docs.github.com/en/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository Create a code space.
See also https://docs.github.com/en/codespaces/developing-in-codespaces/opening-an-existing-codespace Open the code space.
cd src
./all.bash

What did you expect to see?

Test passed.

What did you see instead?

death signal parent error: fork/exec /tmp/TestDeathSignal3458263251/syscall.test: permission denied
--- FAIL: TestDeathSignal (0.00s)
exec_pdeathsig_test.go:97: did not receive start from child, received "", EOF
FAIL
FAIL syscall 1.447s

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

bcmills commented Sep 19, 2023

This is one of the tests that was also failing on the LUCI builders, and was skipped there in https://go.dev/cl/513779 (CC @dmitshur @heschi).

As I commented on that CL:

I suspect that the real problem in this case is that the deathSignalParent function hard-codes a specific UID and GID that probably don't apply in a chroot:
https://cs.opensource.google/go/go/+/master:src/syscall/exec_pdeathsig_test.go;l=111-113;drc=2ad666dea0490305bb7fd2dd6e7beb767acfd2c3

Probably the test should be changed to look up the actual UID and GID for nobody, and should skip the test if that lookup fails.

@qiulaidongfeng, want to send a CL implementing that approach?

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 19, 2023
@qiulaidongfeng
Copy link
Member Author

qiulaidongfeng commented Sep 19, 2023 via email

@dmitshur dmitshur added this to the Backlog milestone Sep 19, 2023
qiulaidongfeng added a commit to qiulaidongfeng/go that referenced this issue Sep 20, 2023
Fixes golang#62719

Change-Id: I3fe2fde919f588fa553a2f849cd7b35cf7a5efbd
qiulaidongfeng added a commit to qiulaidongfeng/go that referenced this issue Sep 20, 2023
Fixes golang#62719

Change-Id: I3fe2fde919f588fa553a2f849cd7b35cf7a5efbd
qiulaidongfeng added a commit to qiulaidongfeng/go that referenced this issue Sep 20, 2023
Fixes golang#62719

Change-Id: I3fe2fde919f588fa553a2f849cd7b35cf7a5efbd
qiulaidongfeng added a commit to qiulaidongfeng/go that referenced this issue Sep 20, 2023
Fixes golang#62719

Change-Id: I3fe2fde919f588fa553a2f849cd7b35cf7a5efbd
qiulaidongfeng added a commit to qiulaidongfeng/go that referenced this issue Sep 20, 2023
Fixes golang#62719

Change-Id: I3fe2fde919f588fa553a2f849cd7b35cf7a5efbd
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/529735 mentions this issue: syscall: deathSignalParent use user uid and uid

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/529795 mentions this issue: syscall: skip TestDeathSignalSetuid if exec fails with a permission error

@mknyszek mknyszek moved this to In Progress in Go Compiler / Runtime Sep 20, 2023
@mknyszek mknyszek moved this from In Progress to All-But-Submitted in Go Compiler / Runtime Sep 20, 2023
@github-project-automation github-project-automation bot moved this from All-But-Submitted to Done in Go Compiler / Runtime Sep 20, 2023
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Sep 20, 2023
@dmitshur dmitshur modified the milestones: Backlog, Go1.22 Sep 20, 2023
@dmitshur dmitshur added the Testing An issue that has been verified to require only test changes, not just a test failure. label Sep 20, 2023
@golang golang locked and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge 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

Successfully merging a pull request may close this issue.

4 participants