go: x/exp/shiny: SIGILL: illegal instruction on macOS Catalina with Xcode 11.1 running basic example

What version of Go are you using (go version)?

$ go version
go version go1.13.3 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/leighmcculloch/Library/Caches/go-build"
GOENV="/Users/leighmcculloch/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/leighmcculloch/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/leighmcculloch/go/src/github.com/golang/exp/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/cn/mvxdpxj10pxgx6h74_knhyyc0000gn/T/go-build851615509=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I ran the x/exp/shiny/example/basic example application.

git clone https://github.com/golang/exp
cd exp/
go run -tags=example ./shiny/example/basic

What did you expect to see?

The basic graphical application to display.

What did you see instead?

An invalid instruction panic.

SIGILL: illegal instruction
PC=0x7fff2eda88a1 m=5 sigcode=1
signal arrived during cgo execution
Full Output
% go run -tags=example ./shiny/example/basic
go: downloading golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028
go: downloading golang.org/x/image v0.0.0-20190802002840-cff245a6509b
go: extracting golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028
go: extracting golang.org/x/image v0.0.0-20190802002840-cff245a6509b
go: finding golang.org/x/image v0.0.0-20190802002840-cff245a6509b
go: finding golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028
SIGILL: illegal instruction
PC=0x7fff2eda88a1 m=5 sigcode=1
signal arrived during cgo execution

goroutine 20 [syscall, locked to thread]:
runtime.cgocall(0x40c4170, 0xc00002ef10, 0x0)
	/usr/local/go/src/runtime/cgocall.go:128 +0x5b fp=0xc00002eee0 sp=0xc00002eea8 pc=0x400537b
golang.org/x/exp/shiny/driver/gldriver._Cfunc_makeCurrentContext(0x44426c0)
	_cgo_gotypes.go:298 +0x41 fp=0xc00002ef10 sp=0xc00002eee0 pc=0x40bf1f1
golang.org/x/exp/shiny/driver/gldriver.drawLoop(0xc0000ae000, 0x1)
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/gldriver/cocoa.go:147 +0x60 fp=0xc00002efd0 sp=0xc00002ef10 pc=0x40c02a0
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc00002efd8 sp=0xc00002efd0 pc=0x4058971
created by golang.org/x/exp/shiny/driver/gldriver.preparedOpenGL
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/gldriver/cocoa.go:92 +0xe4

goroutine 1 [chan receive, locked to thread]:
golang.org/x/exp/shiny/driver/gldriver.drawgl(0x457b340)
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/gldriver/cocoa.go:134 +0x15e
golang.org/x/exp/shiny/driver/gldriver._cgoexpwrap_db502a3a14da_drawgl(0x457b340)
	_cgo_gotypes.go:377 +0x2b
golang.org/x/exp/shiny/driver/gldriver._Cfunc_startDriver()
	_cgo_gotypes.go:311 +0x41
golang.org/x/exp/shiny/driver/gldriver.main(0x4116cd8, 0xc000040f50, 0x4007c6f)
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/gldriver/cocoa.go:107 +0x4d
golang.org/x/exp/shiny/driver/gldriver.Main(0x4116cd8)
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/gldriver/gldriver.go:26 +0x2f
golang.org/x/exp/shiny/driver.main(...)
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/driver_darwin.go:15
golang.org/x/exp/shiny/driver.Main(...)
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/driver.go:24
main.main()
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/example/basic/main.go:44 +0x2e

goroutine 19 [chan receive]:
golang.org/x/mobile/gl.(*context).enqueue(0xc0000b0000, 0x57, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/leighmcculloch/go/pkg/mod/golang.org/x/mobile@v0.0.0-20190719004257-d2bd2a29d028/gl/work.go:111 +0xd3
golang.org/x/mobile/gl.(*context).IsProgram(0xc0000b0000, 0xa8b00, 0x68)
	/Users/leighmcculloch/go/pkg/mod/golang.org/x/mobile@v0.0.0-20190719004257-d2bd2a29d028/gl/gl.go:1045 +0xcb
golang.org/x/exp/shiny/driver/gldriver.(*screenImpl).NewTexture(0x41e8220, 0x100, 0x100, 0x0, 0x0, 0x0, 0x0)
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/gldriver/screen.go:78 +0x1a0
main.main.func1(0x412e760, 0x41e8220)
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/example/basic/main.go:61 +0x267
golang.org/x/exp/shiny/driver/gldriver.driverStarted.func1()
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/gldriver/cocoa.go:114 +0x40
created by golang.org/x/exp/shiny/driver/gldriver.driverStarted
	/Users/leighmcculloch/go/src/github.com/golang/exp/shiny/driver/gldriver/cocoa.go:113 +0x35

rax    0x0
rbx    0xc00002ef10
rcx    0x0
rdx    0x0
rdi    0x0
rsi    0x1f08000c
rbp    0x70000508aef0
rsp    0x70000508aeb0
r8     0x0
r9     0x0
r10    0x0
r11    0x0
r12    0x44426c0
r13    0x0
r14    0x4031440
r15    0x0
rip    0x7fff2eda88a1
rflags 0x10202
cs     0x2b
fs     0x0
gs     0x0
exit status 2

I originally experienced this issue attempting to run gdlv and opened an issue at aarzilli/gdlv#45 but was redirected here by @dmitshur.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 27 (26 by maintainers)

Most upvoted comments

Thank for the extra information. That does make more sense.

The ud2 is from C code compiled by Apple. That is typically generated by C compilers for calls to __builtin_trap or __builtin_unreachable.

I agree that this does look like a missing runtime.LockOSThread somewhere.

Thank you for the guidance.

I’ve tried lldb and it seems to provide output that is a lot more informative. The crash happens inside AppKit code and this time its source is being included:

shiny $ go build -tags=example ./example/basic
shiny $ lldb basic
(lldb) target create "basic"
Current executable set to 'basic' (x86_64).
(lldb) run
Process 3562 launched: '/Users/dmitri/go/src/golang.org/x/exp/shiny/basic' (x86_64)
2019-10-30 08:34:05.411545-0400 basic[3562:110884] flock failed to lock maps file: errno = 35
2019-10-30 08:34:05.412054-0400 basic[3562:110884] flock failed to lock maps file: errno = 35
Process 3562 stopped
* thread #5, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x00007fff379c0a04 AppKit`-[NSOpenGLContext update] + 520
AppKit`-[NSOpenGLContext update]:
->  0x7fff379c0a04 <+520>: ud2    
    0x7fff379c0a06 <+522>: movq   %rax, %r14
    0x7fff379c0a09 <+525>: jmp    0x7fff379c0a12            ; <+534>
    0x7fff379c0a0b <+527>: movq   %rax, %r14
Target 0: (basic) stopped.
(lldb) bt
* thread #5, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x00007fff379c0a04 AppKit`-[NSOpenGLContext update] + 520
    frame #1: 0x00000000040580e0 basic`runtime.asmcgocall + 112
    frame #2: 0x0000000004031476 basic`runtime.mstart + 102
    frame #3: 0x00000000040c67ed basic`crosscall_amd64 + 12
    frame #4: 0x00000000040c6474 basic`threadentry + 36
    frame #5: 0x00007fff71b30d36 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007fff71b2d58f libsystem_pthread.dylib`thread_start + 15

Instructions before the offending one:

    0x7fff379c09f8 <+508>: leaq   0x855dcc(%rip), %rdi      ; "-[NSOpenGLContext update] must be called from the main thread if the context has a view."
    0x7fff379c09ff <+515>: callq  0x7fff381a07e8            ; symbol stub for: _os_crash
->  0x7fff379c0a04 <+520>: ud2    
Full disassembly
(lldb) dis
AppKit`-[NSOpenGLContext update]:
    0x7fff379c07fc <+0>:   pushq  %rbp
    0x7fff379c07fd <+1>:   movq   %rsp, %rbp
    0x7fff379c0800 <+4>:   pushq  %r15
    0x7fff379c0802 <+6>:   pushq  %r14
    0x7fff379c0804 <+8>:   pushq  %r13
    0x7fff379c0806 <+10>:  pushq  %r12
    0x7fff379c0808 <+12>:  pushq  %rbx
    0x7fff379c0809 <+13>:  subq   $0x18, %rsp
    0x7fff379c080d <+17>:  movq   %rdi, %r12
    0x7fff379c0810 <+20>:  movq   0x5b1e4329(%rip), %rsi    ; "lock"
    0x7fff379c0817 <+27>:  callq  *0x5aee419b(%rip)         ; (void *)0x00007fff705b5040: objc_msgSend
    0x7fff379c081d <+33>:  leaq   0x8(%r12), %rdi
    0x7fff379c0822 <+38>:  movq   %rdi, -0x38(%rbp)
    0x7fff379c0826 <+42>:  callq  0x7fff381a0da0            ; symbol stub for: objc_loadWeak
    0x7fff379c082b <+47>:  movq   %rax, -0x40(%rbp)
    0x7fff379c082f <+51>:  testq  %rax, %rax
    0x7fff379c0832 <+54>:  je     0x7fff379c096d            ; <+369>
    0x7fff379c0838 <+60>:  movb   0x5b266802(%rip), %al     ; sNSOpenGLContextSuppressThreadAssertionsComputedValue
    0x7fff379c083e <+66>:  testb  %al, %al
    0x7fff379c0840 <+68>:  je     0x7fff379c09d0            ; <+468>
    0x7fff379c0846 <+74>:  addb   $-0x2, %al
    0x7fff379c0848 <+76>:  testb  %al, %al
    0x7fff379c084a <+78>:  jne    0x7fff379c0859            ; <+93>
    0x7fff379c084c <+80>:  callq  0x7fff381a0f56            ; symbol stub for: pthread_main_np
    0x7fff379c0851 <+85>:  testl  %eax, %eax
    0x7fff379c0853 <+87>:  je     0x7fff379c09f8            ; <+508>
    0x7fff379c0859 <+93>:  movq   %r12, %rdi
    0x7fff379c085c <+96>:  callq  0x7fff37d0617c            ; NSOpenGLContextSetLayerOnViewIfNecessary
    0x7fff379c0861 <+101>: movq   -0x38(%rbp), %rdi
    0x7fff379c0865 <+105>: callq  0x7fff381a0da0            ; symbol stub for: objc_loadWeak
    0x7fff379c086a <+110>: movq   %rax, %rbx
    0x7fff379c086d <+113>: movq   0x5b1fa23c(%rip), %rsi    ; "_managesOpenGLDrawable"
    0x7fff379c0874 <+120>: movq   %rax, %rdi
    0x7fff379c0877 <+123>: callq  *0x5aee413b(%rip)         ; (void *)0x00007fff705b5040: objc_msgSend
    0x7fff379c087d <+129>: xorl   %r15d, %r15d
    0x7fff379c0880 <+132>: movl   $0x0, -0x2c(%rbp)
    0x7fff379c0887 <+139>: movl   $0x0, %r14d
    0x7fff379c088d <+145>: movl   $0x0, -0x30(%rbp)
    0x7fff379c0894 <+152>: testb  %al, %al
    0x7fff379c0896 <+154>: jne    0x7fff379c08bd            ; <+193>
    0x7fff379c0898 <+156>: movq   0x5b1e8d81(%rip), %rsi    ; "_isLayerBacked"
    0x7fff379c089f <+163>: movq   %rbx, %rdi
    0x7fff379c08a2 <+166>: callq  *0x5aee4110(%rip)         ; (void *)0x00007fff705b5040: objc_msgSend
    0x7fff379c08a8 <+172>: movl   %eax, %r14d
    0x7fff379c08ab <+175>: testb  %al, %al
    0x7fff379c08ad <+177>: sete   %r15b
    0x7fff379c08b1 <+181>: setne  %al
    0x7fff379c08b4 <+184>: movl   %eax, -0x2c(%rbp)
    0x7fff379c08b7 <+187>: movl   %r15d, %eax
    0x7fff379c08ba <+190>: movl   %eax, -0x30(%rbp)
    0x7fff379c08bd <+193>: movq   %r12, %rdi
    0x7fff379c08c0 <+196>: callq  0x7fff379b7d41            ; _NSOpenGLContextGetOnScreenSurface
    0x7fff379c08c5 <+201>: movq   %rax, %rbx
    0x7fff379c08c8 <+204>: movq   %r12, %rdi
    0x7fff379c08cb <+207>: callq  0x7fff379b7d91            ; _NSOpenGLContextGetOffScreenSurface
    0x7fff379c08d0 <+212>: movq   %rax, %r13
    0x7fff379c08d3 <+215>: testq  %rbx, %rbx
    0x7fff379c08d6 <+218>: sete   %al
    0x7fff379c08d9 <+221>: orb    %r15b, %al
    0x7fff379c08dc <+224>: jne    0x7fff379c08ec            ; <+240>
    0x7fff379c08de <+226>: movsbl %r14b, %esi
    0x7fff379c08e2 <+230>: movq   %r12, %rdi
    0x7fff379c08e5 <+233>: callq  0x7fff37a12036            ; NSOpenGLContextDetachOnScreenViewSurface
    0x7fff379c08ea <+238>: xorl   %ebx, %ebx
    0x7fff379c08ec <+240>: testq  %r13, %r13
    0x7fff379c08ef <+243>: sete   %al
    0x7fff379c08f2 <+246>: orb    -0x2c(%rbp), %al
    0x7fff379c08f5 <+249>: jne    0x7fff379c0906            ; <+266>
    0x7fff379c08f7 <+251>: movzbl -0x30(%rbp), %esi
    0x7fff379c08fb <+255>: movq   %r12, %rdi
    0x7fff379c08fe <+258>: callq  0x7fff37a0bd74            ; NSOpenGLContextDetachOffScreenViewSurface
    0x7fff379c0903 <+263>: xorl   %r13d, %r13d
    0x7fff379c0906 <+266>: testq  %rbx, %rbx
    0x7fff379c0909 <+269>: jne    0x7fff379c0924            ; <+296>
    0x7fff379c090b <+271>: xorb   $0x1, %r15b
    0x7fff379c090f <+275>: jne    0x7fff379c0924            ; <+296>
    0x7fff379c0911 <+277>: movq   %r12, %rdi
    0x7fff379c0914 <+280>: callq  0x7fff379bfe79            ; NSOpenGLContextAttachOnScreenViewSurface
    0x7fff379c0919 <+285>: movq   %r12, %rdi
    0x7fff379c091c <+288>: callq  0x7fff379b7d41            ; _NSOpenGLContextGetOnScreenSurface
    0x7fff379c0921 <+293>: movq   %rax, %rbx
    0x7fff379c0924 <+296>: testq  %r13, %r13
    0x7fff379c0927 <+299>: jne    0x7fff379c0943            ; <+327>
    0x7fff379c0929 <+301>: movl   -0x2c(%rbp), %eax
    0x7fff379c092c <+304>: xorb   $0x1, %al
    0x7fff379c092e <+306>: jne    0x7fff379c0943            ; <+327>
    0x7fff379c0930 <+308>: movq   %r12, %rdi
    0x7fff379c0933 <+311>: callq  0x7fff379b7e76            ; NSOpenGLContextAttachOffScreenViewSurface
    0x7fff379c0938 <+316>: movq   %r12, %rdi
    0x7fff379c093b <+319>: callq  0x7fff379b7d91            ; _NSOpenGLContextGetOffScreenSurface
    0x7fff379c0940 <+324>: movq   %rax, %r13
    0x7fff379c0943 <+327>: testq  %rbx, %rbx
    0x7fff379c0946 <+330>: je     0x7fff379c0979            ; <+381>
    0x7fff379c0948 <+332>: movq   -0x38(%rbp), %rdi
    0x7fff379c094c <+336>: callq  0x7fff381a0da0            ; symbol stub for: objc_loadWeak
    0x7fff379c0951 <+341>: movq   0x5b1fa1a0(%rip), %rsi    ; "_syncSurfaceIfPostponed"
    0x7fff379c0958 <+348>: movq   %rax, %rdi
    0x7fff379c095b <+351>: callq  *0x5aee4057(%rip)         ; (void *)0x00007fff705b5040: objc_msgSend
    0x7fff379c0961 <+357>: movq   0x10(%r12), %rdi
    0x7fff379c0966 <+362>: callq  0x7fff3819e592            ; symbol stub for: CGLUpdateContext
    0x7fff379c096b <+367>: jmp    0x7fff379c0986            ; <+394>
    0x7fff379c096d <+369>: movq   0x10(%r12), %rdi
    0x7fff379c0972 <+374>: callq  0x7fff3819e592            ; symbol stub for: CGLUpdateContext
    0x7fff379c0977 <+379>: jmp    0x7fff379c09ab            ; <+431>
    0x7fff379c0979 <+381>: testq  %r13, %r13
    0x7fff379c097c <+384>: je     0x7fff379c0986            ; <+394>
    0x7fff379c097e <+386>: movq   %r12, %rdi
    0x7fff379c0981 <+389>: callq  0x7fff37d06bd1            ; NSOpenGLContextUpdateOffScreenViewSurface
    0x7fff379c0986 <+394>: movq   0x5b1fa113(%rip), %rsi    ; "wantsBestResolutionOpenGLSurface"
    0x7fff379c098d <+401>: movq   -0x40(%rbp), %rdi
    0x7fff379c0991 <+405>: callq  *0x5aee4021(%rip)         ; (void *)0x00007fff705b5040: objc_msgSend
    0x7fff379c0997 <+411>: testb  %al, %al
    0x7fff379c0999 <+413>: je     0x7fff379c09ab            ; <+431>
    0x7fff379c099b <+415>: movq   0x5b1fa106(%rip), %rsi    ; "_updateOpenGLViewport"
    0x7fff379c09a2 <+422>: movq   %r12, %rdi
    0x7fff379c09a5 <+425>: callq  *0x5aee400d(%rip)         ; (void *)0x00007fff705b5040: objc_msgSend
    0x7fff379c09ab <+431>: xorl   %ebx, %ebx
    0x7fff379c09ad <+433>: movq   0x5b1e4194(%rip), %rsi    ; "unlock"
    0x7fff379c09b4 <+440>: movq   %r12, %rdi
    0x7fff379c09b7 <+443>: callq  *0x5aee3ffb(%rip)         ; (void *)0x00007fff705b5040: objc_msgSend
    0x7fff379c09bd <+449>: testb  %bl, %bl
    0x7fff379c09bf <+451>: jne    0x7fff379c09f1            ; <+501>
    0x7fff379c09c1 <+453>: addq   $0x18, %rsp
    0x7fff379c09c5 <+457>: popq   %rbx
    0x7fff379c09c6 <+458>: popq   %r12
    0x7fff379c09c8 <+460>: popq   %r13
    0x7fff379c09ca <+462>: popq   %r14
    0x7fff379c09cc <+464>: popq   %r15
    0x7fff379c09ce <+466>: popq   %rbp
    0x7fff379c09cf <+467>: retq   
    0x7fff379c09d0 <+468>: leaq   0x5af42641(%rip), %rdi    ; @"NSOpenGLContextSuppressThreadAssertions"
    0x7fff379c09d7 <+475>: leaq   0x5b266662(%rip), %rdx    ; sNSOpenGLContextSuppressThreadAssertionsComputedValue
    0x7fff379c09de <+482>: leaq   0x3461d3(%rip), %rcx      ; NSOpenGLContextSuppressThreadAssertionsDefaultValueFunction
    0x7fff379c09e5 <+489>: xorl   %esi, %esi
    0x7fff379c09e7 <+491>: callq  0x7fff376437c7            ; _NSGetBoolAppConfig
    0x7fff379c09ec <+496>: jmp    0x7fff379c0848            ; <+76>
    0x7fff379c09f1 <+501>: callq  0x7fff381a0d70            ; symbol stub for: objc_exception_rethrow
    0x7fff379c09f6 <+506>: ud2    
    0x7fff379c09f8 <+508>: leaq   0x855dcc(%rip), %rdi      ; "-[NSOpenGLContext update] must be called from the main thread if the context has a view."
    0x7fff379c09ff <+515>: callq  0x7fff381a07e8            ; symbol stub for: _os_crash
->  0x7fff379c0a04 <+520>: ud2    
    0x7fff379c0a06 <+522>: movq   %rax, %r14
    0x7fff379c0a09 <+525>: jmp    0x7fff379c0a12            ; <+534>
    0x7fff379c0a0b <+527>: movq   %rax, %r14
    0x7fff379c0a0e <+530>: testb  %bl, %bl
    0x7fff379c0a10 <+532>: je     0x7fff379c0a17            ; <+539>
    0x7fff379c0a12 <+534>: callq  0x7fff381a0d64            ; symbol stub for: objc_end_catch
    0x7fff379c0a17 <+539>: movq   %r14, %rdi
    0x7fff379c0a1a <+542>: callq  0x7fff381a070a            ; symbol stub for: _Unwind_Resume
    0x7fff379c0a1f <+547>: ud2    
    0x7fff379c0a21 <+549>: callq  0x7fff381a0e42            ; symbol stub for: objc_terminate
    0x7fff379c0a26 <+554>: movq   %rax, %rdi
    0x7fff379c0a29 <+557>: callq  0x7fff381a0d40            ; symbol stub for: objc_begin_catch
    0x7fff379c0a2e <+562>: movb   $0x1, %bl
    0x7fff379c0a30 <+564>: jmp    0x7fff379c09ad            ; <+433>
    0x7fff379c0a35 <+569>: nop    
    0x7fff379c0a36 <+570>: nop    
    0x7fff379c0a37 <+571>: nop    
    0x7fff379c0a38 <+572>: nop    
    0x7fff379c0a39 <+573>: nop    
    0x7fff379c0a3a <+574>: nop    
    0x7fff379c0a3b <+575>: nop    
(lldb) 

Notably, it points to ud2 as the instruction that caused EXC_BAD_INSTRUCTION, which makes a lot more sense. I don’t know if delve’s output was wrong or just incomplete.

If the “must be called from the main thread if the context has a view” text is relevant, that gives something for me to investigate in shiny’s gldriver implementation.

I wonder what led to ud2 instruction being the one to crash the program instead of something else that provides more information to the end user, and if that can be improved. (Is that to do with Apple or Go?)

Model:

Model Name: MacBook (Retina, 12-inch, 2017)
Model Identifier: MacBook10,1

Video Card:

Chipset Model: Intel HD Graphics 615
Type: GPU
Bus: Built-In
VRAM (Dynamic, Max): 1536 MB
Vendor: Intel
Device ID: 0x591e
Revision ID: 0x0002
Metal: Supported, feature set macOS GPUFamily2 v1

OS:

macOS Catalina
Version 10.15 (19A583)

The give away might be the feature set GPUFamily2 v1. What feature set does your MacBook Pro have?