Skip to content

runtime: copystack doesn't adjust frame pointers on arm64 #58432

Closed
@felixge

Description

@felixge

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

$ go version
go version go1.20 darwin/arm64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using

any/arm64

What did you do?

Try to implement frame pointer unwinding for the tracer (gh 16638, wip patch).

What did you expect to see?

copystack should adjust frame pointers on the stack when growing the stack.

What did you see instead?

TODO what about arm64 frame pointer adjustment? 😅.

Seems like this issue was missed when the CL 61511 for this landed in 2018.

This is causing lots of crashes when trying to frame pointer unwind stacks that have grown.

Activity

gopherbot

gopherbot commented on Feb 9, 2023

@gopherbot
Contributor

Change https://go.dev/cl/466315 mentions this issue: runtime: add missing fp adjustment for arm64

bcmills

bcmills commented on Feb 9, 2023

@bcmills
Contributor

Possibly related to #53037?

felixge

felixge commented on Feb 9, 2023

@felixge
ContributorAuthor

@mknyszek @prattmic @aclements FYI. Took me a while to debug the fp unwinding crashes I saw, but this seems to be the root cause and relatively easy to fix (see CL above). However, the fix reveals (or causes?) more issues with frame pointers on arm64,- details are in CL 466315.

I'm putting this on hold for now and will focus on making fp unwinding work on amd64 first. But if anybody has a good idea, please let me know :).

felixge

felixge commented on Feb 9, 2023

@felixge
ContributorAuthor

Possibly related to #53037?

Not sure. But I think #39524 is definitely related.

bcmills

bcmills commented on Feb 9, 2023

@bcmills
Contributor

(CC @golang/arm)

erifan

erifan commented on Feb 10, 2023

@erifan

There's a lot of work to be done here, can you try if this CL https://go-review.googlesource.com/c/go/+/241158 works for you first?

felixge

felixge commented on Feb 10, 2023

@felixge
ContributorAuthor

Thanks @erifan - I hadn't seen this CL. Will definitely try it out.

added
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Feb 10, 2023
added this to the Backlog milestone on Feb 22, 2023
felixge

felixge commented on Mar 27, 2023

@felixge
ContributorAuthor

There's a lot of work to be done here, can you try if this CL https://go-review.googlesource.com/c/go/+/241158 works for you first?

My colleague @nsrip-dd and I are currently looking at this. Could you elaborate what you mean by "a lot of work to be done here"? We can't really figure out why the patch had stalled and what other things might need to be done here. cc @cherrymui

3 remaining items

gopherbot

gopherbot commented on Apr 3, 2023

@gopherbot
Contributor

Change https://go.dev/cl/481635 mentions this issue: runtime: save frame pointer to the stack in signal handlers for arm64

gopherbot

gopherbot commented on Apr 3, 2023

@gopherbot
Contributor

Change https://go.dev/cl/481636 mentions this issue: runtime: zero saved frame pointer when reusing goroutine stack on ARM

added
NeedsFixThe path to resolution is known, but the work has not been done.
and removed
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Jul 4, 2023
modified the milestones: Backlog, Go1.21 on Jul 4, 2023
added a commit that references this issue on Apr 29, 2024
a41a29a
locked and limited conversation to collaborators on Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.arch-arm64compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @felixge@mknyszek@dmitshur@dr2chase@bcmills

        Issue actions

          runtime: copystack doesn't adjust frame pointers on arm64 · Issue #58432 · golang/go