-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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: mcall called on m->g0 stack #56774
Comments
@grant-singleton-nz can you please update the title of this issue to be more descriptive? |
Does this crash on running |
Does this crash on running go build ?
Do other go programs crash?Yes, I think every go program I've tried does this. Its not always the same stack dump either, and sometimes it'll run as expected. Sounds like stack corruption? I can post more stack dumps if that will help. What can you tell us about the OS?OS is Windows Server 2019. Its a VM and the hypervisor is Bhyve, host OS is SmartOS |
I've discovered a little bit more information - don't know if it'll be useful We have seven host machines with SmartOS running various VMs and this issue only occurs on the ones that have AMD Epyc 7543 CPUs. This is the CPUs we have got and the problem doesn't occur on the Intels or the 7542s 2x AMD EPYC 7543 32-Core |
Is it reproducible on a physical Windows machine? From the stack trace it looks to me something is wrong with thread local storage. I wonder if the VM handles it correctly? I'm not sure this is the right place to look of if it is up-to-date, but https://wiki.freebsd.org/bhyve/Windows mentions
It doesn't include Windows Server 2019. So maybe Windows Server 2019 is not well supported? Thanks. |
I've never seen this happen on a physical machine - but we only have windows 10 on physical machines, the windows server instances are all VMs. We also don't have any windows 10 VMs running on SmartOS/bhyve. I done some more testing and it does happen on the AMD 7542's just not as frequently. So this is looking like something to do with SmartOS and/or bhyve with a windows VM on an AMD processor I've raised a ticket with the SmartOS people https://smartos.topicbox.com/groups/smartos-discuss/T6938eca11dfeb1e3/golang-executables-crash-in-windows-vms-on-amd, will see what they say |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Seems this is resolved in 1.21.3. Today I tried 1.18.10 and the problem exists there. Then I upgraded to 1.21.3 and its working perfectly. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
1.19.3 is the latest release
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Cloned https://github.com/go-training/helloworld.git then
go run main.go
What did you expect to see?
Hello World!!
What did you see instead?
C:\helloworld>go run main.go
fatal error: runtime: mcall called on m->g0 stack
runtime stack:
runtime.throw({0x147d50a?, 0x160?})
c:/go/src/runtime/panic.go:1047 +0x65 fp=0xc000115a08 sp=0xc0001159d8 pc=0x12d68c5
runtime.badmcall(0x15eb710b4f8?)
c:/go/src/runtime/proc.go:468 +0x25 fp=0xc000115a28 sp=0xc000115a08 pc=0x12d9b45
runtime.badmcall(0x160)
:1 +0x2c fp=0xc000115a40 sp=0xc000115a28 pc=0x1302bcc
runtime.asyncPreempt2()
c:/go/src/runtime/preempt.go:308 +0x3f fp=0xc000115a60 sp=0xc000115a40 pc=0x12d7aff
runtime.asyncPreempt()
c:/go/src/runtime/preempt_amd64.s:50 +0xdb fp=0xc000115be8 sp=0xc000115a60 pc=0x1301f9b
cmd/internal/obj/arm.init()
c:/go/src/cmd/internal/obj/arm/a.out.go:113 fp=0xc000115bf0 sp=0xc000115be8 pc=0x13850c0
runtime.doInit(0x15a31a0)
c:/go/src/runtime/proc.go:6329 +0x12d fp=0xc000115d20 sp=0xc000115bf0 pc=0x12e5b6d
runtime.doInit(0x15a3960)
c:/go/src/runtime/proc.go:6306 +0x71 fp=0xc000115e50 sp=0xc000115d20 pc=0x12e5ab1
runtime.doInit(0x15a37a0)
c:/go/src/runtime/proc.go:6306 +0x71 fp=0xc000115f80 sp=0xc000115e50 pc=0x12e5ab1
runtime.main()
c:/go/src/runtime/proc.go:233 +0x1bf fp=0xc000115fe0 sp=0xc000115f80 pc=0x12d8fbf
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000115fe8 sp=0xc000115fe0 pc=0x13009a1
goroutine 1 [runnable, locked to thread]:
cmd/internal/obj/arm.init()
c:/go/src/cmd/internal/obj/arm/a.out.go:113 +0x11e fp=0xc000115bf0 sp=0xc000115be8 pc=0x13851de
runtime.doInit(0x15a31a0)
c:/go/src/runtime/proc.go:6329 +0x12d fp=0xc000115d20 sp=0xc000115bf0 pc=0x12e5b6d
runtime.doInit(0x15a3960)
c:/go/src/runtime/proc.go:6306 +0x71 fp=0xc000115e50 sp=0xc000115d20 pc=0x12e5ab1
runtime.doInit(0x15a37a0)
c:/go/src/runtime/proc.go:6306 +0x71 fp=0xc000115f80 sp=0xc000115e50 pc=0x12e5ab1
runtime.main()
c:/go/src/runtime/proc.go:233 +0x1bf fp=0xc000115fe0 sp=0xc000115f80 pc=0x12d8fbf
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000115fe8 sp=0xc000115fe0 pc=0x13009a1
goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
c:/go/src/runtime/proc.go:363 +0xd6 fp=0xc000053fb0 sp=0xc000053f90 pc=0x12d9396
runtime.goparkunlock(...)
c:/go/src/runtime/proc.go:369
runtime.forcegchelper()
c:/go/src/runtime/proc.go:302 +0xb1 fp=0xc000053fe0 sp=0xc000053fb0 pc=0x12d9231
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000053fe8 sp=0xc000053fe0 pc=0x13009a1
created by runtime.init.6
c:/go/src/runtime/proc.go:290 +0x25
goroutine 3 [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
c:/go/src/runtime/proc.go:363 +0xd6 fp=0xc000055f90 sp=0xc000055f70 pc=0x12d9396
runtime.goparkunlock(...)
c:/go/src/runtime/proc.go:369
runtime.bgsweep(0x0?)
c:/go/src/runtime/mgcsweep.go:278 +0x8e fp=0xc000055fc8 sp=0xc000055f90 pc=0x12c3fce
runtime.gcenable.func1()
c:/go/src/runtime/mgc.go:178 +0x26 fp=0xc000055fe0 sp=0xc000055fc8 pc=0x12b8d66
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000055fe8 sp=0xc000055fe0 pc=0x13009a1
created by runtime.gcenable
c:/go/src/runtime/mgc.go:178 +0x6b
goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc00001c070?, 0x14c1488?, 0x1?, 0x0?, 0x0?)
c:/go/src/runtime/proc.go:363 +0xd6 fp=0xc000063f70 sp=0xc000063f50 pc=0x12d9396
runtime.goparkunlock(...)
c:/go/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x15fade0)
c:/go/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc000063fa0 sp=0xc000063f70 pc=0x12c2053
runtime.bgscavenge(0x0?)
c:/go/src/runtime/mgcscavenge.go:617 +0x45 fp=0xc000063fc8 sp=0xc000063fa0 pc=0x12c2645
runtime.gcenable.func2()
c:/go/src/runtime/mgc.go:179 +0x26 fp=0xc000063fe0 sp=0xc000063fc8 pc=0x12b8d06
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000063fe8 sp=0xc000063fe0 pc=0x13009a1
created by runtime.gcenable
c:/go/src/runtime/mgc.go:179 +0xaa
goroutine 5 [finalizer wait]:
runtime.gopark(0x0?, 0x15a1578?, 0x8b?, 0x61?, 0xc000057f70?)
c:/go/src/runtime/proc.go:363 +0xd6 fp=0xc000057e28 sp=0xc000057e08 pc=0x12d9396
runtime.goparkunlock(...)
c:/go/src/runtime/proc.go:369
runtime.runfinq()
c:/go/src/runtime/mfinal.go:180 +0x10f fp=0xc000057fe0 sp=0xc000057e28 pc=0x12b7e6f
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000057fe8 sp=0xc000057fe0 pc=0x13009a1
created by runtime.createfing
c:/go/src/runtime/mfinal.go:157 +0x45
go: error obtaining buildID for go tool asm: exit status 2
The text was updated successfully, but these errors were encountered: