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: async preemption breaks darwin/arm and darwin/arm64 #35439

Open
cherrymui opened this issue Nov 7, 2019 · 9 comments
Assignees
Milestone

Comments

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Nov 7, 2019

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

tip (a930fed)

Does this issue reproduce with the latest release?

No

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

darwin/arm and darwin/arm64

What did you do?

After async preemption is enabled, the darwin/arm64 builder starts to fail, e.g.
https://build.golang.org/log/03f727b8f91b0c75bf54ff508d7d2f00b5cad4bf

I haven't been able to get access to the builders due to the limited resource. I'll look into the failure once I get the access.

@cherrymui cherrymui self-assigned this Nov 7, 2019
gopherbot pushed a commit that referenced this issue Nov 7, 2019
Enabling async preemption on darwin/arm and darwin/arm64 causes
the builder to fail, e.g.
https://build.golang.org/log/03f727b8f91b0c75bf54ff508d7d2f00b5cad4bf

Due to the limited resource, I haven't been able to get access on
those devices to debug. Disable async preemption for now.

Updates #35439.

Change-Id: I5a31ad6962c2bae8e6e9b8303c494610a8a4e50a
Reviewed-on: https://go-review.googlesource.com/c/go/+/205842
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 7, 2019

Change https://golang.org/cl/205842 mentions this issue: runtime: disable async preemption on darwin/arm(64) for now

@bradfitz

This comment has been minimized.

Copy link
Member

@bradfitz bradfitz commented Nov 8, 2019

@eliasnaur

This comment has been minimized.

Copy link
Contributor

@eliasnaur eliasnaur commented Nov 8, 2019

Unfortunately, the Corellium builders have networks problem at the moment. If you have any debugging CLs you'd like me to test, please let me know. I can run the ios tests locally.

@eliasnaur

This comment has been minimized.

Copy link
Contributor

@eliasnaur eliasnaur commented Nov 8, 2019

The corellium builders are up again, so when they're through the backlog you should be able to gomote in. I've started another iOS device to speed things up.

@cherrymui

This comment has been minimized.

Copy link
Contributor Author

@cherrymui cherrymui commented Nov 11, 2019

Thanks @eliasnaur !

I was able to access the Corellium gomote and dig into what's going on. I'll send CLs shortly. It should work on darwin/arm64 now.

The problem for ARM64 doesn't seem to appear on ARM32. I couldn't access the ARM32 builder. So I still don't know if it works on ARM32.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 11, 2019

Change https://golang.org/cl/206418 mentions this issue: cmd/internal/obj/arm64: save LR after decrementing SP on darwin

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 11, 2019

Change https://golang.org/cl/206419 mentions this issue: runtime: enable async preemption on darwin/arm64

@eliasnaur

This comment has been minimized.

Copy link
Contributor

@eliasnaur eliasnaur commented Nov 11, 2019

Very nice, thank you! Let's just submit this and see what happens. Corellium does not support arm32, so gomoting is diffcult.

gopherbot pushed a commit that referenced this issue Nov 12, 2019
iOS does not support SA_ONSTACK. The signal handler runs on the
G stack. Any writes below the SP may be clobbered by the signal
handler (even without call injection). So we save LR after
decrementing SP on iOS.

Updates #35439.

Change-Id: Ia6d7a0669e0bcf417b44c031d2e26675c1184165
Reviewed-on: https://go-review.googlesource.com/c/go/+/206418
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
gopherbot pushed a commit that referenced this issue Nov 12, 2019
The problem should be fixed by the previous CL. Reenable async
preemption on darwin/arm64.

Updates #35439.

Change-Id: I93e8c4702b4d8fe6abaa6fc9c27def5c8aed1b59
Reviewed-on: https://go-review.googlesource.com/c/go/+/206419
Reviewed-by: Keith Randall <khr@golang.org>
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 12, 2019

Change https://golang.org/cl/206957 mentions this issue: runtime: enable async preemption on darwin/arm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.