Skip to content

runtime: (on linux/mips64le) bad pointer in frame main.invoke at 0xc000091da8: 0x7 #75477

@tianon

Description

@tianon

Over in https://github.com/docker-library/golang we maintain builds of a weekly snapshot of tip across the various architectures supported by the program. Sometime in between our snapshot from two weeks ago (6a08e80) and last week (861c90c), we started seeing build failures on linux/mips64le (6a08e80...861c90c; build succeeds on 20250831 and fails on 20250906; I have not been able to reproduce this while cross-compiling, only natively):

+ export GOCACHE=/tmp/gocache GOHOSTOS=linux GOHOSTARCH=mips64le
+ cd /usr/local/go/src
+ ./make.bash
Building Go cmd/dist using /usr/local/goroot-bootstrap. (go1.25.1 linux/mips64le)
Building Go toolchain1 using /usr/local/goroot-bootstrap.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
runtime: bad pointer in frame main.invoke at 0xc00018bda8: 0x7
fatal error: invalid pointer found on stack

runtime stack:
runtime.throw({0x6b4e9b, 0x1e})
	/usr/local/go/src/runtime/panic.go:1227 +0x4c fp=0x7ffffbf1f208 sp=0x7ffffbf1f1e0 pc=0xb9f54
runtime.adjustpointers(0xc00018bce0, 0x7ffffbf1f2c0, 0x7ffffbf1f380, {0x9ff4b0, 0xa16840})
	/usr/local/go/src/runtime/stack.go:681 +0x288 fp=0x7ffffbf1f250 sp=0x7ffffbf1f208 pc=0x93f98
runtime.adjustframe(0x7ffffbf1f320, 0x7ffffbf1f380)
	/usr/local/go/src/runtime/stack.go:738 +0xe4 fp=0x7ffffbf1f2e0 sp=0x7ffffbf1f250 pc=0x94084
runtime.copystack(0xc0000021c0, 0x4000)
	/usr/local/go/src/runtime/stack.go:976 +0x364 fp=0x7ffffbf1f3c8 sp=0x7ffffbf1f2e0 pc=0x94874
runtime.newstack()
	/usr/local/go/src/runtime/stack.go:1168 +0x56c fp=0x7ffffbf1f4f8 sp=0x7ffffbf1f3c8 pc=0x94f8c
runtime.morestack()
	/usr/local/go/src/runtime/asm_mips64x.s:275 +0x78 fp=0x7ffffbf1f500 sp=0x7ffffbf1f4f8 pc=0xc1348

goroutine 1 gp=0xc0000021c0 m=0 mp=0xa49300 [copystack]:
cmd/vendor/golang.org/x/mod/modfile.(*File).add(0xc0001820d0, 0xc00018acb8, 0x0, 0xc0000b8280, {0xc0000a0500, 0x6}, {0xc0000ac690, 0x1, 0x1}, 0xc00018b370, ...)
	/usr/local/go/src/cmd/vendor/golang.org/x/mod/modfile/rule.go:339 +0x20 fp=0xc00018ac20 sp=0xc00018ac20 pc=0x2d36f8
cmd/vendor/golang.org/x/mod/modfile.parseToFile({0xc0000a6480, 0x23}, {0xc00009c400, 0x1a, 0x200}, 0xc00018b370, 0x1)
	/usr/local/go/src/cmd/vendor/golang.org/x/mod/modfile/rule.go:292 +0x228 fp=0xc00018ade8 sp=0xc00018ac20 pc=0x2d2c08
cmd/vendor/golang.org/x/mod/modfile.Parse(...)
	/usr/local/go/src/cmd/vendor/golang.org/x/mod/modfile/rule.go:255
cmd/go/internal/modload.ReadModFile({0xc0000a6480, 0x23}, 0xc00018b370)
	/usr/local/go/src/cmd/go/internal/modload/modfile.go:45 +0x194 fp=0xc00018af10 sp=0xc00018ade8 pc=0x3e14ec
cmd/go/internal/modload.loadModFile({0x78b418, 0xa66860}, 0xc0000ba200)
	/usr/local/go/src/cmd/go/internal/modload/init.go:961 +0xd1c fp=0xc00018b4a0 sp=0xc00018af10 pc=0x3c1d94
cmd/go/internal/modload.LoadPackages({0x78b418, 0xa66860}, {{0x0, 0x0}, 0x0, 0x0, 0x0, {0x0, 0x0}, 0x0, ...}, ...)
	/usr/local/go/src/cmd/go/internal/modload/load.go:367 +0x42c fp=0xc00018b7b8 sp=0xc00018b4a0 pc=0x3d18fc
cmd/go/internal/load.PackagesAndErrors({0x78b418, 0xa66860}, {0x0, 0x0, 0x0, 0x1, 0x0, 0x0}, {0xc00001e0b0, 0x5, ...})
	/usr/local/go/src/cmd/go/internal/load/pkg.go:2928 +0x364 fp=0xc00018bb20 sp=0xc00018b7b8 pc=0x4467c4
cmd/go/internal/work.runInstall({0x78b418, 0xa66860}, 0xa38160, {0xc00001e0b0, 0x5, 0x5})
	/usr/local/go/src/cmd/go/internal/work/build.go:699 +0x2d8 fp=0xc00018bbf0 sp=0xc00018bb20 pc=0x4c45c0
main.invoke(0xa38160, {0xc00001e090, 0x7, 0x7})
	/usr/local/go/src/cmd/go/main.go:341 +0x8a4 fp=0xc00018bdb0 sp=0xc00018bbf0 pc=0x5bdac4
main.main()
	/usr/local/go/src/cmd/go/main.go:220 +0xf84 fp=0xc00018bf60 sp=0xc00018bdb0 pc=0x5bc96c
runtime.main()
	/usr/local/go/src/runtime/proc.go:289 +0x3e8 fp=0xc00018bfd8 sp=0xc00018bf60 pc=0x6faf0
runtime.goexit({})
	/usr/local/go/src/runtime/asm_mips64x.s:664 +0x4 fp=0xc00018bfd8 sp=0xc00018bfd8 pc=0xc3214

goroutine 2 gp=0xc000002700 m=nil [force gc (idle)]:
runtime.gopark(0x6f03a0, 0xa46060, 0x11, 0xa, 0x1)
	/usr/local/go/src/runtime/proc.go:464 +0x140 fp=0xc00004afa8 sp=0xc00004af90 pc=0xba100
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:470
runtime.forcegchelper()
	/usr/local/go/src/runtime/proc.go:377 +0x13c fp=0xc00004afd8 sp=0xc00004afa8 pc=0x7000c
runtime.goexit({})
	/usr/local/go/src/runtime/asm_mips64x.s:664 +0x4 fp=0xc00004afd8 sp=0xc00004afd8 pc=0xc3214
created by runtime.init.6 in goroutine 1
	/usr/local/go/src/runtime/proc.go:365 +0x48

goroutine 3 gp=0xc000002c40 m=nil [GC sweep wait]:
runtime.gopark(0x6f03a0, 0xa463c0, 0xc, 0x9, 0x1)
	/usr/local/go/src/runtime/proc.go:464 +0x140 fp=0xc00004b788 sp=0xc00004b770 pc=0xba100
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:470
runtime.bgsweep(0xc00006a000)
	/usr/local/go/src/runtime/mgcsweep.go:279 +0x108 fp=0xc00004b7c8 sp=0xc00004b788 pc=0x53388
runtime.gcenable.gowrap1()
	/usr/local/go/src/runtime/mgc.go:212 +0x40 fp=0xc00004b7d8 sp=0xc00004b7c8 pc=0x41a60
runtime.goexit({})
	/usr/local/go/src/runtime/asm_mips64x.s:664 +0x4 fp=0xc00004b7d8 sp=0xc00004b7d8 pc=0xc3214
created by runtime.gcenable in goroutine 1
	/usr/local/go/src/runtime/mgc.go:212 +0xc4

goroutine 4 gp=0xc000002e00 m=nil [GC scavenge wait]:
runtime.gopark(0x6f03a0, 0xa47200, 0xd, 0xa, 0x2)
	/usr/local/go/src/runtime/proc.go:464 +0x140 fp=0xc00004bf80 sp=0xc00004bf68 pc=0xba100
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:470
runtime.(*scavengerState).park(0xa47200)
	/usr/local/go/src/runtime/mgcscavenge.go:425 +0x9c fp=0xc00004bfa8 sp=0xc00004bf80 pc=0x4ffc4
runtime.bgscavenge(0xc00006a000)
	/usr/local/go/src/runtime/mgcscavenge.go:653 +0x80 fp=0xc00004bfc8 sp=0xc00004bfa8 pc=0x50700
runtime.gcenable.gowrap2()
	/usr/local/go/src/runtime/mgc.go:213 +0x40 fp=0xc00004bfd8 sp=0xc00004bfc8 pc=0x41a10
runtime.goexit({})
	/usr/local/go/src/runtime/asm_mips64x.s:664 +0x4 fp=0xc00004bfd8 sp=0xc00004bfd8 pc=0xc3214
created by runtime.gcenable in goroutine 1
	/usr/local/go/src/runtime/mgc.go:213 +0x130

goroutine 5 gp=0xc0000036c0 m=nil [GOMAXPROCS updater (idle)]:
runtime.gopark(0x6f03a0, 0xa45fc0, 0x12, 0xa, 0x1)
	/usr/local/go/src/runtime/proc.go:464 +0x140 fp=0xc00004c780 sp=0xc00004c768 pc=0xba100
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:470
runtime.updateMaxProcsGoroutine()
	/usr/local/go/src/runtime/proc.go:6686 +0x1a4 fp=0xc00004c7d8 sp=0xc00004c780 pc=0x84d54
runtime.goexit({})
	/usr/local/go/src/runtime/asm_mips64x.s:664 +0x4 fp=0xc00004c7d8 sp=0xc00004c7d8 pc=0xc3214
created by runtime.defaultGOMAXPROCSUpdateEnable in goroutine 1
	/usr/local/go/src/runtime/proc.go:6674 +0x8c

goroutine 6 gp=0xc000003880 m=nil [finalizer wait]:
runtime.gopark(0x6f00b0, 0xa66a40, 0x10, 0xa, 0x1)
	/usr/local/go/src/runtime/proc.go:464 +0x140 fp=0xc00004a728 sp=0xc00004a710 pc=0xba100
runtime.runFinalizers()
	/usr/local/go/src/runtime/mfinal.go:210 +0x194 fp=0xc00004a7d8 sp=0xc00004a728 pc=0x403cc
runtime.goexit({})
	/usr/local/go/src/runtime/asm_mips64x.s:664 +0x4 fp=0xc00004a7d8 sp=0xc00004a7d8 pc=0xc3214
created by runtime.createfing in goroutine 1
	/usr/local/go/src/runtime/mfinal.go:172 +0xa8

goroutine 17 gp=0xc000082380 m=nil [runnable]:
runtime.runCleanups()
	/usr/local/go/src/runtime/mcleanup.go:633 fp=0xc0000467d8 sp=0xc0000467d8 pc=0x3b688
runtime.goexit({})
	/usr/local/go/src/runtime/asm_mips64x.s:664 +0x4 fp=0xc0000467d8 sp=0xc0000467d8 pc=0xc3214
created by runtime.(*cleanupQueue).createGs in goroutine 1
	/usr/local/go/src/runtime/mcleanup.go:589 +0x194
go tool dist: FAILED: /usr/local/go/pkg/tool/linux_mips64le/go_bootstrap install -pgo=off cmd/asm cmd/cgo cmd/compile cmd/link cmd/preprofile: exit status 2

I'm happy to provide more information/testing as might be helpful to narrow down/fix it, but I'm definitely outside my depth with this error/backtrace. 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions