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: madvise() failure during scavenging causing crash on darwin arm64 #16850

Closed
bytex64 opened this issue Aug 23, 2016 · 2 comments
Closed

Comments

@bytex64
Copy link

bytex64 commented Aug 23, 2016

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

go version go1.7 darwin/amd64

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

iOS 9.3.4 arm64 (though I believe this applies to armv7 as well)

  1. What did you do?

Create a gomobile library with gomobile bind -target ios and link the framework into an iOS app. Run the app, then switch away for five minutes or more. Switch back to the app.

  1. What did you expect to see?

Normal operation.

  1. What did you see instead?

Upon returning to the app, one thread will have crashed via notok as a result of a failed madvise syscall during scavenging. GODEBUG=scavenge=1 accelerates things significantly, and it will crash almost immediately.


It seems this was fixed for 386 and amd64 a while ago, but the same treatment never got applied to arm/arm64. I tested a similar fix and it solved my problem, but I'm not that confident in my ability to edit ARM assembly correctly.

Frustratingly, I couldn't replicate the problem with any of the gomobile example apps. I suspect that they are too simple to sufficiently provoke the GC.

@randall77
Copy link
Contributor

@aclements

@minux
Copy link
Member

minux commented Aug 23, 2016 via email

@minux minux closed this as completed Aug 23, 2016
@golang golang locked and limited conversation to collaborators Aug 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants