profile
viewpoint

Ask questionsruntime: BenchmarkMSpanCountAlloc is failing

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

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

<pre> $ go version tip </pre>

Does this issue reproduce with the latest release?

yes

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

The issue occurs both on amd64/linux and arm64/linux.

BenchmarkMSpanCountAlloc/bits=1024-8      	fatal error: runtime: cannot allocate memory
goroutine 21015 [running]:
runtime.throw(0x271439, 0x1f)
	/home/root/ci-scripts/golang/src/runtime/panic.go:1116 +0x54 fp=0x400049e5c0 sp=0x400049e590 pc=0x451d4
runtime.recordspan(0x418bc0, 0xfff7c9333208)
	/home/root/ci-scripts/golang/src/runtime/mheap.go:506 +0x1b0 fp=0x400049e610 sp=0x400049e5c0 pc=0x36240
runtime.(*fixalloc).alloc(0x431630, 0x1fc)
	/home/root/ci-scripts/golang/src/runtime/mfixalloc.go:86 +0xec fp=0x400049e650 sp=0x400049e610 pc=0x2a55c
runtime.MSpanCountAlloc(0x400003a080, 0x80, 0x80, 0x1fc)
	/home/root/ci-scripts/golang/src/runtime/export_test.go:987 +0x2c fp=0x400049e670 sp=0x400049e650 pc=0x725ac
runtime_test.BenchmarkMSpanCountAlloc.func1(0x400014a480)
	/home/root/ci-scripts/golang/src/runtime/gc_test.go:777 +0xa8 fp=0x400049e6e0 sp=0x400049e670 pc=0x1c95b8
testing.(*B).runN(0x400014a480, 0x651943)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:191 +0xf0 fp=0x400049e750 sp=0x400049e6e0 pc=0xe52c0
testing.(*B).launch(0x400014a480)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:321 +0xcc fp=0x400049e7d0 sp=0x400049e750 pc=0xe583c
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x400049e7d0 sp=0x400049e7d0 pc=0x7cd44
created by testing.(*B).doBench
	/home/root/ci-scripts/golang/src/testing/benchmark.go:276 +0x48

goroutine 1 [chan receive, locked to thread]:
runtime.gopark(0x27a6c8, 0x40000245f8, 0x42170e, 0x2)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40000fd8f0 sp=0x40000fd8d0 pc=0x47ad0
runtime.chanrecv(0x40000245a0, 0x0, 0x4000000101, 0xe53e8)
	/home/root/ci-scripts/golang/src/runtime/chan.go:571 +0x2d0 fp=0x40000fd980 sp=0x40000fd8f0 pc=0x17a20
runtime.chanrecv1(0x40000245a0, 0x0)
	/home/root/ci-scripts/golang/src/runtime/chan.go:438 +0x28 fp=0x40000fd9b0 sp=0x40000fd980 pc=0x176f8
testing.(*B).run1(0x400014a240, 0x400014a240)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:233 +0x7c fp=0x40000fda70 sp=0x40000fd9b0 pc=0xe53fc
testing.(*B).Run(0x400014a000, 0x26d4e9, 0x18, 0x27b1c0, 0xbfcf97d55b30aa00)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:656 +0x2e0 fp=0x40000fdb60 sp=0x40000fda70 pc=0xe75b0
testing.runBenchmarks.func1(0x400014a000)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:533 +0x74 fp=0x40000fdbb0 sp=0x40000fdb60 pc=0xf0c74
testing.(*B).runN(0x400014a000, 0x1)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:191 +0xf0 fp=0x40000fdc20 sp=0x40000fdbb0 pc=0xe52c0
testing.runBenchmarks(0x264e5c, 0x7, 0x400011c000, 0x3fcca0, 0xf4, 0xf4, 0x4019c0)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:542 +0x35c fp=0x40000fdd30 sp=0x40000fdc20 pc=0xe684c
testing.(*M).Run(0x40000f4000, 0x0)
	/home/root/ci-scripts/golang/src/testing/testing.go:1387 +0x430 fp=0x40000fde60 sp=0x40000fdd30 pc=0xee5d0
runtime_test.TestMain(0x40000f4000)
	/home/root/ci-scripts/golang/src/runtime/crash_test.go:28 +0x28 fp=0x40000fdeb0 sp=0x40000fde60 pc=0x16a0a8
main.main()
	_testmain.go:1217 +0x160 fp=0x40000fdf70 sp=0x40000fdeb0 pc=0x1e26f0
runtime.main()
	/home/root/ci-scripts/golang/src/runtime/proc.go:205 +0x20c fp=0x40000fdfd0 sp=0x40000fdf70 pc=0x476fc
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40000fdfd0 sp=0x40000fdfd0 pc=0x7cd44

goroutine 2 [force gc (idle), 9 minutes]:
runtime.gopark(0x27a9d0, 0x401140, 0x1411, 0x1)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x4000094fa0 sp=0x4000094f80 pc=0x47ad0
runtime.goparkunlock(...)
	/home/root/ci-scripts/golang/src/runtime/proc.go:313
runtime.forcegchelper()
	/home/root/ci-scripts/golang/src/runtime/proc.go:256 +0xc4 fp=0x4000094fd0 sp=0x4000094fa0 pc=0x47984
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x4000094fd0 sp=0x4000094fd0 pc=0x7cd44
created by runtime.init.5
	/home/root/ci-scripts/golang/src/runtime/proc.go:244 +0x30

goroutine 3 [GC sweep wait]:
runtime.gopark(0x27a9d0, 0x401540, 0x140c, 0x1)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40000957a0 sp=0x4000095780 pc=0x47ad0
runtime.goparkunlock(...)
	/home/root/ci-scripts/golang/src/runtime/proc.go:313
runtime.bgsweep(0x400001e460)
	/home/root/ci-scripts/golang/src/runtime/mgcsweep.go:180 +0x190 fp=0x40000957d0 sp=0x40000957a0 pc=0x33e00
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40000957d0 sp=0x40000957d0 pc=0x7cd44
created by runtime.gcenable
	/home/root/ci-scripts/golang/src/runtime/mgc.go:217 +0x54

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x27a9d0, 0x4016c0, 0x140d, 0x1)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x4000095f70 sp=0x4000095f50 pc=0x47ad0
runtime.goparkunlock(...)
	/home/root/ci-scripts/golang/src/runtime/proc.go:313
runtime.bgscavenge(0x400001e460)
	/home/root/ci-scripts/golang/src/runtime/mgcscavenge.go:314 +0x270 fp=0x4000095fd0 sp=0x4000095f70 pc=0x32360
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x4000095fd0 sp=0x4000095fd0 pc=0x7cd44
created by runtime.gcenable
	/home/root/ci-scripts/golang/src/runtime/mgc.go:218 +0x74

goroutine 5 [finalizer wait, 9 minutes]:
runtime.gopark(0x27a9d0, 0x431930, 0x1410, 0x1)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x4000094730 sp=0x4000094710 pc=0x47ad0
runtime.goparkunlock(...)
	/home/root/ci-scripts/golang/src/runtime/proc.go:313
runtime.runfinq()
	/home/root/ci-scripts/golang/src/runtime/mfinal.go:175 +0xc0 fp=0x40000947d0 sp=0x4000094730 pc=0x299d0
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40000947d0 sp=0x40000947d0 pc=0x7cd44
created by runtime.createfing
	/home/root/ci-scripts/golang/src/runtime/mfinal.go:156 +0x78

goroutine 20583 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x4000202000, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40004d2750 sp=0x40004d2730 pc=0x47ad0
runtime.gcBgMarkWorker(0x4000081000)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40004d27d0 sp=0x40004d2750 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40004d27d0 sp=0x40004d27d0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20955 [chan receive]:
runtime.gopark(0x27a6c8, 0x40000246b8, 0x40000a170e, 0x2)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40000a7b20 sp=0x40000a7b00 pc=0x47ad0
runtime.chanrecv(0x4000024660, 0x0, 0x40001aa301, 0xe5718)
	/home/root/ci-scripts/golang/src/runtime/chan.go:571 +0x2d0 fp=0x40000a7bb0 sp=0x40000a7b20 pc=0x17a20
runtime.chanrecv1(0x4000024660, 0x0)
	/home/root/ci-scripts/golang/src/runtime/chan.go:438 +0x28 fp=0x40000a7be0 sp=0x40000a7bb0 pc=0x176f8
testing.(*B).doBench(0x400014a480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:277 +0x5c fp=0x40000a7c10 sp=0x40000a7be0 pc=0xe572c
testing.(*benchContext).processBench(0x400011c040, 0x400014a480)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:572 +0x1b8 fp=0x40000a7d30 sp=0x40000a7c10 pc=0xe6d08
testing.(*B).run(0x400014a480)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:268 +0x58 fp=0x40000a7d90 sp=0x40000a7d30 pc=0xe5688
testing.(*B).Run(0x400014a240, 0x4000016180, 0x9, 0x400010e020, 0x0)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:657 +0x368 fp=0x40000a7e80 sp=0x40000a7d90 pc=0xe7638
runtime_test.BenchmarkMSpanCountAlloc(0x400014a240)
	/home/root/ci-scripts/golang/src/runtime/gc_test.go:770 +0x90 fp=0x40000a7f20 sp=0x40000a7e80 pc=0x179330
testing.(*B).runN(0x400014a240, 0x1)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:191 +0xf0 fp=0x40000a7f90 sp=0x40000a7f20 pc=0xe52c0
testing.(*B).run1.func1(0x400014a240)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:231 +0x54 fp=0x40000a7fd0 sp=0x40000a7f90 pc=0xf0a04
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40000a7fd0 sp=0x40000a7fd0 pc=0x7cd44
created by testing.(*B).run1
	/home/root/ci-scripts/golang/src/testing/benchmark.go:224 +0x68

goroutine 20648 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x4000016120, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40007f4750 sp=0x40007f4730 pc=0x47ad0
runtime.gcBgMarkWorker(0x4000088800)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40007f47d0 sp=0x40007f4750 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40007f47d0 sp=0x40007f47d0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20585 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0040, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40004cef50 sp=0x40004cef30 pc=0x47ad0
runtime.gcBgMarkWorker(0x4000083800)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40004cefd0 sp=0x40004cef50 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40004cefd0 sp=0x40004cefd0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 4517 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x4000202010, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40001bd750 sp=0x40001bd730 pc=0x47ad0
runtime.gcBgMarkWorker(0x400008d800)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40001bd7d0 sp=0x40001bd750 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40001bd7d0 sp=0x40001bd7d0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20475 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0010, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40002b7750 sp=0x40002b7730 pc=0x47ad0
runtime.gcBgMarkWorker(0x400007e800)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40002b77d0 sp=0x40002b7750 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40002b77d0 sp=0x40002b77d0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20537 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0030, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x4000264f50 sp=0x4000264f30 pc=0x47ad0
runtime.gcBgMarkWorker(0x4000086000)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x4000264fd0 sp=0x4000264f50 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x4000264fd0 sp=0x4000264fd0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20706 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0000, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40004d1f50 sp=0x40004d1f30 pc=0x47ad0
runtime.gcBgMarkWorker(0x400007c000)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40004d1fd0 sp=0x40004d1f50 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40004d1fd0 sp=0x40004d1fd0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20507 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0020, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40007f3f50 sp=0x40007f3f30 pc=0x47ad0
runtime.gcBgMarkWorker(0x400008b000)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40007f3fd0 sp=0x40007f3f50 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40007f3fd0 sp=0x40007f3fd0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80
exit status 2
FAIL	runtime	567.042s
golang/go

Answer questions erifan

@cuonglm It is a bit random, not a steady failure. The version I use is 66e66e71132034aa620ffbae9008f951da0f9f27

useful!

Related questions

cmd/link: segmentation fault during mach-o linking hot 6
cmd/vet: potential false positive in the "suspect or" check hot 4
cmd/go: cannot find module providing package error stops `go get` processing hot 3
vendor/golang.org/x/xerrors/adaptor_go1_13.go:16:14: undefined: errors.Frame ... hot 2
cmd/cgo error: runtime: unknown pc 0x7fff5c805b86 hot 2
runtime: crash with "invalid pc-encoded table" hot 2
internal/poll: transparently support new linux io_uring interface hot 2
crypto/x509: 'certificate signed by unknown authority' on mipsle hot 2
x/tools/cmd/gopls: "build cache is required, but could not be located: GOCACHE is not defined and $HOME is not defined" hot 2
Plis fixit! Its not good!!! hot 2
cmd/go: needs a better error than "missing dot in first path element" when GOROOT is set incorrectly hot 2
encoding/json: invalid use of ,string struct tag, trying to unmarshal "" into int hot 2
Golang show warning after updating to 1.13 on OSX Catalina 10.15 hot 2
x/mobile: gomobile bind is failing with latest version [+cafc553] of gomobile hot 2
cmd/go: "found, but does not contain package" error refers to replaced version instead of its replacement hot 2
source:https://uonfu.com/
Github User Rank List