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 (*mheap).alloc via mallocgc #43843

Open
bcmills opened this issue Jan 22, 2021 · 4 comments
Open

runtime: SIGSEGV in (*mheap).alloc via mallocgc #43843

bcmills opened this issue Jan 22, 2021 · 4 comments

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Jan 22, 2021

2021-01-21T20:47:45-e2b4f1f/linux-mips64le-mengzhuo

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x120077080]

runtime stack:
runtime.throw(0x120686749, 0x2a)
	/tmp/farm/go/src/runtime/panic.go:1112 +0x6c
runtime.sigpanic()
	/tmp/farm/go/src/runtime/signal_unix.go:714 +0x3fc
runtime.(*mheap).alloc.func1()
	/tmp/farm/go/src/runtime/mheap.go:904 +0x8
runtime.systemstack(0x0)
	/tmp/farm/go/src/runtime/asm_mips64x.s:206 +0xa8
runtime.mstart()
	/tmp/farm/go/src/runtime/proc.go:1244

goroutine 1652 [running]:
runtime.systemstack_switch()
	/tmp/farm/go/src/runtime/asm_mips64x.s:158 +0x8 fp=0xc000052a80 sp=0xc000052a78 pc=0x12007ea10
runtime.(*mheap).alloc(0x120a14ea0, 0x1, 0x12000010b, 0x12001deac)
	/tmp/farm/go/src/runtime/mheap.go:904 +0x80 fp=0xc000052ac8 sp=0xc000052a80 pc=0x120030ce8
runtime.(*mcentral).grow(0x120a25918, 0x0)
	/tmp/farm/go/src/runtime/mcentral.go:232 +0xac fp=0xc000052b08 sp=0xc000052ac8 pc=0x12001e2a4
runtime.(*mcentral).cacheSpan(0x120a25918, 0x0)
	/tmp/farm/go/src/runtime/mcentral.go:158 +0x424 fp=0xc000052b68 sp=0xc000052b08 pc=0x12001dfcc
runtime.(*mcache).refill(0x7ffff23e45b8, 0xb)
	/tmp/farm/go/src/runtime/mcache.go:162 +0x10c fp=0xc000052bc0 sp=0xc000052b68 pc=0x12001d0e4
runtime.(*mcache).nextFree(0x7ffff23e45b8, 0xb, 0x120010a20, 0x1203979d0, 0x1205d78a0)
	/tmp/farm/go/src/runtime/malloc.go:882 +0xb0 fp=0xc000052bf8 sp=0xc000052bc0 pc=0x1200101d0
runtime.mallocgc(0x25, 0x0, 0xc000073f00, 0xc0005a2780)
	/tmp/farm/go/src/runtime/malloc.go:1069 +0x8c0 fp=0xc000052ca8 sp=0xc000052bf8 pc=0x120010c90
runtime.rawstring(0x25, 0x0, 0x0, 0x0, 0x0, 0x0)
	/tmp/farm/go/src/runtime/string.go:263 +0x58 fp=0xc000052cd0 sp=0xc000052ca8 pc=0x1200653b0
runtime.rawstringtmp(0x0, 0x25, 0xc000073f40, 0xc00003b660, 0xffffffffffffffff, 0xc00003b670, 0xffffffffffffffff)
	/tmp/farm/go/src/runtime/string.go:131 +0x9c fp=0xc000052d08 sp=0xc000052cd0 pc=0x120064cd4
runtime.concatstrings(0x0, 0xc000052e98, 0x6, 0x6, 0xc00068e058, 0x120059ff4)
	/tmp/farm/go/src/runtime/string.go:50 +0xb8 fp=0xc000052d98 sp=0xc000052d08 pc=0x120064700
cmd/go/internal/work.(*Builder).Do.func2(0x120744fe8, 0xc0000a2000, 0xc0005f0140)
	/tmp/farm/go/src/cmd/go/internal/work/exec.go:129 +0x464 fp=0xc000052f08 sp=0xc000052d98 pc=0x1205193e4
cmd/go/internal/work.(*Builder).Do.func3(0xc0002f2030, 0xc0006fbd60, 0xc0004f9a00, 0xc000487f98)
	/tmp/farm/go/src/cmd/go/internal/work/exec.go:198 +0xb4 fp=0xc000052fb8 sp=0xc000052f08 pc=0x1205196f4
runtime.goexit()
	/tmp/farm/go/src/runtime/asm_mips64x.s:631 +0x4 fp=0xc000052fb8 sp=0xc000052fb8 pc=0x120080f5c
created by cmd/go/internal/work.(*Builder).Do
	/tmp/farm/go/src/cmd/go/internal/work/exec.go:184 +0x420

2020-12-04T16:16:41-6607ba8/openbsd-386-64
2020-12-04T05:15:55-214da9f/openbsd-386-64
2020-12-02T20:03:35-bef1c47/openbsd-386-64
2020-11-19T13:27:11-4783bc9/openbsd-386-64
2020-11-16T00:27:33-ac45abd/openbsd-386-64
2020-11-12T18:51:08-eeaa07d/openbsd-386-64
2020-05-13T12:28:04-866d71a/openbsd-386-64
2020-04-27T16:39:59-9ea0146/openbsd-386-64
2020-04-21T04:27:24-cfa8b22/openbsd-386-64
2020-04-16T04:05:44-1839561/openbsd-386-64
2020-04-14T20:27:33-3bb7580/openbsd-386-64
2020-04-14T18:42:46-9129589/openbsd-386-64
2020-04-14T03:22:29-332987a/openbsd-386-64

CC @aclements @mknyszek @prattmic

@bcmills bcmills added this to the Backlog milestone Jan 22, 2021
@mknyszek
Copy link
Contributor

@mknyszek mknyszek commented Jan 22, 2021

...huh. What's crashing here is systemstack, I think? I don't think it's usually supposed to be passed a nil pointer... the function is known statically.

I suspect memory corruption.

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Jan 22, 2021

I suspect memory corruption.

Probably. It could be some issue on that machine, see the late few comments on #42229.

The OpenBSD failures look different.

@mknyszek
Copy link
Contributor

@mknyszek mknyszek commented Jan 22, 2021

I agree, the OpenBSD failures look different, and seem to be in mspan.init which is strange. I'll take a look into that in a bit.

@jrick
Copy link
Contributor

@jrick jrick commented Jan 24, 2021

OpenBSD failures look like #34988 (note that each the traces include calls to os/exec.Cmd.Start).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants