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: "unexpected return pc for runtime.sigpanic" in x/sys/unix on darwin-amd64-10_12 #45702

Closed
bcmills opened this issue Apr 22, 2021 · 18 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 OS-Darwin release-blocker
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Apr 22, 2021

2021-04-21T22:16:51-33663a6/darwin-amd64-10_12
2021-04-20T20:58:09-ac73e9f/darwin-amd64-10_12
2021-04-20T07:25:15-93ed5bc/darwin-amd64-10_12
2021-04-19T17:01:43-37df388/darwin-amd64-10_12
2021-04-15T04:56:47-66c3f26/darwin-amd64-10_12

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fffe85a3561]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fffe85a3561
stack: frame={sp:0x7000063272f8, fp:0x700006327348} stack=[0x7000062a8278,0x700006327e78)
0x00007000063271f8:  0x0100700006327218  0x0000000000000004 
0x0000700006327208:  0x000000000000001f  0x00007fffe85a3561 
0x0000700006327218:  0x0b01dfacedebac1e  0x0000000000000001 
0x0000700006327228:  0x00007000063272c8  0x0000000001036131 <runtime.throw+0x0000000000000071> 
0x0000700006327238:  0x00000000011a730c  0x0000700006327280 
0x0000700006327248:  0x00000000010363e8 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000c000000d80 
0x0000700006327258:  0x0000000000000001  0x0000000000000001 
0x0000700006327268:  0x00007000063272c8  0x0000000001036131 <runtime.throw+0x0000000000000071> 
0x0000700006327278:  0x000000c000000d80  0x00007000063272b8 
0x0000700006327288:  0x0000000001036370 <runtime.fatalthrow+0x0000000000000050>  0x0000700006327298 
0x0000700006327298:  0x00000000010363a0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000c000000d80 
0x00007000063272a8:  0x0000000001036131 <runtime.throw+0x0000000000000071>  0x00007000063272c8 
0x00007000063272b8:  0x00007000063272e8  0x0000000001036131 <runtime.throw+0x0000000000000071> 
0x00007000063272c8:  0x00007000063272d0  0x0000000001036160 <runtime.throw.func1+0x0000000000000000> 
0x00007000063272d8:  0x00000000011aa0b5  0x000000000000002a 
0x00007000063272e8:  0x0000700006327338  0x000000000104c056 <runtime.sigpanic+0x0000000000000396> 
0x00007000063272f8: <0x00000000011aa0b5  0x0000000000000000 
0x0000700006327308:  0x0000000000000000  0x000000000000000a 
0x0000700006327318:  0x0000000001344000  0x000000000000000a 
0x0000700006327328:  0x0000000001347a00  0x000000000134a200 
0x0000700006327338:  0x0000700006327418 !0x00007fffe85a3561 
0x0000700006327348: >0x0000000001347a00  0x000000000134aa78 
0x0000700006327358:  0x0000000000000000  0x0000000000000000 
0x0000700006327368:  0x000000000134aa50  0x0000000000000000 
0x0000700006327378:  0x000000000134aa58  0x000000000134aa68 
0x0000700006327388:  0x0000000000002800  0x0000000000000000 
0x0000700006327398:  0x000000000134aa70  0x0000000000000004 
0x00007000063273a8:  0x000000000134a200  0x00000000000000a0 
0x00007000063273b8:  0x000000000134a204  0x000000000000000a 
0x00007000063273c8:  0x00000000010678ad <runtime.asmcgocall+0x00000000000000ad>  0xfffffffffffffe00 
0x00007000063273d8:  0x0000000001344000  0xff80000000001004 
0x00007000063273e8:  0x000070000632ffff  0x0000000000000000 
0x00007000063273f8:  0x0000000000000000  0x0000000000000000 
0x0000700006327408:  0x00007ffff125f000  0x00000000000000a0 
0x0000700006327418:  0x0000700006327448  0x00007fffe85a32da 
0x0000700006327428:  0x00000000000000a0  0x0000000000000000 
0x0000700006327438:  0x0000000000000003  0xc798bd940d93005d 

This may have the same root cause as #45700, but the fact that it only occurs on the 10_12 builder (and occurs consistently there) is a bit strange.

CC @cherrymui

@bcmills
Copy link
Contributor Author

bcmills commented Apr 22, 2021

Marking as release-blocker for 1.17 via #11811.

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 release-blocker labels Apr 22, 2021
@bcmills bcmills added this to the Go1.17 milestone Apr 22, 2021
@cagedmantis
Copy link
Contributor

I wanted to note that macOS 10.12 will not be supported in Go 1.17. The macOS 10.12 post-submit builders no longer run for commits made on master.

@bcmills
Copy link
Contributor Author

bcmills commented Apr 23, 2021

In that case, this issue can probably be closed.

Is there a tracking issue for dropping macOS 10.12 support? (I don't currently see a release note for it.)

@mark-rushakoff
Copy link
Contributor

I believe I'm running into this bug, but on macOS 10.14 -- I have spent a fair bit of time trying to minimize the reproducer and unfortunately I don't have something I can share externally yet.

I can reliably reproduce it in a closed source project. This project does use cgo to link against some libraries built in rust, but it successfully builds and runs with go1.15. The resulting output looks like this at tip (go version devel go1.17-5b328c4a2f Wed Apr 28 16:13:40 2021 +0000 darwin/amd64):

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff708253a6]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff708253a6
stack: frame={sp:0x7ffeefbff418, fp:0x7ffeefbff468} stack=[0x7ffeefb804b8,0x7ffeefbff520)
0x00007ffeefbff318:  0x01007ffeefbff338  0x0000000000000004
0x00007ffeefbff328:  0x000000000000001f  0x00007fff708253a6
0x00007ffeefbff338:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbff348:  0x00007ffeefbff3e8  0x0000000004036cd1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff358:  0x00000000048315c2  0x00007ffeefbff3a0
0x00007ffeefbff368:  0x0000000004036f88 <runtime.fatalthrow.func1+0x0000000000000048>  0x0000000004d59cc0
0x00007ffeefbff378:  0x0000000000000001  0x0000000000000001
0x00007ffeefbff388:  0x00007ffeefbff3e8  0x0000000004036cd1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff398:  0x0000000004d59cc0  0x00007ffeefbff3d8
0x00007ffeefbff3a8:  0x0000000004036f10 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff3b8
0x00007ffeefbff3b8:  0x0000000004036f40 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000004d59cc0
0x00007ffeefbff3c8:  0x0000000004036cd1 <runtime.throw+0x0000000000000071>  0x00007ffeefbff3e8
0x00007ffeefbff3d8:  0x00007ffeefbff408  0x0000000004036cd1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff3e8:  0x00007ffeefbff3f0  0x0000000004036d00 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbff3f8:  0x000000000483b8b9  0x000000000000002a
0x00007ffeefbff408:  0x00007ffeefbff458  0x000000000404cbd6 <runtime.sigpanic+0x0000000000000396>
0x00007ffeefbff418: <0x000000000483b8b9  0x000000c00005b13c
0x00007ffeefbff428:  0x000000007fffff80  0x0000000000000000
0x00007ffeefbff438:  0x000000c00005b120  0x00007ffeefbff490
0x00007ffeefbff448:  0x00007fff70a2ecaa  0x000000c00005b120
0x00007ffeefbff458:  0x00007ffeefbff4a0 !0x00007fff708253a6
0x00007ffeefbff468: >0x00007ffeefbff4a0  0x0000000004cd0000
0x00007ffeefbff478:  0x000000000000069d  0x000000000409d725 <internal/syscall/unix.libc_getentropy_trampoline+0x0000000000000005>
0x00007ffeefbff488:  0x000000000406b47f <runtime.syscall+0x000000000000001f>  0x000000c00016b890
0x00007ffeefbff498:  0x000000000406b38c <runtime.pthread_mutex_unlock_trampoline+0x000000000000000c>  0x000000c00016b860
0x00007ffeefbff4a8:  0x00000000040692d0 <runtime.asmcgocall+0x0000000000000070>  0x00007ffeefbff4e0
0x00007ffeefbff4b8:  0x000000000400f0ae <runtime.persistentalloc.func1+0x000000000000002e>  0x4e00000000001018
0x00007ffeefbff4c8:  0x000000000402dc05 <runtime.mProf_Malloc.func1+0x0000000000000025>  0x0000000004d8cd98
0x00007ffeefbff4d8:  0x00000000000007c8  0x000000c0000001a0
0x00007ffeefbff4e8:  0x00000000040673e9 <runtime.systemstack+0x0000000000000049>  0x0000000000000004
0x00007ffeefbff4f8:  0x00000000048c99e8  0x0000000004d59cc0
0x00007ffeefbff508:  0x00007ffeefbff550  0x00000000040672e5 <runtime.mstart+0x0000000000000005>
0x00007ffeefbff518:  0x000000000406729d <runtime.rt0_go+0x000000000000013d>
runtime.throw({0x483b8b9, 0xc00005b13c})
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff708253a6
stack: frame={sp:0x7ffeefbff418, fp:0x7ffeefbff468} stack=[0x7ffeefb804b8,0x7ffeefbff520)
0x00007ffeefbff318:  0x01007ffeefbff338  0x0000000000000004
0x00007ffeefbff328:  0x000000000000001f  0x00007fff708253a6
0x00007ffeefbff338:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbff348:  0x00007ffeefbff3e8  0x0000000004036cd1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff358:  0x00000000048315c2  0x00007ffeefbff3a0
0x00007ffeefbff368:  0x0000000004036f88 <runtime.fatalthrow.func1+0x0000000000000048>  0x0000000004d59cc0
0x00007ffeefbff378:  0x0000000000000001  0x0000000000000001
0x00007ffeefbff388:  0x00007ffeefbff3e8  0x0000000004036cd1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff398:  0x0000000004d59cc0  0x00007ffeefbff3d8
0x00007ffeefbff3a8:  0x0000000004036f10 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff3b8
0x00007ffeefbff3b8:  0x0000000004036f40 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000004d59cc0
0x00007ffeefbff3c8:  0x0000000004036cd1 <runtime.throw+0x0000000000000071>  0x00007ffeefbff3e8
0x00007ffeefbff3d8:  0x00007ffeefbff408  0x0000000004036cd1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff3e8:  0x00007ffeefbff3f0  0x0000000004036d00 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbff3f8:  0x000000000483b8b9  0x000000000000002a
0x00007ffeefbff408:  0x00007ffeefbff458  0x000000000404cbd6 <runtime.sigpanic+0x0000000000000396>
0x00007ffeefbff418: <0x000000000483b8b9  0x000000c00005b13c
0x00007ffeefbff428:  0x000000007fffff80  0x0000000000000000
0x00007ffeefbff438:  0x000000c00005b120  0x00007ffeefbff490
0x00007ffeefbff448:  0x00007fff70a2ecaa  0x000000c00005b120
0x00007ffeefbff458:  0x00007ffeefbff4a0 !0x00007fff708253a6
0x00007ffeefbff468: >0x00007ffeefbff4a0  0x0000000004cd0000
0x00007ffeefbff478:  0x000000000000069d  0x000000000409d725 <internal/syscall/unix.libc_getentropy_trampoline+0x0000000000000005>
0x00007ffeefbff488:  0x000000000406b47f <runtime.syscall+0x000000000000001f>  0x000000c00016b890
0x00007ffeefbff498:  0x000000000406b38c <runtime.pthread_mutex_unlock_trampoline+0x000000000000000c>  0x000000c00016b860
0x00007ffeefbff4a8:  0x00000000040692d0 <runtime.asmcgocall+0x0000000000000070>  0x00007ffeefbff4e0
0x00007ffeefbff4b8:  0x000000000400f0ae <runtime.persistentalloc.func1+0x000000000000002e>  0x4e00000000001018
0x00007ffeefbff4c8:  0x000000000402dc05 <runtime.mProf_Malloc.func1+0x0000000000000025>  0x0000000004d8cd98
0x00007ffeefbff4d8:  0x00000000000007c8  0x000000c0000001a0
0x00007ffeefbff4e8:  0x00000000040673e9 <runtime.systemstack+0x0000000000000049>  0x0000000000000004
0x00007ffeefbff4f8:  0x00000000048c99e8  0x0000000004d59cc0
0x00007ffeefbff508:  0x00007ffeefbff550  0x00000000040672e5 <runtime.mstart+0x0000000000000005>
0x00007ffeefbff518:  0x000000000406729d <runtime.rt0_go+0x000000000000013d>
runtime.sigpanic()
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x409d720, 0xc000028ad0, 0xc, 0x0)
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/sys_darwin.go:22 +0x3b fp=0xc00016b890 sp=0xc00016b870 pc=0x4065f1b
syscall.syscall(0x4745540, 0x485da40, 0xc00016b900, 0x40663f9)
	<autogenerated>:1 +0x26 fp=0xc00016b8d8 sp=0xc00016b890 pc=0x406bc46
internal/syscall/unix.GetEntropy({0xc000028ad0, 0xc, 0x7bad5c808a18e})
	/Users/mr/gotip/src/github.com/golang/go/src/internal/syscall/unix/getentropy_darwin.go:18 +0x50 fp=0xc00016b910 sp=0xc00016b8d8 pc=0x409d630
crypto/rand.getEntropy({0xc000028ad0, 0xc, 0xc})
	/Users/mr/gotip/src/github.com/golang/go/src/crypto/rand/rand_getentropy.go:25 +0x8e fp=0xc00016b940 sp=0xc00016b910 pc=0x4195aae
crypto/rand.(*devReader).Read(0xc000116210, {0xc000028ad0, 0xc, 0x5204108})
	/Users/mr/gotip/src/github.com/golang/go/src/crypto/rand/rand_unix.go:62 +0x137 fp=0xc00016ba60 sp=0xc00016b940 pc=0x4195d37
io.ReadAtLeast({0x48d72a0, 0xc000116210}, {0xc000028ad0, 0xc, 0xc}, 0xc)
	/Users/mr/gotip/src/github.com/golang/go/src/io/io.go:328 +0x9a fp=0xc00016baa8 sp=0xc00016ba60 pc=0x4093c1a
io.ReadFull(...)
	/Users/mr/gotip/src/github.com/golang/go/src/io/io.go:347
crypto/rand.Read({0xc000028ad0, 0xc00016bb60, 0x41fd81b})
	/Users/mr/gotip/src/github.com/golang/go/src/crypto/rand/rand.go:24 +0x3e fp=0xc00016bae8 sp=0xc00016baa8 pc=0x419597e
github.com/go-chi/chi/middleware.init.0()
	/Users/mr/go/src/github.com/influxdata/REDACTED/vendor/github.com/go-chi/chi/middleware/request_id.go:54 +0x97 fp=0xc00016bbc0 sp=0xc00016bae8 pc=0x424d037
runtime.doInit(0x400)
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/proc.go:6416 +0x123 fp=0xc00016bd00 sp=0xc00016bbc0 pc=0x40460a3
runtime.doInit(0xc000056668)
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/proc.go:6393 +0x71 fp=0xc00016be40 sp=0xc00016bd00 pc=0x4045ff1
runtime.doInit(0x446d6f0)
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/proc.go:6393 +0x71 fp=0xc00016bf80 sp=0xc00016be40 pc=0x4045ff1
runtime.main()
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/proc.go:238 +0x1e6 fp=0xc00016bfe0 sp=0xc00016bf80 pc=0x4039326
runtime.goexit()
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00016bfe8 sp=0xc00016bfe0 pc=0x40695c1
FAIL	github.com/influxdata/REDACTED/influxdbv2/dbrp	0.016s
FAIL

And I tried to git bisect on go, and unfortunately I landed on fd3612e, internal/buildcfg: enable regabiwrappers by default.

Output from the run with fd3612e
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff708253a6]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff708253a6
stack: frame={sp:0x7ffeefbff408, fp:0x7ffeefbff468} stack=[0x7ffeefb804b8,0x7ffeefbff520)
0x00007ffeefbff308:  0x0000000004daeca0  0x01000000000003e8
0x00007ffeefbff318:  0x0000000000000004  0x000000000000001f
0x00007ffeefbff328:  0x00007fff708253a6  0x0b01dfacedebac1e
0x00007ffeefbff338:  0x0000000000000001  0x00000000048d9efb
0x00007ffeefbff348:  0x00007ffeefbff390  0x000000000403b35f <runtime.fatalthrow.func1+0x000000000000005f>
0x00007ffeefbff358:  0x0000000004daeca0  0x000000000403b054 <runtime.throw+0x0000000000000074>
0x00007ffeefbff368:  0x00007ffeefbff3d8  0x0000000000000001
0x00007ffeefbff378:  0x00007ffeefbff3d8  0x000000000403b054 <runtime.throw+0x0000000000000074>
0x00007ffeefbff388:  0x0000000004daeca0  0x00007ffeefbff3c8
0x00007ffeefbff398:  0x000000000403b2de <runtime.fatalthrow+0x000000000000005e>  0x00007ffeefbff3a8
0x00007ffeefbff3a8:  0x000000000403b300 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000004daeca0
0x00007ffeefbff3b8:  0x000000000403b054 <runtime.throw+0x0000000000000074>  0x00007ffeefbff3d8
0x00007ffeefbff3c8:  0x00007ffeefbff3f8  0x000000000403b054 <runtime.throw+0x0000000000000074>
0x00007ffeefbff3d8:  0x00007ffeefbff3e0  0x000000000403b080 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbff3e8:  0x00000000048e41c8  0x000000000000002a
0x00007ffeefbff3f8:  0x00007ffeefbff458  0x0000000004052b65 <runtime.sigpanic+0x00000000000004a5>
0x00007ffeefbff408: <0x00000000048e41c8  0x000000000000002a
0x00007ffeefbff418:  0x0000000000000000  0x000000c00005b134
0x00007ffeefbff428:  0x000000007fffff80  0x0000000000000000
0x00007ffeefbff438:  0x000000c00005b118  0x00007ffeefbff490
0x00007ffeefbff448:  0x00007fff70a2ecaa  0x000000c00005b118
0x00007ffeefbff458:  0x00007ffeefbff4a0 !0x00007fff708253a6
0x00007ffeefbff468: >0x00007ffeefbff4a0  0x0000000004d25000
0x00007ffeefbff478:  0x000000000000069d  0x00000000040aab05 <internal/syscall/unix.libc_getentropy_trampoline+0x0000000000000005>
0x00007ffeefbff488:  0x0000000004073adf <runtime.syscall+0x000000000000001f>  0x000000c0000eb820
0x00007ffeefbff498:  0x00000000040739ec <runtime.pthread_mutex_unlock_trampoline+0x000000000000000c>  0x000000c0000eb7e8
0x00007ffeefbff4a8:  0x00000000040718b0 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000002
0x00007ffeefbff4b8:  0x0000000004004e00 <runtime.cgocallbackg1+0x0000000000000220>  0x0000000005252e50
0x00007ffeefbff4c8:  0x4e00000000000040  0x0000000004de0578
0x00007ffeefbff4d8:  0x0000000000000840  0x000000c000000180
0x00007ffeefbff4e8:  0x000000c0000eb480  0x000000000406fb09 <runtime.systemstack+0x0000000000000049>
0x00007ffeefbff4f8:  0x0000000004973340  0x00007ffeefbff550
0x00007ffeefbff508:  0x00007ffeefbff550  0x000000000406f9e5 <runtime.mstart+0x0000000000000005>
0x00007ffeefbff518:  0x000000000406f99d <runtime.rt0_go+0x000000000000013d>
runtime.throw(0x48e41c8, 0x2a)
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/panic.go:1191 +0x74
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff708253a6
stack: frame={sp:0x7ffeefbff408, fp:0x7ffeefbff468} stack=[0x7ffeefb804b8,0x7ffeefbff520)
0x00007ffeefbff308:  0x0000000004daeca0  0x01000000000003e8
0x00007ffeefbff318:  0x0000000000000004  0x000000000000001f
0x00007ffeefbff328:  0x00007fff708253a6  0x0b01dfacedebac1e
0x00007ffeefbff338:  0x0000000000000001  0x00000000048d9efb
0x00007ffeefbff348:  0x00007ffeefbff390  0x000000000403b35f <runtime.fatalthrow.func1+0x000000000000005f>
0x00007ffeefbff358:  0x0000000004daeca0  0x000000000403b054 <runtime.throw+0x0000000000000074>
0x00007ffeefbff368:  0x00007ffeefbff3d8  0x0000000000000001
0x00007ffeefbff378:  0x00007ffeefbff3d8  0x000000000403b054 <runtime.throw+0x0000000000000074>
0x00007ffeefbff388:  0x0000000004daeca0  0x00007ffeefbff3c8
0x00007ffeefbff398:  0x000000000403b2de <runtime.fatalthrow+0x000000000000005e>  0x00007ffeefbff3a8
0x00007ffeefbff3a8:  0x000000000403b300 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000004daeca0
0x00007ffeefbff3b8:  0x000000000403b054 <runtime.throw+0x0000000000000074>  0x00007ffeefbff3d8
0x00007ffeefbff3c8:  0x00007ffeefbff3f8  0x000000000403b054 <runtime.throw+0x0000000000000074>
0x00007ffeefbff3d8:  0x00007ffeefbff3e0  0x000000000403b080 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbff3e8:  0x00000000048e41c8  0x000000000000002a
0x00007ffeefbff3f8:  0x00007ffeefbff458  0x0000000004052b65 <runtime.sigpanic+0x00000000000004a5>
0x00007ffeefbff408: <0x00000000048e41c8  0x000000000000002a
0x00007ffeefbff418:  0x0000000000000000  0x000000c00005b134
0x00007ffeefbff428:  0x000000007fffff80  0x0000000000000000
0x00007ffeefbff438:  0x000000c00005b118  0x00007ffeefbff490
0x00007ffeefbff448:  0x00007fff70a2ecaa  0x000000c00005b118
0x00007ffeefbff458:  0x00007ffeefbff4a0 !0x00007fff708253a6
0x00007ffeefbff468: >0x00007ffeefbff4a0  0x0000000004d25000
0x00007ffeefbff478:  0x000000000000069d  0x00000000040aab05 <internal/syscall/unix.libc_getentropy_trampoline+0x0000000000000005>
0x00007ffeefbff488:  0x0000000004073adf <runtime.syscall+0x000000000000001f>  0x000000c0000eb820
0x00007ffeefbff498:  0x00000000040739ec <runtime.pthread_mutex_unlock_trampoline+0x000000000000000c>  0x000000c0000eb7e8
0x00007ffeefbff4a8:  0x00000000040718b0 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000002
0x00007ffeefbff4b8:  0x0000000004004e00 <runtime.cgocallbackg1+0x0000000000000220>  0x0000000005252e50
0x00007ffeefbff4c8:  0x4e00000000000040  0x0000000004de0578
0x00007ffeefbff4d8:  0x0000000000000840  0x000000c000000180
0x00007ffeefbff4e8:  0x000000c0000eb480  0x000000000406fb09 <runtime.systemstack+0x0000000000000049>
0x00007ffeefbff4f8:  0x0000000004973340  0x00007ffeefbff550
0x00007ffeefbff508:  0x00007ffeefbff550  0x000000000406f9e5 <runtime.mstart+0x0000000000000005>
0x00007ffeefbff518:  0x000000000406f99d <runtime.rt0_go+0x000000000000013d>
runtime.sigpanic()
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/signal_unix.go:719 +0x4a5

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x40aab00, 0xc000028ad0, 0xc, 0x0, 0x0, 0x0, 0x0)
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/sys_darwin.go:19 +0x2e fp=0xc0000eb820 sp=0xc0000eb7f8 pc=0x406e5ee
syscall.syscall(0x40aab00, 0xc000028ad0, 0xc, 0x0, 0x4daee20, 0xc0000366d8, 0xc000034000)
	<autogenerated>:1 +0x3a fp=0xc0000eb868 sp=0xc0000eb820 pc=0x40742da
internal/syscall/unix.GetEntropy(0xc000028ad0, 0xc, 0xc, 0xc00008a640, 0x7b9f6e2961680)
	/Users/mr/gotip/src/github.com/golang/go/src/internal/syscall/unix/getentropy_darwin.go:18 +0x72 fp=0xc0000eb8b8 sp=0xc0000eb868 pc=0x40aa9d2
crypto/rand.getEntropy(0xc000028ad0, 0xc, 0xc, 0x400f630)
	/Users/mr/gotip/src/github.com/golang/go/src/crypto/rand/rand_getentropy.go:25 +0x98 fp=0xc0000eb8f8 sp=0xc0000eb8b8 pc=0x41c3138
crypto/rand.(*devReader).Read(0xc000096210, 0xc000028ad0, 0xc, 0xc, 0x0, 0x0, 0x0)
	/Users/mr/gotip/src/github.com/golang/go/src/crypto/rand/rand_unix.go:62 +0x136 fp=0xc0000eb9f0 sp=0xc0000eb8f8 pc=0x41c33b6
io.ReadAtLeast(0x497d0c0, 0xc000096210, 0xc000028ad0, 0xc, 0xc, 0xc, 0x4801520, 0xc0000eba01, 0xc000028ad0)
	/Users/mr/gotip/src/github.com/golang/go/src/io/io.go:328 +0xba fp=0xc0000eba50 sp=0xc0000eb9f0 pc=0x40a16fa
io.ReadFull(...)
	/Users/mr/gotip/src/github.com/golang/go/src/io/io.go:347
crypto/rand.Read(0xc000028ad0, 0xc, 0xc, 0x0, 0x20, 0xc000028ab0)
	/Users/mr/gotip/src/github.com/golang/go/src/crypto/rand/rand.go:24 +0x5c fp=0xc0000ebaa8 sp=0xc0000eba50 pc=0x41c2ffc
github.com/go-chi/chi/middleware.init.0()
	/Users/mr/go/src/github.com/influxdata/REDACTED/vendor/github.com/go-chi/chi/middleware/request_id.go:54 +0xd9 fp=0xc0000ebb98 sp=0xc0000ebaa8 pc=0x4295c59
runtime.doInit(0x4d63b40)
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/proc.go:6253 +0x129 fp=0xc0000ebce8 sp=0xc0000ebb98 pc=0x404b8e9
runtime.doInit(0x4d60060)
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/proc.go:6230 +0x7e fp=0xc0000ebe38 sp=0xc0000ebce8 pc=0x404b83e
runtime.doInit(0x4d5e8c0)
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/proc.go:6230 +0x7e fp=0xc0000ebf88 sp=0xc0000ebe38 pc=0x404b83e
runtime.main()
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/proc.go:237 +0x205 fp=0xc0000ebfe0 sp=0xc0000ebf88 pc=0x403db45
runtime.goexit()
	/Users/mr/gotip/src/github.com/golang/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0000ebfe8 sp=0xc0000ebfe0 pc=0x4071c21
FAIL	github.com/influxdata/REDACTED/influxdbv2/dbrp	0.020s
FAIL
go version devel go1.17-fd3612e433 Sat Apr 17 00:02:01 2021 +0000 darwin/amd64

If this should be a different issue, I'm happy to open a new one. I'm also happy to try bisecting again if you can point me at the right flags to pass before regabiwrappers were on by default, or I can easily build go if there are experimental patches to try or anything to gather more output.

@mark-rushakoff
Copy link
Contributor

I poked at it just a bit longer and was able to minimize a reproducer at https://github.com/mark-rushakoff/goissue45702.

@toothrot
Copy link
Contributor

/cc @cherrymui

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/316649 mentions this issue: internal/syscall/unix: use internal/abi.FuncPC for syscall wrapper

@cherrymui
Copy link
Member

@mark-rushakoff thanks for reporting. If you could try applying change https://go-review.googlesource.com/c/go/+/316649 to Go tip and run your test case, that would be very helpful. Thanks.

gopherbot pushed a commit that referenced this issue May 3, 2021
Following CL 313230, this is for internal/syscall/unix package.

Updates #45702.

Change-Id: Ie6d8c1923dfeae56896212393c5c2a6e257648d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/316649
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
@mark-rushakoff
Copy link
Contributor

@cherrymui my reproducer no longer crashes as of go version devel go1.17-e3769299cd Tue May 4 00:56:00 2021 +0000 darwin/amd64. Thank you!

@toothrot
Copy link
Contributor

toothrot commented May 6, 2021

@cherrymui Is this resolved? If so, please feel free to close at your leisure.

@cherrymui
Copy link
Member

Not yet. I'll send another CL later today. Thanks.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/317894 mentions this issue: unix: take address in assembly for Darwin syscall wrappers

gopherbot pushed a commit to golang/sys that referenced this issue May 7, 2021
In Go 1.17 we will introduce a register-based ABI on some
platforms, as well as ABI wrappers to bridge the ABIs. For Darwin
syscall wrappers, it needs to be called directly, instead of
through wrappers. Currently, it is written as that the syscall
functions are defined in assembly and their addresses are taken
from Go using funcPC. In Go 1.17 this will result in the address
of the ABI wrapper, which is undesired.

In the syscall package in the standard library we changed to use
a compiler intrinsic internal/abi.FuncPCABI0 to take the address
of the syscall function. But that is not available to this repo
and not available in older versions of Go. Here we take a
different approach: taking the address directly from assembly.
This also ensures we get the address of the defined syscall
function, not the ABI wrapper.

Updates golang/go#45702.

Change-Id: Ia7480d0fb0ca4fb9bf2f36d2deb1e3e5e4eb8284
Reviewed-on: https://go-review.googlesource.com/c/sys/+/317894
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
@cherrymui
Copy link
Member

@mark-rushakoff does it work now with an updated x/sys repo? Thanks.

@mark-rushakoff
Copy link
Contributor

@cherrymui I have tried doing a go get golang.org/x/sys@master && go mod vendor from both the src/ and the src/cmd directories, but my tests are still failing with what looks like the same stack. I suspect I'm not correctly updating x/sys -- I couldn't quickly find the right way to do that. Can you point me in the right direction?

@cherrymui
Copy link
Member

from both the src/ and the src/cmd directories

Do you mean GOROOT/src and GOROOT/src/cmd? I think you may want to update golang.org/x/sys in your repo, not the one that are vendored into GOROOT.

@cherrymui
Copy link
Member

Also, when you paste the stack trace, could you paste the part that is after the hex dump? That will provide more useful information, such as the source code path of the x/sys code.

@mark-rushakoff
Copy link
Contributor

@cherrymui yes, I was mistakenly attempting to update x/sys in GOROOT.

After running go get golang.org/x/sys@master, I am able to successfully run my tests without any unexpected return pc errors, using go version devel go1.17-af6123a865 Fri May 7 18:14:25 2021 +0000 darwin/amd64.

Thanks again!

@cherrymui
Copy link
Member

Thanks @mark-rushakoff !

I think we can call this issue fixed. macOS 10.12 is no longer supported. And other failures reported in the issue are fixed.

thaJeztah added a commit to thaJeztah/cli that referenced this issue Aug 23, 2021
…r Go 1.17)

Go 1.17 requires golang.org/x/sys a76c4d0a0096537dc565908b53073460d96c8539 (May 8,
2021) or later, see golang/go#45702. While this seems
to affect macOS only, let's update to the latest version.

full diff: golang/sys@d19ff85...63515b4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this issue Aug 23, 2021
…r Go 1.17)

Go 1.17 requires golang.org/x/sys a76c4d0a0096537dc565908b53073460d96c8539 (May 8,
2021) or later, see golang/go#45702. While this seems
to affect macOS only, let's update to the latest version.

full diff: golang/sys@d19ff85...63515b4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d48c8b70a1df3c82b93cd2766dfec261da5a70e5
Component: engine
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this issue Aug 23, 2021
…r Go 1.17)

Go 1.17 requires golang.org/x/sys a76c4d0a0096537dc565908b53073460d96c8539 (May 8,
2021) or later, see golang/go#45702. While this seems
to affect macOS only, let's update to the latest version.

full diff: golang/sys@d19ff85...63515b4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 61a1775adba91ed0dc05bc9eec0dc6581a8c2b8c
Component: cli
harshavardhana pushed a commit to minio/mc that referenced this issue Aug 25, 2021
jsternberg pushed a commit to influxdata/flux that referenced this issue Aug 30, 2021
charlievieth pushed a commit to charlievieth/pebble that referenced this issue Sep 10, 2021
This commit updates the golang.org/x/sys dependency to fix a panic that
occurs on darwin when running under go1.17.

The golang/go issue is 45702: golang/go#45702

For reference the panic manifests itself when running the `pebble`
command and can be reproduced on go1.17 with:

```sh
$ go run github.com/cockroachdb/pebble/cmd/pebble bench sync "$(mktemp -d)"
```
gitchs pushed a commit to gitchs/mc that referenced this issue Oct 27, 2021
jcreixell added a commit to periskop-dev/periskop that referenced this issue Dec 3, 2021
  - Upgrading golang.org/x/sys seems to fix the probelm
  - Tidies dependencies
  - See golang/go#45702
jcreixell added a commit to periskop-dev/periskop that referenced this issue Dec 6, 2021
- Upgrading golang.org/x/sys seems to fix the probelm
  - Tidies dependencies
  - See golang/go#45702
thaJeztah added a commit to thaJeztah/docker that referenced this issue Apr 6, 2022
…r Go 1.17)

Go 1.17 requires golang.org/x/sys a76c4d0a0096537dc565908b53073460d96c8539 (May 8,
2021) or later, see golang/go#45702. While this seems
to affect macOS only, let's update to the latest version.

full diff: golang/sys@d19ff85...63515b4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d48c8b7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/docker that referenced this issue Apr 7, 2022
…r Go 1.17)

Go 1.17 requires golang.org/x/sys a76c4d0a0096537dc565908b53073460d96c8539 (May 8,
2021) or later, see golang/go#45702. While this seems
to affect macOS only, let's update to the latest version.

full diff: golang/sys@d19ff85...63515b4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d48c8b7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/cli that referenced this issue May 6, 2022
…r Go 1.17)

Go 1.17 requires golang.org/x/sys a76c4d0a0096537dc565908b53073460d96c8539 (May 8,
2021) or later, see golang/go#45702. While this seems
to affect macOS only, let's update to the latest version.

full diff: golang/sys@d19ff85...63515b4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 61a1775)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@golang golang locked and limited conversation to collaborators May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 OS-Darwin release-blocker
Projects
None yet
Development

No branches or pull requests

6 participants