Skip to content

"fatal error: casgstatus: bad incoming values" in runtime package #49513

Closed
@skyfireitdiy

Description

@skyfireitdiy

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

$ go version
go version go1.14.4 linux/amd64

Does this issue reproduce with the latest release?

I don't know, This problem has only appeared twice in our program this year.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/wangmaobin/go/bin"
GOCACHE="/home/wangmaobin/.cache/go-build"
GOENV="/home/wangmaobin/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/wangmaobin/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/home/wangmaobin/tools/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/wangmaobin/tools/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build367083870=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Nothing

What did you expect to see?

Stable operation of software

What did you see instead?

There was a fatal error: casgstatus: bad incoming values.

runtime: casgstatus: oldval=0x1 newval=0x2
fatal error: casgstatus: bad incoming values

runtime stack:
runtime.throw(0x107a53a, 0x1f)
        /home/itran_ci_master/workspace/compile_code/05/workspace/rum/go_src/base/go/src/runtime/panic.go:1116 +0x72
runtime.casgstatus.func1()
        /home/itran_ci_master/workspace/compile_code/05/workspace/rum/go_src/base/go/src/runtime/proc.go:776 +0xa7
runtime.casgstatus(0xc000302a80, 0x200000001)
        /home/itran_ci_master/workspace/compile_code/05/workspace/rum/go_src/base/go/src/runtime/proc.go:774 +0x4a
runtime.execute(0xc000302a80, 0xc000302a00)
        /home/itran_ci_master/workspace/compile_code/05/workspace/rum/go_src/base/go/src/runtime/proc.go:2053 +0x7d
runtime.schedule()
        /home/itran_ci_master/workspace/compile_code/05/workspace/rum/go_src/base/go/src/runtime/proc.go:2567 +0x1a5
runtime.park_m(0xc0003c6300)
        /home/itran_ci_master/workspace/compile_code/05/workspace/rum/go_src/base/go/src/runtime/proc.go:2696 +0x78
runtime.mcall(0x7f4dd49efd90)
        /home/itran_ci_master/workspace/compile_code/05/workspace/rum/go_src/base/go/src/runtime/asm_amd64.s:318 +0x5b

I reviewed the code and, based on the printed oldVal and newval, guessed that it should not be possible to enter this branch.
I wonder if there is any effective debugging for this kind of problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue 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