-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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, x/mobile: SIGABRT ABORT, runtime.raise_trampoline.abi0 + 462 (sys_darwin_arm64.s:462) for Mac Catalyst targets running on arm64 #52299
Comments
Catalyst isn't a supported target for Go yet. See #47228 (comment) |
@cherrymui we have actually been using Gomobile for Catalyst for over six months and this crash only appeared after Go 1.18… |
@CatStudioApp I also encountered the same problem, any follow-up? |
I've seen the exact same problem for our app when upgrading from Go 1.17 to 1.18 and building for catalyst. Our app has run without any problem for about 2 years on catalyst. Bisecting Go 1.17 and Go 1.18 releases showed the problem is caused by the commit a4b2c57 that was used to fix this issue #49288 Would be interesting if someone of the Go team could maybe bring some light up into this. For catalyst is |
If you want to disable async preemption, you could try setting the environment variable Is the preemption signal the only issue, or signals in general? Could you try sending some signals to you program, and see if that works? It would be good to know why preemption signals don't work in catalyst mode. |
Thanks so much @cherrymui for your reply.
This is pretty hard to achieve because in my case the Go code runs in a network extension started by the network extension framework. But I patched Go to internally set
I tried sending Commit a4b2c57 seems to only install the sighandler also for |
So after an in-depth investigation here are the results and what is going on in this case. First the crash is due to a throw during signal handling Further investigation showed that on iOS Lines 317 to 321 in 581603c
go/src/runtime/sys_darwin_arm64.s Lines 210 to 220 in 581603c
It was quite interesting to find out why this is a problem when using MacCatalyst (darwin) where Lines 317 to 321 in 581603c
I found out that First let's take a look what gomobile is going to use for building a MacCatalyst app, it is going to use This GOOS and build-tag configuration now has the following consequences. Using
go/src/internal/goos/zgoos_ios.go Lines 3 to 7 in 581603c
Now we have a build that on the ASM side is built for This inconsistency now leads to the mentioned throw (noSignalStack) So as summary a gomobile MacCatalyst build uses
There are several possibilities to fix this issue:
|
Thanks for the investigation. As you found, We could probably guard the |
Workaround corrupt builds when using GO >= 1.18 golang/go#52299
For the time being it might be the easiest to switch from In a future release one could go with option 2 and fix #47228. |
As descripbed in this issue: golang/go#52299
We ran into this recently Jigsaw-Code/outline-apps#1828, also in a network extension. Thank you @stffabi for the wonderful and detailed write-up! I tried a few workarounds based on the earlier comments but have been unsuccessful. Was anyone able to get around this issue or should we abandon gomobile for catalyst builds? |
@sbruens did you try my patched gomobile version stffabi/go-mobile@e31230f? Install gomobile and gobind command from that commit and it should be fine. I'm using that for more than half a year now, and it works fine in production. |
Change https://go.dev/cl/635342 mentions this issue: |
The problem was observed after Go 1.18. x/mobile requires go1.22.0+. Patch from stffabi@e31230f For golang/go#52299 Co-authored-by: stffabi <stffabi@users.noreply.github.com> Change-Id: I856c68f60ad7c45acf4ae550a1e66747ef7719db Reviewed-on: https://go-review.googlesource.com/c/mobile/+/635342 Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
The workaround patch made by @stffabi is merged. Thanks a lot for the investigation and the fix. |
The problem was observed after Go 1.18. x/mobile requires go1.22.0+. Patch from stffabi@e31230f For golang/go#52299 Co-authored-by: stffabi <stffabi@users.noreply.github.com> Change-Id: I856c68f60ad7c45acf4ae550a1e66747ef7719db Reviewed-on: https://go-review.googlesource.com/c/mobile/+/635342 Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I delivered my app continuously using Gomobile to MacCatalyst target. Starting from Go 1.18, my app started to have such a crash:
What did you expect to see?
No crash
What did you see instead?
Crashes
The text was updated successfully, but these errors were encountered: