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

signal arrived during external code execution #189

Open
SydneyOwl opened this issue Aug 21, 2023 · 1 comment
Open

signal arrived during external code execution #189

SydneyOwl opened this issue Aug 21, 2023 · 1 comment
Labels

Comments

@SydneyOwl
Copy link

SydneyOwl commented Aug 21, 2023

Hello,
When scanning bluetooth devices on windows 10 x32 this will occur but on x64 won't:

Exception 0xc0000005 0x0 0x0 0x7674ebaa
PC=0x7674ebaa
signal arrived during external code execution

runtime.cgocall(0x3a5ca0, 0xa036850)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/cgocall.go:157 +0x58 fp=0xa02ee00 sp=0xa02ede8 pc=0x344878
syscall.SyscallN(0x7298cab0, {0xa00c0c0, 0x3, 0x3})
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/syscall_windows.go:557 +0x11d fp=0xa02ee2c sp=0xa02ee00 pc=0x3a32ed
github.com/saltosystems/winrt-go/windows/devices/bluetooth/advertisement.(*iBluetoothLEAdvertisementWatcher).AddReceived(0x1448e58, 0x12b3160)
        C:/Users/runneradmin/go/pkg/mod/github.com/saltosystems/winrt-go@v0.0.0-20230710111611-a39229b5054c/windows/devices/bluetooth/advertisement/bluetoothleadvertisementwatcher.go:212 +0x90 fp=0xa02ee68 sp=0xa02ee2c pc=0x4f8640
github.com/saltosystems/winrt-go/windows/devices/bluetooth/advertisement.(*BluetoothLEAdvertisementWatcher).AddReceived(0x1448e58, 0x12b3160)
        C:/Users/runneradmin/go/pkg/mod/github.com/saltosystems/winrt-go@v0.0.0-20230710111611-a39229b5054c/windows/devices/bluetooth/advertisement/bluetoothleadvertisementwatcher.go:69 +0xc4 fp=0xa02ee94 sp=0xa02ee68 pc=0x4f7ed4
tinygo.org/x/bluetooth.(*Adapter).Scan(0x53e898, 0xa008020)
        C:/Users/runneradmin/go/pkg/mod/tinygo.org/x/bluetooth@v0.7.1-0.20230811122637-4da7f5812480/gap_windows.go:62 +0x2d4 fp=0xa02efc0 sp=0xa02ee94 pc=0x4ff344
github.com/sydneyowl/shx8800-ble-connector/internal/bluetooth_tool.GetAvailableBtDevList.func1(0xa086640, 0xa0906d0)
        D:/a/shx8800-ble-connector/shx8800-ble-connector/internal/bluetooth_tool/scanner.go:20 +0x9c fp=0xa02efe4 sp=0xa02efc0 pc=0x50972c
github.com/sydneyowl/shx8800-ble-connector/internal/bluetooth_tool.GetAvailableBtDevList.func2()
        D:/a/shx8800-ble-connector/shx8800-ble-connector/internal/bluetooth_tool/scanner.go:33 +0x30 fp=0xa02eff0 sp=0xa02efe4 pc=0x509670
runtime.goexit()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/asm_386.s:1326 +0x1 fp=0xa02eff4 sp=0xa02eff0 pc=0x3a4f81
created by github.com/sydneyowl/shx8800-ble-connector/internal/bluetooth_tool.GetAvailableBtDevList
        D:/a/shx8800-ble-connector/shx8800-ble-connector/internal/bluetooth_tool/scanner.go:19 +0x185

goroutine 1 [select]:
runtime.gopark(0x5b82b4, 0x0, 0x9, 0x18, 0x1)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:381 +0xff fp=0xa0afbdc sp=0xa0afbc8 pc=0x37a81f
runtime.selectgo(0xa0afd0c, 0xa0afcec, 0x0, 0x0, 0x2, 0x1)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/select.go:327 +0xbc0 fp=0xa0afccc sp=0xa0afbdc pc=0x3897c0
github.com/sydneyowl/shx8800-ble-connector/internal/bluetooth_tool.GetAvailableBtDevList(0x5b8060)
        D:/a/shx8800-ble-connector/shx8800-ble-connector/internal/bluetooth_tool/scanner.go:35 +0x214 fp=0xa0afd20 sp=0xa0afccc pc=0x509584
github.com/sydneyowl/shx8800-ble-connector/cmd.StartAndRun()
        D:/a/shx8800-ble-connector/shx8800-ble-connector/cmd/runner.go:66 +0x5c2 fp=0xa0afe8c sp=0xa0afd20 pc=0x51eb72
github.com/sydneyowl/shx8800-ble-connector/cmd.glob..func1(0x543660, {0x76f900, 0x0, 0x0})
        D:/a/shx8800-ble-connector/shx8800-ble-connector/cmd/base.go:33 +0x48 fp=0xa0afe94 sp=0xa0afe8c pc=0x51e3f8
github.com/spf13/cobra.(*Command).execute(0x543660, {0xa088120, 0x0, 0x0})
        C:/Users/runneradmin/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x7c5 fp=0xa0aff24 sp=0xa0afe94 pc=0x48b1c5
github.com/spf13/cobra.(*Command).ExecuteC(0x543660)
        C:/Users/runneradmin/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x412 fp=0xa0aff90 sp=0xa0aff24 pc=0x48b992
github.com/spf13/cobra.(*Command).Execute(...)
        C:/Users/runneradmin/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
main.main()
        D:/a/shx8800-ble-connector/shx8800-ble-connector/main.go:12 +0x54 fp=0xa0affc4 sp=0xa0aff90 pc=0x520374
runtime.main()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:250 +0x22e fp=0xa0afff0 sp=0xa0affc4 pc=0x37a3ee
runtime.goexit()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/asm_386.s:1326 +0x1 fp=0xa0afff4 sp=0xa0afff0 pc=0x3a4f81

goroutine 2 [force gc (idle)]:
runtime.gopark(0x5b8284, 0x74a530, 0x11, 0x14, 0x1)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:381 +0xff fp=0xa033fdc sp=0xa033fc8 pc=0x37a81f
runtime.goparkunlock(...)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:387
runtime.forcegchelper()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:305 +0xcf fp=0xa033ff0 sp=0xa033fdc pc=0x37a64f
runtime.goexit()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/asm_386.s:1326 +0x1 fp=0xa033ff4 sp=0xa033ff0 pc=0x3a4f81
created by runtime.init.5
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:293 +0x23

goroutine 3 [GC sweep wait]:
runtime.gopark(0x5b8284, 0x74a9c0, 0xc, 0x14, 0x1)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:381 +0xff fp=0xa034fcc sp=0xa034fb8 pc=0x37a81f
runtime.goparkunlock(...)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:387
runtime.bgsweep(0xa012200)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/mgcsweep.go:278 +0x96 fp=0xa034fe8 sp=0xa034fcc pc=0x364df6
runtime.gcenable.func1()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/mgc.go:178 +0x27 fp=0xa034ff0 sp=0xa034fe8 pc=0x3570d7
runtime.goexit()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/asm_386.s:1326 +0x1 fp=0xa034ff4 sp=0xa034ff0 pc=0x3a4f81
created by runtime.gcenable
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/mgc.go:178 +0x7c

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x5b8284, 0x74ac40, 0xd, 0x14, 0x2)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:381 +0xff fp=0xa035fb8 sp=0xa035fa4 pc=0x37a81f
runtime.goparkunlock(...)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:387
runtime.(*scavengerState).park(0x74ac40)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/mgcscavenge.go:400 +0x5f fp=0xa035fcc sp=0xa035fb8 pc=0x3627cf
runtime.bgscavenge(0xa012200)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/mgcscavenge.go:628 +0x4b fp=0xa035fe8 sp=0xa035fcc pc=0x362e4b
runtime.gcenable.func2()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/mgc.go:179 +0x27 fp=0xa035ff0 sp=0xa035fe8 pc=0x357097
runtime.goexit()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/asm_386.s:1326 +0x1 fp=0xa035ff4 sp=0xa035ff0 pc=0x3a4f81
created by runtime.gcenable
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/mgc.go:179 +0xc1

goroutine 18 [finalizer wait]:
runtime.gopark(0x5b81c0, 0x76f868, 0x10, 0x14, 0x1)
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/proc.go:381 +0xff fp=0xa032f94 sp=0xa032f80 pc=0x37a81f
runtime.runfinq()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/mfinal.go:193 +0xf4 fp=0xa032ff0 sp=0xa032f94 pc=0x356264
runtime.goexit()
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/asm_386.s:1326 +0x1 fp=0xa032ff4 sp=0xa032ff0 pc=0x3a4f81
created by runtime.createfing
        C:/hostedtoolcache/windows/go/1.20.7/x64/src/runtime/mfinal.go:163 +0x60
eax     0x2a5ff7a4
ebx     0x0
ecx     0x0
edx     0xf50000
edi     0x12b3160
esi     0x520580
ebp     0x2a5ff744
esp     0x2a5ff6b4
eip     0x7674ebaa
eflags  0x10246
cs      0x23
fs      0x53
gs      0x2b

by the way, this is the build dist from github action built by goreleaser, using bwoodsend/setup-winlibs-action
Could this problem be related to the used compiler?
I'm new to Go and having some difficulty pinpointing the issue...
thanks in advance!

@ansoni-san
Copy link
Contributor

I think that's just a generic error returned when something goes wrong in C/C++ land.

This should be a bug in winrt-go (https://github.com/saltosystems/winrt-go)

Maybe to do with memory usage. I would file this over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants