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

os/user: bad pointer in frame os/user.lookupUnixGid #57170

Closed
bcmills opened this issue Dec 8, 2022 · 3 comments
Closed

os/user: bad pointer in frame os/user.lookupUnixGid #57170

bcmills opened this issue Dec 8, 2022 · 3 comments
Assignees
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Dec 8, 2022

#!watchflakes
post <- `bad pointer in frame os/user.lookupUnixGid`

(extracted from #55167 (comment))

I believe this is related to the os/user allocation changes in CL 449335 and/or CL 449316. (CC @ianlancetaylor @rsc)

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 8, 2022
@bcmills bcmills added this to the Go1.20 milestone Dec 8, 2022
@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- `bad pointer in frame os/user.lookupUnixGid`
2022-12-08 03:49 linux-s390x-ibm go@b9747e0e os/user.TestLookupGroup (log)
runtime: bad pointer in frame os/user.lookupUnixGid at 0xc000104e00: 0x78
fatal error: invalid pointer found on stack

runtime stack:
runtime.throw({0x1767a6, 0x1e})
	/data/golang/workdir/go/src/runtime/panic.go:1047 +0x58 fp=0x3ffcf4fedf0 sp=0x3ffcf4fedc8 pc=0x50538
runtime.adjustpointers(0xc000104de8, 0x3ffcf4feee0, 0x3ffcf4ff2c0, {0x235b28, 0x2476e0})
	/data/golang/workdir/go/src/runtime/stack.go:632 +0x2b0 fp=0x3ffcf4fee50 sp=0x3ffcf4fedf0 pc=0x6cf00
runtime.adjustframe(0x3ffcf4ff1e8, 0x3ffcf4ff2c0)
	/data/golang/workdir/go/src/runtime/stack.go:674 +0x10e fp=0x3ffcf4fef00 sp=0x3ffcf4fee50 pc=0x6d01e
...
	/data/golang/workdir/go/src/os/user/cgo_lookup_unix.go:184 +0x66 fp=0xc000104da0 sp=0xc000104d40 pc=0x130866
os/user.lookupUnixGid(0x0)
	/data/golang/workdir/go/src/os/user/cgo_lookup_unix.go:120 +0x8c fp=0xc000104e58 sp=0xc000104da0 pc=0x13042c
os/user.lookupGroupId({0x177dee, 0x1})
	/data/golang/workdir/go/src/os/user/cgo_lookup_unix.go:113 +0x78 fp=0xc000104e88 sp=0xc000104e58 pc=0x130368
os/user.LookupGroupId(...)
	/data/golang/workdir/go/src/os/user/lookup.go:64
os/user.TestLookupGroup(0xc000083520)
	/data/golang/workdir/go/src/os/user/user_test.go:110 +0x120 fp=0xc000104f68 sp=0xc000104e88 pc=0x131e00
testing.tRunner(0xc000083520, 0x17be40)

watchflakes

@bcmills bcmills self-assigned this Dec 8, 2022
@gopherbot
Copy link

Change https://go.dev/cl/456121 mentions this issue: os/user: zero-initialize C structs returned to Go

@bcmills
Copy link
Contributor Author

bcmills commented Dec 8, 2022

Marking as release-blocker for Go 1.20 because it is a regression in Go 1.20 (CL 449335) and can cause crashes (or GC-related memory errors) in any cgo-enabled program that uses the os/user package.

@bcmills bcmills added release-blocker NeedsFix The path to resolution is known, but the work has not been done. labels Dec 8, 2022
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 8, 2022
@golang golang locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
Status: Done
Development

No branches or pull requests

2 participants