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: bad use of bucket.mp crash #31380

Closed
rename2 opened this Issue Apr 10, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@rename2
Copy link

rename2 commented Apr 10, 2019

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

go1.11.5 linux/amd64
(compile to linux/386)

Does this issue reproduce with the latest release?

Don't know. Have not upgrade to latest release.

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/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="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build342362144=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Developing a program that periodically executing scripts to monitor system status.

What did you expect to see?

No crashes.

What did you see instead?

Random crashes.

fatal error: bad use of bucket.mp

goroutine 83 [running]:
runtime.throw(0x866a21b, 0x14)
	/usr/local/go/src/runtime/panic.go:608 +0x6a fp=0xab0fda4 sp=0xab0fd90 pc=0x806fc4a
runtime.(*bucket).mp(0xe6fa16c8, 0xe74d8fd8)
	/usr/local/go/src/runtime/mprof.go:189 +0x46 fp=0xab0fdb0 sp=0xab0fda4 pc=0x80699e6
runtime.mProf_FlushLocked()
	/usr/local/go/src/runtime/mprof.go:308 +0x37 fp=0xab0fdc4 sp=0xab0fdb0 pc=0x8069e67
runtime.mProf_Flush()
	/usr/local/go/src/runtime/mprof.go:299 +0x45 fp=0xab0fdcc sp=0xab0fdc4 pc=0x8069e15
runtime.gcMarkTermination(0xe06b6471, 0x3fe7e074)
	/usr/local/go/src/runtime/mgc.go:1649 +0x6e8 fp=0xab0ff7c sp=0xab0fdcc pc=0x805eea8
runtime.gcMarkDone()
	/usr/local/go/src/runtime/mgc.go:1510 +0x213 fp=0xab0ff9c sp=0xab0ff7c pc=0x805e773
runtime.gcBgMarkWorker(0xa836c00)
	/usr/local/go/src/runtime/mgc.go:1909 +0x2a1 fp=0xab0ffe8 sp=0xab0ff9c pc=0x805f981
runtime.goexit()
	/usr/local/go/src/runtime/asm_386.s:1324 +0x1 fp=0xab0ffec sp=0xab0ffe8 pc=0x809a201
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1720 +0x61
@ALTree

This comment has been minimized.

Copy link
Member

ALTree commented Apr 10, 2019

Thanks for the report.

This will be hard to debug unless you provide a reproducer.

Usual questions:

  • Does your program use cgo?
  • Does the race detector barks if you run your program with the -race flag (i.e. go run -flag main.go)?

@ALTree ALTree changed the title bad use of bucket.mp runtime: bad use of bucket.mp crash Apr 10, 2019

@ALTree

This comment has been minimized.

Copy link
Member

ALTree commented Apr 17, 2019

Closing here, see my comment at #31379 (comment) (OP's code contains data races).

@ALTree ALTree closed this Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.