Skip to content

panic: JSON decoder out of sync - data changing underfoot? #32563

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
goith opened this issue Jun 12, 2019 · 3 comments
Closed

panic: JSON decoder out of sync - data changing underfoot? #32563

goith opened this issue Jun 12, 2019 · 3 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@goith
Copy link

goith commented Jun 12, 2019

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

$ go version
go version go1.12.4 linux/amd64

Does this issue reproduce with the latest release?

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/odin/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/search/odin/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
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="-std=gnu99 -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build032790095=/tmp/go-build -gno-record-gcc-switches"

What did you do?

json.Unmarshal

What did you expect to see?

What did you see instead?

panic: JSON decoder out of sync - data changing underfoot?

goroutine 3385386 [running]:
encoding/json.(*decodeState).object(0xc005e00640, 0x78df00, 0xc00dc5b2a0, 0x196, 0xc005e00668, 0xc00674537b)
        /usr/local/go/src/encoding/json/decode.go:681 +0x2485
encoding/json.(*decodeState).value(0xc005e00640, 0x78df00, 0xc00dc5b2a0, 0x196, 0x78df00, 0xc00dc5b2a0)
        /usr/local/go/src/encoding/json/decode.go:381 +0x6e
encoding/json.(*decodeState).array(0xc005e00640, 0x7912a0, 0xc000d23b10, 0x197, 0xc005e00668, 0x5b)
        /usr/local/go/src/encoding/json/decode.go:560 +0x1a9
encoding/json.(*decodeState).value(0xc005e00640, 0x7912a0, 0xc000d23b10, 0x197, 0x7912a0, 0xc000d23b10)
        /usr/local/go/src/encoding/json/decode.go:371 +0xff
encoding/json.(*decodeState).object(0xc005e00640, 0x78dd80, 0xc00d111028, 0x196, 0xc005e00668, 0x7b)
        /usr/local/go/src/encoding/json/decode.go:763 +0x18bc
encoding/json.(*decodeState).value(0xc005e00640, 0x78dd80, 0xc00d111028, 0x196, 0x78dd80, 0xc00d111028)
        /usr/local/go/src/encoding/json/decode.go:381 +0x6e
encoding/json.(*decodeState).object(0xc005e00640, 0x78de40, 0xc00d111020, 0x16, 0xc005e00668, 0x7b)
        /usr/local/go/src/encoding/json/decode.go:763 +0x18bc
encoding/json.(*decodeState).value(0xc005e00640, 0x78de40, 0xc00d111020, 0x16, 0xc006745ba0, 0x6a5ee9)
        /usr/local/go/src/encoding/json/decode.go:381 +0x6e
encoding/json.(*decodeState).unmarshal(0xc005e00640, 0x78de40, 0xc00d111020, 0xc005e00668, 0x0)
        /usr/local/go/src/encoding/json/decode.go:179 +0x209
encoding/json.Unmarshal(0xc008a82000, 0xb9d, 0x1000, 0x78de40, 0xc00d111020, 0x1000, 0x0)
        /usr/local/go/src/encoding/json/decode.go:106 +0x123
@agnivade
Copy link
Contributor

Please fill the entire issue template, mentioning the exact steps needed to reproduce the problem. Ensure that you are not changing the data while the unmarshaling is happening.

@agnivade agnivade added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jun 12, 2019
@dsnet
Copy link
Member

dsnet commented Jun 12, 2019

Have you tried build the binary with the race detector enabled? See https://golang.org/doc/articles/race_detector.html

@goith
Copy link
Author

goith commented Jun 12, 2019

ok, thanks. i will check it.

@goith goith closed this as completed Jun 12, 2019
@golang golang locked and limited conversation to collaborators Jun 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants