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: "runtime: unknown pc" from fatal async signal in VDSO #47537

Closed
prattmic opened this issue Aug 4, 2021 · 1 comment
Closed

runtime: "runtime: unknown pc" from fatal async signal in VDSO #47537

prattmic opened this issue Aug 4, 2021 · 1 comment
Assignees
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@prattmic
Copy link
Member

prattmic commented Aug 4, 2021

In fixing #47522, I've made runtime TestSegv more strict and uncovered another crash:

--- FAIL: TestSegv (0.00s)
    --- FAIL: TestSegv/SegvInCgo (0.01s)
        crash_test.go:104: /tmp/go-build112932942/testprogcgo.exe SegvInCgo exit status: exit status 2
        crash_cgo_test.go:606: failure incorrectly contains "runtime: ". output:
            SIGSEGV: segmentation violation
            PC=0x7fff5b2e1698 m=0 sigcode=0
            
            goroutine 6 [running]:
            runtime: unknown pc 0x7fff5b2e1698
            stack: frame={sp:0x7fff5b2492f0, fp:0x0} stack=[0xc000052000,0xc000052800)
            
            runtime: unknown pc 0x7fff5b2e1698
            stack: frame={sp:0x7fff5b2492f0, fp:0x0} stack=[0xc000052000,0xc000052800)
            
            created by main.SegvInCgo
                /usr/local/google/home/mpratt/src/go/src/runtime/testdata/testprogcgo/segv.go:43 +0x6f
            
            goroutine 1 [sleep]:
            time.Sleep(0x3b9aca00)
                /usr/local/google/home/mpratt/src/go/src/runtime/time.go:193 +0x12e
            main.SegvInCgo()
                /usr/local/google/home/mpratt/src/go/src/runtime/testdata/testprogcgo/segv.go:55 +0xbd
            main.main()
                /usr/local/google/home/mpratt/src/go/src/runtime/testdata/testprogcgo/main.go:37 +0x188

The signal was delivered while we were in the VDSO. sigprof has special handling for this, but the standard signal handler does not.

I have most of a fix, just need to double-check the resulting stack trace.

cc @cherrymui @ianlancetaylor

@prattmic prattmic added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 4, 2021
@prattmic prattmic added this to the Backlog milestone Aug 4, 2021
@prattmic prattmic self-assigned this Aug 4, 2021
@gopherbot
Copy link

Change https://golang.org/cl/339990 mentions this issue: runtime: handle async fatal signals in VDSO

@dmitshur dmitshur modified the milestones: Backlog, Go1.18 Oct 27, 2021
@prattmic prattmic self-assigned this Jun 24, 2022
@golang golang locked and limited conversation to collaborators Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants