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: "found bad pointer in Go heap" on darwin-arm64-corellium builder #32324

Open
bcmills opened this issue May 30, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@bcmills
Copy link
Member

commented May 30, 2019

Possibly related to #32026.

Seen in https://build.golang.org/log/581aabff93c4fd2e8fb64339dcbbe37bfedf7985:

darwin-arm64-corellium at ddb5d0db37b885ba327180816253714625fd3c38

:: Running /bin/bash with args ["bash" "/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/make.bash"] and env ["SHELL=/bin/sh" "XPC_FLAGS=0x0" "TMUX=/tmp//tmux-501/default,89,0" "GOROOT_BOOTSTRAP=/tmp/workdir-host-darwin-arm64-corellium-ios/go1.4" "PWD=/" "LOGNAME=mobile" "HOME=/var/mobile" "GO_BUILDER_ENV=host-darwin-arm64-corellium-ios" "TERM=screen" "USER=mobile" "TMUX_PANE=%0" "SHLVL=1" "XPC_SERVICE_NAME=org.golang.builder" "PATH=/var/mobile/bin:/usr/bin:/bin:/usr/sbin:/sbin" "CC=/var/mobile/bin/clangsign" "__CF_USER_TEXT_ENCODING=0x1F5:0:0" "_=/var/mobile/go/bin/buildlet" "WORKDIR=/tmp/workdir-host-darwin-arm64-corellium-ios" "GO_BUILDER_NAME=darwin-arm64-corellium" "GOROOT_BOOTSTRAP=/var/mobile/go-darwin-arm64-bootstrap" "GOBIN=" "TMPDIR=/tmp/workdir-host-darwin-arm64-corellium-ios/tmp" "GOCACHE=/tmp/workdir-host-darwin-arm64-corellium-ios/gocache" "GOROOT_BOOTSTRAP=/var/mobile/go-darwin-arm64-bootstrap"] in dir /tmp/workdir-host-darwin-arm64-corellium-ios/go/src

Building Go cmd/dist using /var/mobile/go-darwin-arm64-bootstrap.
Building Go toolchain1 using /var/mobile/go-darwin-arm64-bootstrap.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
warning: unable to find runtime/cgo.a
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
# cmd/compile
runtime: pointer 0x1148057a8 to unallocated span span.base()=0x1140bc000 span.limit=0x0 span.state=3
runtime: found in object at *(0x10a3ac000+0xe200)
object=0x10a3ac000 s.base()=0x10a3ac000 s.limit=0x10a3d6f80 s.spanclass=0 s.elemsize=180224 s.state=mSpanInUse
 *(object+0) = 0x105db0571
 *(object+8) = 0x10
 *(object+16) = 0x70900000008
 *(object+24) = 0xffffffff
 *(object+32) = 0x0
 *(object+40) = 0x8b0674
 *(object+48) = 0x4
 *(object+56) = 0x0
 *(object+64) = 0x10c4f0aa0
 *(object+72) = 0x0
 *(object+80) = 0x130f24e80
 *(object+88) = 0x16
 *(object+96) = 0x0
 *(object+104) = 0x10a2c81e0
 *(object+112) = 0x0
 *(object+120) = 0x13085fa00
 *(object+128) = 0x1148b1674
 *(object+136) = 0x4
 *(object+144) = 0x19b48e6
 *(object+152) = 0x0
 *(object+160) = 0x0
 *(object+168) = 0x0
 *(object+176) = 0x105db0596
 *(object+184) = 0x10
 *(object+192) = 0x70900000008
 *(object+200) = 0xffffffff
 *(object+208) = 0x0
 *(object+216) = 0x8b06b4
 *(object+224) = 0x4
 *(object+232) = 0x0
 *(object+240) = 0x10c4f0aa0
 *(object+248) = 0x0
 *(object+256) = 0x130f24e80
 *(object+264) = 0x16
 *(object+272) = 0x0
 *(object+280) = 0x10a2c81e0
 *(object+288) = 0x0
 *(object+296) = 0x13085fa00
 *(object+304) = 0x1148b16b4
 *(object+312) = 0x4
 *(object+320) = 0x19b48a6
 *(object+328) = 0x0
 *(object+336) = 0x0
 *(object+344) = 0x0
 *(object+352) = 0x105db05bb
 *(object+360) = 0x10
 *(object+368) = 0x70900000008
 *(object+376) = 0xffffffff
 *(object+384) = 0x0
 *(object+392) = 0x8b06c0
 *(object+400) = 0x4
 *(object+408) = 0x0
 *(object+416) = 0x10c4f0aa0
 *(object+424) = 0x0
 *(object+432) = 0x130f24e80
 *(object+440) = 0x16
 *(object+448) = 0x0
 *(object+456) = 0x10a2c81e0
 *(object+464) = 0x0
 *(object+472) = 0x13085fa00
 *(object+480) = 0x1148b16c0
 *(object+488) = 0x4
 *(object+496) = 0x19b489a
 *(object+504) = 0x0
 *(object+512) = 0x0
 *(object+520) = 0x0
 *(object+528) = 0x105db05ce
 *(object+536) = 0x10
 *(object+544) = 0x70900000008
 *(object+552) = 0xffffffff
 *(object+560) = 0x0
 *(object+568) = 0x8b06f8
 *(object+576) = 0x4
 *(object+584) = 0x0
 *(object+592) = 0x10c4f0aa0
 *(object+600) = 0x0
 *(object+608) = 0x130f24e80
 *(object+616) = 0x16
 *(object+624) = 0x0
 *(object+632) = 0x10a2c81e0
 *(object+640) = 0x0
 *(object+648) = 0x13085fa00
 *(object+656) = 0x1148b16f8
 *(object+664) = 0x4
 *(object+672) = 0x19b4862
 *(object+680) = 0x0
 *(object+688) = 0x0
 *(object+696) = 0x0
 *(object+704) = 0x105db05e1
 *(object+712) = 0x11
 *(object+720) = 0x70900000008
 *(object+728) = 0xffffffff
 *(object+736) = 0x0
 *(object+744) = 0x8b188d
 *(object+752) = 0x5
 *(object+760) = 0x0
 *(object+768) = 0x10c4f0aa0
 *(object+776) = 0x0
 *(object+784) = 0x130f24e80
 *(object+792) = 0x16
 *(object+800) = 0x0
 *(object+808) = 0x10a2c81e0
 *(object+816) = 0x0
 *(object+824) = 0x13085fa00
 *(object+832) = 0x1148b288d
 *(object+840) = 0x5
 *(object+848) = 0x19b36cd
 *(object+856) = 0x0
 *(object+864) = 0x0
 *(object+872) = 0x0
 *(object+880) = 0x105db061c
 *(object+888) = 0xf
 *(object+896) = 0x70900000008
 *(object+904) = 0xffffffff
 *(object+912) = 0x0
 *(object+920) = 0x8afd7f
 *(object+928) = 0x3
 *(object+936) = 0x0
 *(object+944) = 0x10c4f0aa0
 *(object+952) = 0x0
 *(object+960) = 0x130f24e80
 *(object+968) = 0x16
 *(object+976) = 0x0
 *(object+984) = 0x10a2c81e0
 *(object+992) = 0x0
 *(object+1000) = 0x13085fa00
 *(object+1008) = 0x1148b0d7f
 *(object+1016) = 0x3
 ...
 *(object+57736) = 0x5d
 *(object+57744) = 0x30900000008
 *(object+57752) = 0x8ffffffff
 *(object+57760) = 0x0
 *(object+57768) = 0x8047a8
 *(object+57776) = 0x8
 *(object+57784) = 0x0
 *(object+57792) = 0x10c4f09f0
 *(object+57800) = 0x0
 *(object+57808) = 0x130f24e80
 *(object+57816) = 0x16
 *(object+57824) = 0x0
 *(object+57832) = 0x10a2c81e0
 *(object+57840) = 0x0
 *(object+57848) = 0x13085fa00
 *(object+57856) = 0x1148057a8 <==
 *(object+57864) = 0x8
 *(object+57872) = 0x1a607b2
 *(object+57880) = 0x10a71e6c0
 *(object+57888) = 0x1
 *(object+57896) = 0x1
 *(object+57904) = 0x105db3728
 *(object+57912) = 0x5b
 *(object+57920) = 0x30900000008
 *(object+57928) = 0x8ffffffff
 *(object+57936) = 0x0
 *(object+57944) = 0x803d20
 *(object+57952) = 0x8
 *(object+57960) = 0x0
 *(object+57968) = 0x10c4f09f0
 *(object+57976) = 0x0
 ...
fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)

runtime stack:
runtime.throw(0x10054283e, 0x3e)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/panic.go:714 +0x4c fp=0x16fb232e0 sp=0x16fb232b0 pc=0x10030cf1c
runtime.findObject(0x1148057a8, 0x10a3ac000, 0xe200, 0x10094a358, 0x13002d270, 0x20)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mbitmap.go:397 +0x338 fp=0x16fb23330 sp=0x16fb232e0 pc=0x1002f4ba8
runtime.scanobject(0x10a3ac000, 0x13002d270)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgcmark.go:1174 +0x1e0 fp=0x16fb233d0 sp=0x16fb23330 pc=0x100300050
runtime.gcDrain(0x13002d270, 0x7)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgcmark.go:932 +0x218 fp=0x16fb23430 sp=0x16fb233d0 pc=0x1002ff848
runtime.gcBgMarkWorker.func2()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgc.go:1927 +0x174 fp=0x16fb23470 sp=0x16fb23430 pc=0x100331ed4
runtime.systemstack(0x1006fe4c0)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:237 +0x98 fp=0x16fb23480 sp=0x16fb23470 pc=0x100334698
runtime.mstart()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:1146 fp=0x16fb23480 sp=0x16fb23480 pc=0x100311180

goroutine 6 [GC worker (idle)]:
runtime.systemstack_switch()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:183 +0x8 fp=0x13003ef50 sp=0x13003ef40 pc=0x1003345e8
runtime.gcBgMarkWorker(0x13002c000)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgc.go:1891 +0x1ac fp=0x13003efd0 sp=0x13003ef50 pc=0x1002fb9ec
runtime.goexit()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:1128 +0x4 fp=0x13003efd0 sp=0x13003efd0 pc=0x100336d94
created by runtime.gcBgMarkStartWorkers
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgc.go:1785 +0x70

goroutine 1 [runnable]:
syscall.syscallX(0x10036ef90, 0x3, 0x2266000, 0x0, 0x2266000, 0x0, 0x0)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/sys_darwin_64.go:16 +0x14 fp=0x13061efe0 sp=0x13061efa0 pc=0x1003294d4
syscall.Seek(0x3, 0x2266000, 0x0, 0x133f36c66, 0x2, 0x100458844)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/syscall/zsyscall_darwin_arm64.go:1378 +0x48 fp=0x13061f040 sp=0x13061efe0 pc=0x10036ded8
internal/poll.(*FD).Seek(0x130081c20, 0x2266000, 0x0, 0x0, 0x0, 0x0)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/internal/poll/fd_unix.go:404 +0x88 fp=0x13061f080 sp=0x13061f040 pc=0x10037caa8
os.(*File).seek(...)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/os/file_unix.go:293
os.(*File).Seek(0x1300185a8, 0x2266000, 0x0, 0x10af42890, 0x8, 0x1004528a8)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/os/file.go:207 +0x50 fp=0x13061f0e0 sp=0x13061f080 pc=0x10037f370
cmd/link/internal/ld.(*OutBuf).SeekSet(0x13007c980, 0x2266000)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/cmd/link/internal/ld/outbuf.go:47 +0x60 fp=0x13061f180 sp=0x13061f0e0 pc=0x100458860
cmd/link/internal/ld.Domacholink(0x1306e8000, 0x2265f5a)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/cmd/link/internal/ld/macho.go:986 +0x274 fp=0x13061f200 sp=0x13061f180 pc=0x100452a44
cmd/link/internal/arm64.asmb2(0x1306e8000)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/cmd/link/internal/arm64/asm.go:851 +0x8c0 fp=0x13061f2e0 sp=0x13061f200 pc=0x100485260
cmd/link/internal/ld.Main(0x1006f4120, 0x8, 0x20, 0x1, 0x1f, 0x1e, 0x100539979, 0x1a, 0x1005300ce, 0x3, ...)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/cmd/link/internal/ld/main.go:271 +0xca8 fp=0x13061f440 sp=0x13061f2e0 pc=0x100457c08
main.main()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/cmd/link/main.go:65 +0x184 fp=0x13061ff80 sp=0x13061f440 pc=0x1004b5f74
runtime.main()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:203 +0x21c fp=0x13061ffd0 sp=0x13061ff80 pc=0x10030e69c
runtime.goexit()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:1128 +0x4 fp=0x13061ffd0 sp=0x13061ffd0 pc=0x100336d94

goroutine 2 [force gc (idle)]:
runtime.gopark(0x100544a70, 0x1006fd6c0, 0x1411, 0x1)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:304 +0xc8 fp=0x13003ffa0 sp=0x13003ff80 pc=0x10030ea78
runtime.goparkunlock(...)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:310
runtime.forcegchelper()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:253 +0xb0 fp=0x13003ffd0 sp=0x13003ffa0 pc=0x10030e930
runtime.goexit()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:1128 +0x4 fp=0x13003ffd0 sp=0x13003ffd0 pc=0x100336d94
created by runtime.init.4
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:242 +0x28

goroutine 3 [GC sweep wait]:
runtime.gopark(0x100544a70, 0x1006fd7e0, 0x140c, 0x1)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:304 +0xc8 fp=0x130040fa0 sp=0x130040f80 pc=0x10030ea78
runtime.goparkunlock(...)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:310
runtime.bgsweep(0x13007e000)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgcsweep.go:89 +0x170 fp=0x130040fd0 sp=0x130040fa0 pc=0x100301da0
runtime.goexit()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:1128 +0x4 fp=0x130040fd0 sp=0x130040fd0 pc=0x100336d94
created by runtime.gcenable
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgc.go:210 +0x4c

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x100544a70, 0x1006fda00, 0x140d, 0x1)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:304 +0xc8 fp=0x130041f20 sp=0x130041f00 pc=0x10030ea78
runtime.goparkunlock(...)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:310
runtime.bgscavenge(0x13007e000)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgcscavenge.go:257 +0xdc fp=0x130041fd0 sp=0x130041f20 pc=0x1003013fc
runtime.goexit()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:1128 +0x4 fp=0x130041fd0 sp=0x130041fd0 pc=0x100336d94
created by runtime.gcenable
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgc.go:211 +0x6c

goroutine 5 [finalizer wait]:
runtime.gopark(0x100544a70, 0x10071e6a0, 0x1410, 0x1)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:304 +0xc8 fp=0x13003af30 sp=0x13003af10 pc=0x10030ea78
runtime.goparkunlock(...)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/proc.go:310
runtime.runfinq()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mfinal.go:175 +0xac fp=0x13003afd0 sp=0x13003af30 pc=0x1002f827c
runtime.goexit()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:1128 +0x4 fp=0x13003afd0 sp=0x13003afd0 pc=0x100336d94
created by runtime.createfing
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mfinal.go:156 +0x64

goroutine 18 [GC worker (idle)]:
runtime.systemstack_switch()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:183 +0x8 fp=0x130618f50 sp=0x130618f40 pc=0x1003345e8
runtime.gcBgMarkWorker(0x13002e500)
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgc.go:1891 +0x1ac fp=0x130618fd0 sp=0x130618f50 pc=0x1002fb9ec
runtime.goexit()
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/asm_arm64.s:1128 +0x4 fp=0x130618fd0 sp=0x130618fd0 pc=0x100336d94
created by runtime.gcBgMarkStartWorkers
	/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/mgc.go:1785 +0x70
go tool dist: FAILED: /private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/pkg/tool/darwin_arm64/go_bootstrap install -gcflags=all= -ldflags=all= -a -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 2

@bcmills

This comment has been minimized.

Copy link
Member Author

commented May 30, 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.