Skip to content

os/user: Current() crashes on arm64 with sigabrt signal arrived during cgo execution #72946

Closed as not planned
@zhaoya881010

Description

@zhaoya881010

Go version

go version 1.23.1 arm64

Output of go env in your module/workspace:

go version 1.23.1 arm64

What did you do?

linux centos7,arm64 use not root user,user.Current() crash

What did you see happen?

unmap_chunk(): invalid pointer
SIGABRT: abort
PC=0xfffd563a6560 m=3 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 70 gp=0x4000104a80 m=3 mp=0x40000b8e08 [syscall]:
runtime.cgocall(0x1c28d80, 0x4001022908)
/root/go1.23.1/src/runtime/cgocall.go:167 +0x44 fp=0x40010228d0 sp=0x4001022890 pc=0x474134
os/user._Cfunc_mygetpwuid_r(0x3ed, 0x4000ca2400, 0x400, 0x4000efe230, 0x4000efe234)
_cgo_gotypes.go:163 +0x3c fp=0x4001022900 sp=0x40010228d0 pc=0xbb2cec
os/user._C_getpwuid_r(0x3ed, 0x4000ca2400, 0x400)
/root/go1.23.1/src/os/user/cgo_lookup_cgo.go:91 +0x7c fp=0x40010229b0 sp=0x4001022900 pc=0xbb2e5c
os/user.lookupUnixUid.func1({0x4000ca2400?, 0x474ea8?, 0xc?})
/root/go1.23.1/src/os/user/cgo_lookup_unix.go:57 +0x4c fp=0x4001022a60 sp=0x40010229b0 pc=0xbb273c
os/user.retryWithBuffer(0x10?, 0x4001022b58)
/root/go1.23.1/src/os/user/cgo_lookup_unix.go:171 +0x6c fp=0x4001022ac0 sp=0x4001022a60 pc=0xbb2aac
os/user.lookupUnixUid(0x3ed)
/root/go1.23.1/src/os/user/cgo_lookup_unix.go:55 +0x64 fp=0x4001022b80 sp=0x4001022ac0 pc=0xbb25e4
os/user.current()
/root/go1.23.1/src/os/user/cgo_lookup_unix.go:19 +0x34 fp=0x4001022bc0 sp=0x4001022b80 pc=0xbb2564
os/user.Current.func1()
/root/go1.23.1/src/os/user/lookup.go:22 +0x1c fp=0x4001022bd0 sp=0x4001022bc0 pc=0xbb2efc
sync.(*Once).doSlow(0x0?, 0x0?)
/root/go1.23.1/src/sync/once.go:76 +0xf8 fp=0x4001022c30 sp=0x4001022bd0 pc=0x49ce18
sync.(*Once).Do(...)
/root/go1.23.1/src/sync/once.go:67
os/user.Current()

What did you expect to see?

i think this is bug,x86 is ok

Metadata

Metadata

Assignees

No one assigned

    Labels

    WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions