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

runtime: SIGSEGV in mapaccess2_faststr #71994

Closed
whh32 opened this issue Feb 27, 2025 · 3 comments
Closed

runtime: SIGSEGV in mapaccess2_faststr #71994

whh32 opened this issue Feb 27, 2025 · 3 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. compiler/runtime Issues related to the Go compiler and/or runtime.

Comments

@whh32
Copy link

whh32 commented Feb 27, 2025

Go version

go1.24.0 linux_amd64

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE='on'
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN='/root/go_source/bin'
GOCACHE='/root/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4089494877=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE='/root/go_source/pkg/mod'
GOOS='linux'
GOPATH='/root/go_source'
GOPROXY='https://goproxy.cn,direct'
GOROOT='/root/tools/go1.24.0'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/root/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/root/tools/go1.24.0/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.24.0'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

When using a single goroutine to call a map, a panic occurs when accessing the contents of the map

What did you see happen?

unexpected fault address 0x7f5571e74e6f
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0x7f5571e74e6f pc=0x4067d9]

goroutine 329 gp=0xc0009028c0 m=15 mp=0xc000481808 [running]:
runtime.throw({0x148d732?, 0x6e127487bfb8?})
/root/tools/go1.24.0/src/runtime/panic.go:1096 +0x48 fp=0xc5307ab1b0 sp=0xc5307ab180 pc=0x479ea8
runtime.sigpanic()
/root/tools/go1.24.0/src/runtime/signal_unix.go:939 +0x26c fp=0xc5307ab210 sp=0xc5307ab1b0 pc=0x47be2c
memeqbody()
/root/tools/go1.24.0/src/internal/bytealg/equal_amd64.s:115 +0xe9 fp=0xc5307ab218 sp=0xc5307ab210 pc=0x4067d9
runtime.mapaccess2_faststr(0x12e1860, 0xc82bd0bb30, {0xc004210420, 0x10})
/root/tools/go1.24.0/src/internal/runtime/maps/runtime_faststr_swiss.go:204 +0x215 fp=0xc5307ab298 sp=0xc5307ab218 pc=0x40c5f5

What did you expect to see?

Successfully returned data.

@prattmic
Copy link
Member

Can you provide a small reproducer or show what your code is doing? Just the panic isn’t sufficient to help.

@prattmic prattmic changed the title panic when use go1.24.0 map runtime: SIGSEGV in mapaccess2_faststr Feb 27, 2025
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 27, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Feb 27, 2025
@whh32
Copy link
Author

whh32 commented Feb 28, 2025

Sorry, I rechecked the program. The problem is our own making. Let me close this problem.

@whh32 whh32 closed this as completed Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

4 participants